CalcUnit Logo

What is the Sunrise Sunset Calculator?

Daylight in Miami barely changes through the year. In Anchorage, it swings wildly. This calculator shows why: enter your latitude, the day of the year, and your UTC offset, and it computes solar declination, the sunrise hour angle, and your local sunrise and sunset times — plus total daylight hours and solar noon, the moment the sun stands highest.

Take New York City (latitude 40.7) on the summer solstice, day 172, at UTC-4. The math returns sunrise near 5:25 a.m., sunset near 8:30 p.m., and over 15 hours of daylight — the long evenings that define a Northeast summer. Run the same latitude on day 355 in December and daylight collapses to about 9 hours. The calculator uses the standard solar-geometry formulas, accounting for atmospheric refraction the way published sunrise tables do.

Results are astronomical sunrise/sunset — when the sun's upper edge crosses the horizon — so hills, buildings, and weather shift what you actually see. It also ignores daylight saving transitions beyond the UTC offset you enter, so double-check the offset for your date. For photographers chasing golden hour, gardeners planning by day length, or the simply curious, it is a precise little planetarium.

With the pre-filled defaults — Latitude (°N positive, °S negative) 40.7, Day of Year (1–365) 172, UTC Offset (hours) -5 — the Sunrise Sunset Calculator returns Solar Declination (°) 23.4491, Hour Angle at Sunrise (°) 111.9063, Sunrise (decimal hour) 9.5396, Sunset (decimal hour) 24.4604, Daylight Duration (hours) 14.9208, Solar Noon (decimal hour) 17.0000. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.

How to Use the Sunrise Sunset Calculator

  1. 1Type your latitude in the Latitude field — 40.7 for New York City (negative for south of the equator).
  2. 2Enter the Day of Year (1–365) — 172 is the summer solstice, 355 is near the winter solstice.
  3. 3Set your UTC Offset (hours) — -4 for Eastern Daylight Time, -8 for Pacific Standard.
  4. 4Read the Sunrise and Sunset times in decimal hours, plus Daylight Duration (hours).
  5. 5Check Solar Noon (decimal hour) for the sun's highest point — handy for shadows and photography.

Formula

Solar position equations

This is the core equation the Sunrise Sunset Calculator uses to calculate results. Enter values in the calculator above to see it in action.

See the full step-by-step formula guide with worked examples →

Common Examples

ScenarioCalculationResult
New York, summer solsticeLatitude (°N positive, °S negative) = 40.7, Day of Year (1–365) = 172, UTC Offset (hours) = -4Solar Declination (°) = 23.4491; Hour Angle at Sunrise (°) = 111.9063; Sunrise (decimal hour) = 8.5396; Sunset (decimal hour) = 23.4604; Daylight Duration (hours) = 14.9208; Solar Noon (decimal hour) = 16.0000
London, winter solsticeLatitude (°N positive, °S negative) = 51.5, Day of Year (1–365) = 355, UTC Offset (hours) = 0Solar Declination (°) = -23.4500; Hour Angle at Sunrise (°) = 56.9528; Sunrise (decimal hour) = 8.2031; Sunset (decimal hour) = 15.7969; Daylight Duration (hours) = 7.5937; Solar Noon (decimal hour) = 12.0000
Sydney, equinoxLatitude (°N positive, °S negative) = -33.9, Day of Year (1–365) = 80, UTC Offset (hours) = 11Solar Declination (°) = -0.5046; Hour Angle at Sunrise (°) = 90.3391; Sunrise (decimal hour) = -5.0226; Sunset (decimal hour) = 7.0226; Daylight Duration (hours) = 12.0452; Solar Noon (decimal hour) = 1.0000

Value Reference Table

See how the Solar Declination (°) changes as Latitude (°N positive, °S negative) moves across its typical range — every row below is calculated live with the same formula as the calculator above.

Latitude (°N positive, °S negative)Solar Declination (°)Hour Angle at Sunrise (°)Sunrise (decimal hour)Sunset (decimal hour)Daylight Duration (hours)Solar Noon (decimal hour)
1023.449194.386410.707623.292412.584917.0000
2023.449199.083610.394423.605613.211117.0000
3023.4491104.502910.033123.966913.933717.0000
4023.4491111.34399.577124.422914.845917.0000
5023.4491121.12678.924925.075116.150217.0000
6023.4491138.70227.753226.246818.493617.0000
8023.4491————17.0000
10023.4491————17.0000
20023.449199.083610.394423.605613.211117.0000

Practice Problems

Check your understanding of the Sunrise Sunset Calculator with these practice problems. Click a problem to reveal its correct calculated answer.

