Sun Stats

Today

This year

DaylightTwilightToday

Milestones over the next year

How this page works

Everything on this page is calculated in your browser from four things: the location's latitude and longitude, the date, and the location's time zone.

  • The sun's position. The page uses NOAA's solar equations, which model Earth's orbit. For each date they give how far north or south of the equator the sun is overhead (from 23.4° north in June to 23.4° south in December) and how far solar noon drifts from clock noon (up to about 16 minutes over the year).
  • Sunrise and sunset. From the latitude and the sun's position, the page works out when the center of the sun is 0.833° below the horizon. That accounts for the top edge of the sun appearing first and for the atmosphere bending sunlight over the horizon. First and last light use 6° below the horizon. When the sun never gets that low or that high, there's no sunset or no sunrise that day.
  • Clock time. Solar noon comes 4 minutes later for every degree of longitude west. Your browser's time zone rules then turn each moment into local clock time, including daylight saving. Standard time shows the same moment without daylight saving.
  • Accuracy. NOAA rates these equations accurate to within a minute between 72° north and 72° south, and within 10 minutes beyond that.

City search uses Open-Meteo to look up a city's location and time zone. "Use my location" stays on your device.

Show me the equationsHide the equations

Angles in degrees. T is time in Julian centuries since noon on January 1, 2000, φ is latitude, and longitude is positive east.

Time
T = (Julian day - 2451545) / 36525
Sun's mean longitude
L0 = 280.46646 + 36000.76983T + 0.0003032T2
Sun's mean anomaly
M = 357.52911 + 35999.05029T - 0.0001537T2
Eccentricity of Earth's orbit
e = 0.016708634 - 0.000042037T - 0.0000001267T2
Equation of center
C = (1.914602 - 0.004817T - 0.000014T2) sin M + (0.019993 - 0.000101T) sin 2M + 0.000289 sin 3M
Sun's apparent longitude
Ω = 125.04 - 1934.136T
λ = L0 + C - 0.00569 - 0.00478 sin Ω
Tilt of Earth's axis
ε = 23° 26′ 21.448″ - 46.815″T - 0.00059″T2 + 0.001813″T3 + 0.00256° cos Ω
Sun's declination
δ = arcsin(sin ε · sin λ)
Equation of time (minutes)
y = tan2(ε / 2)
E = 4 · (y sin 2L0 - 2e sin M + 4ey sin M cos 2L0 - ½y2 sin 4L0 - 1.25e2 sin 2M), with the parenthesis in degrees
Solar noon (minutes after midnight UTC)
noon = 720 - 4 · longitude - E
Hour angle
cos H = (sin h0 - sin φ · sin δ) / (cos φ · cos δ)
h0 = -0.833° for sunrise and sunset, -6° for first and last light
Sunrise and sunset
sunrise = noon - 4H, sunset = noon + 4H (in minutes, with H in degrees), recalculated at each event's own time for accuracy

Sources