Sunrise, sunset, and twilight
Sunrise, sunset, solar noon, day length, and civil, nautical, and astronomical twilight for a place and local date, in local time and Zulu, with polar states.
A published result changed on 2026-09-18: Named IANA time zones like America/Denver are supported, so inputs that returned UNSUPPORTED now resolve to local times. Changelog
Sunrise is 2026-06-21 05:32 local (2026-06-21 1132Z) and sunset is 2026-06-21 20:31 local (2026-06-22 0231Z).
- Sunset
- Solar noon
- Day length
- Civil dawn
- Civil dusk
- Nautical dawn
Provenance
- Computed by
- time.sun.events 1.0.2, core 0.1.0
- Model
- Geometric sun from the NREL Solar Position Algorithm; each crossing found by bisection between the day's highest and lowest points, which also decide polar states; sunrise and sunset at −0.833° (minus horizon dip when a height is given); solar noon from the NOAA equation of time
- Accuracy
- Within 1 minute of USNO on 1,200 events (300 places and dates, 94% to the same minute), including twilights that graze their altitude
- Notes
- None
- Cites
- Reda, I., and Andreas, A., National Renewable Energy Laboratory, Solar Position Algorithm for Solar Radiation Applications (NREL/TP-560-34302); NOAA Global Monitoring Laboratory, NOAA Solar Calculator: General Solar Position Calculations; Meeus, J., Willmann-Bell, Astronomical Algorithms
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: Geometric sun from the NREL Solar Position Algorithm; each crossing found by bisection between the day's highest and lowest points, which also decide polar states; sunrise and sunset at −0.833° (minus horizon dip when a height is given); solar noon from the NOAA equation of time
Show your work
Solar noon
when the sun crosses this longitude's meridianat -104.9903° longitude= 2026-06-21 13:02 local (2026-06-21 1902Z)Sunrise altitude
−0.833° for the sun's radius and refraction, less the dip from height-0.833° − 0° of dip= -0.833°Sunrise
the crossing of that altitude before solar noonat 39.7392°, -104.9903°= 2026-06-21 05:32 local (2026-06-21 1132Z)
The same steps an agent gets from the MCP server with explain: true.
Accuracy: Within 1 minute of USNO on 1,200 events (300 places and dates, 94% to the same minute), including twilights that graze their altitude
When to use this: Use this when you need the day's light: sunrise and sunset for a place and date, solar noon, the length of the day, and the three twilights, in local time and Zulu. It is the tool behind planning a flight, a survey, a shoot, or any outdoor work that has to finish before the light goes.
Limitations: The times are for a level horizon at sea level: hills, a valley, or a tall building move sunrise and sunset by minutes, and refraction near the horizon varies with the weather. Inside the polar circles the sun may not rise or set at all, which the result states rather than inventing a time for. Legal twilight comes from the Air Almanac.
Worked example: Denver on the June solstice (MDT, UTC−6). Source: add-practitioner-essentials scenario: evening events after 00:00Z are dated on the next UTC day. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.
You enter
- Local date
- 2026-06-21
- Latitude
- 39.7392 deg
- Longitude
- -104.9903 deg
- Time zone or UTC offset
- -06:00
You get
- Sunrise
- 2026-06-21 05:32 local (2026-06-21 1132Z)
- Sunset
- 2026-06-21 20:31 local (2026-06-22 0231Z)
- Solar noon
- 2026-06-21 13:02 local (2026-06-21 1902Z)
- Day length
- 14 h 59 min
- Civil dawn
- 2026-06-21 05:00 local (2026-06-21 1100Z)
- Civil dusk
- 2026-06-21 21:04 local (2026-06-22 0304Z)
- Nautical dawn
- 2026-06-21 04:18 local (2026-06-21 1018Z)
- Nautical dusk
- 2026-06-21 21:46 local (2026-06-22 0346Z)
- Astronomical dawn
- 2026-06-21 03:30 local (2026-06-21 0930Z)
- Astronomical dusk
- 2026-06-21 22:34 local (2026-06-22 0434Z)
- Day type
- Normal: the sun rises and sets
- Day length (minutes)
- 899 min
Review: Not yet independently reviewed by a geodesist.
Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.2, core 0.1.0. See this tool in the verification report.
Changes
- 2026-09-23, fixed: Where a twilight or the sunrise does not happen, the page showed codes like "no-civil-twilight-begin" and "polar-day", and the sentence read "Sunrise is polar-day". The result keeps those documented codes for machines, but the page now shows plain words, like "None: the sun does not get low enough for civil twilight to begin", and the sentence says "The sun stays up all day, so there is no sunrise or sunset." The tool is now version 1.0.1. Changelog
- 2026-09-23, fixed: Plain-number results in a fixed unit now show that unit: the battery current reads 9.7 A where it read 9.7, and decibels, gigabytes, pulses per square meter, grams per kilogram, nautical miles per gallon, hours, nanoteslas, and minutes now carry their units too. The numbers themselves do not change. Each tool's patch version went up. Changelog
- 2026-09-19, fixed: Short and legacy tzdb zone names such as CET, EET, and EST5EDT are now accepted wherever a time zone is asked for; before, they were refused as malformed UTC offsets. Changelog
- 2026-09-19, changed: Sunrise, sunset, and twilight is now stable, checked against 1,200 US Naval Observatory events at 300 places and dates (all within a minute, 94% to the same minute). Changelog
- 2026-09-19, fixed: Sun event times now use the NREL SPA geometric sun instead of the low-precision NOAA series, and each side of the day is decided on its own. A twilight that grazes its altitude is now placed correctly: at 67.19°S on February 1, 2026, evening civil twilight ends at 23:59 local (matching USNO) instead of never. Across 1,200 USNO events every time is within a minute; published vectors are unchanged. Changelog
- 2026-09-18, result change: Named IANA time zones like America/Denver are supported, so inputs that returned UNSUPPORTED now resolve to local times. Changelog
Checked against: 23 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Constants this tool assumes
Values you do not enter, and where each comes from.
- Sun altitude at sunrise and sunset (radius and refraction)
-0.833 deg— NOAA Solar Calculator- Horizon dip per root meter of height (1.76 arcmin)
0.0293 deg— The American Practical Navigator (Bowditch), NGA Pub. No. 9
Sources
- Solar Position Algorithm for Solar Radiation Applications (NREL/TP-560-34302), Reda, I., and Andreas, A., National Renewable Energy Laboratory, Revised January 2008. Sections 3.1 to 3.15 and Tables A4.2, A4.3; worked example in Table A5.1. Read free.
- NOAA Solar Calculator: General Solar Position Calculations, NOAA Global Monitoring Laboratory, Spreadsheet and equations after Meeus (1998). Declination, equation of time, hour angle, refraction, and sunrise at −0.833°. Read free.
- Astronomical Algorithms, Meeus, J., Willmann-Bell, 2nd edition. Chapters 25 (solar coordinates) and 28 (equation of time).
Terms
- UTC: Coordinated Universal Time
- The world's civil time standard, kept within 0.9 s of Earth's rotation by leap seconds. Aviation calls it Zulu time, written with a Z. Source: IERS Bulletin C (leap seconds)
Learn the concept: Sunrise, sunset, and twilight explained, When is it night in aviation?