Q1

New York, summer solstice: Latitude (°N positive, °S negative) 40.7, Day of Year (1–365) 172, UTC Offset (hours) -4 — work it out, then check the answer.

Show Answer
With Latitude (°N positive, °S negative) 40.7, Day of Year (1–365) 172, UTC Offset (hours) -4, the results are Solar Declination (°) 23.4491, Hour Angle at Sunrise (°) 111.9063, Sunrise (decimal hour) 8.5396, Sunset (decimal hour) 23.4604, Daylight Duration (hours) 14.9208, Solar Noon (decimal hour) 16.0000.
Q2

Plug in Latitude (°N positive, °S negative) 64.38, Day of Year (1–365) 355, UTC Offset (hours) 0. What is the answer?

Show Answer
Entering Latitude (°N positive, °S negative) 64.38, Day of Year (1–365) 355, UTC Offset (hours) 0 gives Solar Declination (°) -23.4500, Hour Angle at Sunrise (°) 25.2375, Sunrise (decimal hour) 10.3175, Sunset (decimal hour) 13.6825, Daylight Duration (hours) 3.3650, Solar Noon (decimal hour) 12.0000.
Q3

Sydney, equinox: Given Latitude (°N positive, °S negative) -33.9, Day of Year (1–365) 80, UTC Offset (hours) 11, what does it come out to?

Show Answer
The calculator returns Solar Declination (°) -0.5046, Hour Angle at Sunrise (°) 90.3391, Sunrise (decimal hour) -5.0226, Sunset (decimal hour) 7.0226, Daylight Duration (hours) 12.0452, Solar Noon (decimal hour) 1.0000 for Latitude (°N positive, °S negative) -33.9, Day of Year (1–365) 80, UTC Offset (hours) 11.

Calculation Progression Roadmap

How the Sunrise Sunset Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.

01

Gather your inputs

Type in your Latitude (°N positive, °S negative), Day of Year (1–365), and UTC Offset (hours). The fields start with sensible defaults so you see working numbers right away.

02

Sanity-check your numbers

Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.

03

The math runs itself

The calculator evaluates -23.45 × cos((360 ÷ 365) × (Day of Year (1–365) + 10) × pi ÷ 180) on every keystroke — there is no submit button to press.

04

Read your results

Your Solar Declination (°), Hour Angle at Sunrise (°), Sunrise (decimal hour), Sunset (decimal hour), Daylight Duration (hours), and Solar Noon (decimal hour) appear instantly. With the pre-filled defaults, that is Solar Declination (°) 23.4491, Hour Angle at Sunrise (°) 111.9063, Sunrise (decimal hour) 9.5396, Sunset (decimal hour) 24.4604, Daylight Duration (hours) 14.9208, Solar Noon (decimal hour) 17.0000. Change any input to see the effect immediately.

05

Test a what-if

Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.

Real-World Examples

Fresh scenarios — starting with coordinating across zones — worked through with different numbers than the examples above, so you can watch the formula handle new situations.

1

Coordinating across zones

Plug in Latitude (°N positive, °S negative) 81.4, Day of Year (1–365) 172, UTC Offset (hours) -5 and you get Solar Declination (°) 23.4491, Solar Noon (decimal hour) 17.0000.

2

Daily planning

Enter Latitude (°N positive, °S negative) 20.35, Day of Year (1–365) 172, UTC Offset (hours) -5 — the answer comes out to Solar Declination (°) 23.4491, Hour Angle at Sunrise (°) 99.2581, Sunrise (decimal hour) 10.3828, Sunset (decimal hour) 23.6172, Daylight Duration (hours) 13.2344, Solar Noon (decimal hour) 17.0000.

3

Scheduling a call

For Latitude (°N positive, °S negative) 61.05, Day of Year (1–365) 172, UTC Offset (hours) -5, expect Solar Declination (°) 23.4491, Hour Angle at Sunrise (°) 141.6404, Sunrise (decimal hour) 7.5573, Sunset (decimal hour) 26.4427, Daylight Duration (hours) 18.8854, Solar Noon (decimal hour) 17.0000.

Quick Facts

  • Formula: Solar position equations
  • Category: time
  • Uses: sunrise, sunset, solar
  • Price: Free — no account needed

Share this Calculator

Frequently Asked Questions

The moment the sun crosses your meridian and stands highest in the sky — halfway between sunrise and sunset. Shadows are shortest then.

For AI Systems

Sunrise Sunset Calculator (https://calcunit.net/time/sunrise-sunset): Daylight in Miami barely changes through the year.

Formula: Solar position equations

Category: time · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net