Sunrise, Sunset & Twilight Calculator
Enter a date, your latitude and longitude, and the UTC offset of your clock to get sunrise, sunset, solar noon, the length of the day, and the start and end of civil (−6°), nautical (−12°) and astronomical (−18°) twilight, with midnight-Sun and polar-night cases reported as such.
cos H₀ = (sin h₀ − sin φ sin δ☉) / (cos φ cos δ☉) ; noon (UTC min) = 720 − 4λ − E ; event = noon ∓ 4 H₀ ; h₀ = −0.833°, −6°, −12°, −18°Interactive Calculation Workbench
Derivation & Physical Background
The calculator uses the equations of the NOAA Global Monitoring Laboratory solar calculator, which come from Jean Meeus's Astronomical Algorithms: the Sun's mean longitude and anomaly, equation of centre, apparent longitude and declination δ☉ (Meeus ch. 25), the obliquity of the ecliptic (eq. 22.2) and the equation of time E (eq. 28.3). Solar noon falls when the Sun crosses your meridian, at 720 − 4λ − E minutes after 0h UT (λ in degrees, east positive). Each event is the hour angle H₀ at which the Sun's centre reaches a standard altitude h₀ before or after noon; the calculator recomputes the Sun's position at each event time and iterates three times.
Sunrise and sunset use h₀ = −0.833°: the upper limb on a sea-level horizon, allowing 34′ for refraction and 16′ for the Sun's semidiameter, the convention of both NOAA and the U.S. Naval Observatory. Twilight boundaries use the Sun's centre at −6° (civil), −12° (nautical) and −18° (astronomical); astronomical dusk to dawn is the fully dark window for faint deep-sky work. When cos H₀ is beyond ±1 the Sun never reaches that altitude on the date, and the calculator says so instead of printing a time: midnight Sun, polar night, or twilight that lasts all night.
Assumptions, Approximations & Validity Limits
- NOAA states that these equations give sunrise and sunset within about one minute between latitudes ±72° and within about ten minutes nearer the poles, for the years 1901–2099, which is the range the calculator accepts.
- Times assume a sea-level observer with a level horizon and standard refraction; hills, buildings, height above the horizon and unusual refraction shift the real times by minutes.
- Whether the Sun crosses an altitude at all is judged from its declination at solar noon, so on the day a polar summer or winter begins or ends the calculator can call it one way while the real event is a near-grazing crossing.
- The solar-noon altitude is geometric (90° − |φ − δ☉|, no refraction), and times are rounded to the nearest minute in the offset you enter; daylight saving time is not applied for you.
Related Reference Guides & Benchmark Objects
Local Sidereal Time (LST) & Hour Angle
How Greenwich and Local Sidereal Time (LST = HA + RA) determine meridian transit timing, hour angle, and target altitude across an observing night.
Atmospheric Refraction & Dispersion Guide
How differential atmospheric refraction lifts apparent altitude near the horizon and disperses low-altitude planetary images into red-blue spectra.
Scientific Standards & References
- NOAA Global Monitoring Laboratory Solar Calculator — calculation details (Page as retrieved 2026-10-15 (no longer actively maintained by NOAA)): NOAA Global Monitoring Laboratory, Solar Calculator, calculation details (equations from Meeus, Astronomical Algorithms) — NOAA Global Monitoring Laboratory (Boulder, CO)
- Meeus, Astronomical Algorithms (2nd ed.) (2nd edition, 1998): Meeus, J. 1998, Astronomical Algorithms, 2nd ed. (Richmond, VA: Willmann-Bell) — Willmann-Bell
- USNO Astronomical Applications — Sun and Moon data for one day; rise/set and twilight tables (Retrieved 2026-10-15): U.S. Naval Observatory, Astronomical Applications Department, Sun and Moon Data for One Day and Rise/Set/Twilight Tables for an Entire Year — U.S. Naval Observatory, Astronomical Applications Department