Sunrise and sunset calculator
Enter a date, latitude, longitude, and your UTC offset to get exact sunrise and sunset times, solar noon, day length, and twilight windows for any location on Earth.
Saved to favorites
Your favorites live on the home page, under Your favorites. They're saved only on this device & browser — open the site on your phone or in another browser and you won't see them there. No account, no server.
Algorithm
The calculator implements the NOAA solar calculations algorithm, which derives solar position from the Julian century elapsed since the J2000 epoch.
Key steps:
- Julian century T = (JD − 2451545) / 36525
- Geometric mean longitude L₀ = 280.47° + 36000.77°·T (mod 360)
- Mean anomaly M = 357.53° + 35999.05°·T
- Equation of center C from sin(M), sin(2M), sin(3M) terms
- Declination δ = arcsin(sin(ε) · sin(λ))
- Equation of time (minutes) from obliquity and longitude
- Solar noon UTC = 720 − 4·longitude − EoT (minutes)
- Hour angle H = arccos((cos(zenith) − sin(lat)·sin(δ)) / (cos(lat)·cos(δ)))
- Sunrise = solar noon − 4·H; Sunset = solar noon + 4·H
Zenith angles: 90.833° for sunrise/sunset (accounting for refraction), 96° for civil, 108° for astronomical twilight.
Worked example
NYC, June 21, 2026 (summer solstice), UTC−5
- Solar noon UTC ≈ 16:59
- Day length ≈ 15h 6m
- Civil dawn before sunrise; astronomical dawn significantly earlier
Notes
- Longitude = 0 is used as the base meridian; the formula accounts for your actual longitude.
- All UTC times may wrap past midnight; the local display adds your offset.
- Extreme latitudes (above ~65°) may show polar conditions near solstices.
Frequently asked
How accurate are the times?
What is solar noon?
What is civil twilight?
What is astronomical twilight?
What does polar day or night mean?
How do I find my latitude and longitude?
Related calculators
- Daylight duration calculator
Monthly and annual daylight summaries for any latitude.
- Moon phase calculator
Find the lunar phase and illumination for any date.
- Date difference calculator
Exact days between two dates.
- Time zone converter
Convert times between any two time zones.
- Countdown calculator
Count down days, hours, and minutes to any future event.