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
- 1Type your latitude in the Latitude field — 40.7 for New York City (negative for south of the equator).
- 2Enter the Day of Year (1–365) — 172 is the summer solstice, 355 is near the winter solstice.
- 3Set your UTC Offset (hours) — -4 for Eastern Daylight Time, -8 for Pacific Standard.
- 4Read the Sunrise and Sunset times in decimal hours, plus Daylight Duration (hours).
- 5Check Solar Noon (decimal hour) for the sun's highest point — handy for shadows and photography.
Formula
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
| Scenario | Calculation | Result |
|---|---|---|
| New York, summer solstice | Latitude (°N positive, °S negative) = 40.7, Day of Year (1–365) = 172, UTC Offset (hours) = -4 | 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 |
| London, winter solstice | Latitude (°N positive, °S negative) = 51.5, Day of Year (1–365) = 355, UTC Offset (hours) = 0 | Solar 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, equinox | Latitude (°N positive, °S negative) = -33.9, Day of Year (1–365) = 80, UTC Offset (hours) = 11 | 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 |
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) |
|---|---|---|---|---|---|---|
| 10 | 23.4491 | 94.3864 | 10.7076 | 23.2924 | 12.5849 | 17.0000 |
| 20 | 23.4491 | 99.0836 | 10.3944 | 23.6056 | 13.2111 | 17.0000 |
| 30 | 23.4491 | 104.5029 | 10.0331 | 23.9669 | 13.9337 | 17.0000 |
| 40 | 23.4491 | 111.3439 | 9.5771 | 24.4229 | 14.8459 | 17.0000 |
| 50 | 23.4491 | 121.1267 | 8.9249 | 25.0751 | 16.1502 | 17.0000 |
| 60 | 23.4491 | 138.7022 | 7.7532 | 26.2468 | 18.4936 | 17.0000 |
| 80 | 23.4491 | — | — | — | — | 17.0000 |
| 100 | 23.4491 | — | — | — | — | 17.0000 |
| 200 | 23.4491 | 99.0836 | 10.3944 | 23.6056 | 13.2111 | 17.0000 |
Practice Problems
Check your understanding of the Sunrise Sunset Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
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 AnswerHide Answer
Plug in Latitude (°N positive, °S negative) 64.38, Day of Year (1–365) 355, UTC Offset (hours) 0. What is the answer?
Show AnswerHide Answer
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 AnswerHide Answer
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.
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.
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.
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.
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.
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.
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.
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.
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
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
