Sunrise & Sunset Calculator
Find sunrise and sunset times for any location and date.
Twilight
Solar altitude throughout the day (UTC)
How It Works
Sunrise and sunset times are calculated using the NOAA solar position algorithm. The sun's position depends on the Julian Day (a continuous count of days since noon on January 1, 4713 BC), the observer's latitude and longitude, and the equation of time — a correction for Earth's elliptical orbit and axial tilt that shifts solar noon up to 16 minutes ahead or behind clock noon.
Solar declination is the sun's latitude on the celestial sphere. At the March and September equinoxes, declination is 0° and day length is approximately 12 hours everywhere. At the June solstice (declination +23.5°), northern latitudes have their longest day; at the December solstice (−23.5°), their shortest.
Hour angle is the key to finding sunrise and sunset. The formula cos(ω) = −tan(lat) × tan(dec) gives the hour angle at which
the sun's center crosses the horizon. The actual sunrise uses a zenith of 90.833° to account
for atmospheric refraction (~0.567°) and the sun's apparent radius (~0.267°).
Twilight types: Civil twilight (sun 6° below horizon) — enough light for outdoor activities without artificial lighting. Nautical twilight (12°) — horizon is still visible at sea. Astronomical twilight (18°) — sky is dark enough for most telescope work.
Polar phenomena: At high latitudes, if |tan(lat) × tan(dec)| > 1,
the hour angle formula has no solution. When cos(ω) < −1, the
sun never sets (midnight sun); when cos(ω) > 1, the sun never
rises (polar night).