Why day length changes
Earth’s axis is tilted about 23.44° relative to its orbit. As Earth goes around the Sun, the Sun appears to move north and south of the equator over the year; its angle above or below the equator is called the declination. When the Sun is over your hemisphere, it climbs higher, stays up longer and days are long; six months later the opposite happens. The farther you are from the equator, the bigger the swing.
How the calculator works
- It estimates the Sun’s declination for the chosen date: δ ≈ 23.44° × sin(360/365 × (day of year + 284)).
- It finds the hour angle H of sunrise and sunset at your latitude φ: cos H = (sin(−0.833°) − sin φ × sin δ) ÷ (cos φ × cos δ)
- Day length = 2 × H ÷ 15 hours, since the Sun moves 15° per hour.
The −0.833° accounts for atmospheric refraction and for sunrise being counted when the top of the Sun’s disk appears. The calculator also gives the solar times of sunrise and sunset, the height of the Sun at noon (90° − |φ − δ|) and the length of the night.
Examples at 40.7° N (New York)
| Date | Day length | Sunrise | Sunset | Noon sun height |
|---|---|---|---|---|
| June 21 | 15 h 06 | 4:27 | 7:33 PM | 72.7° |
| March 20 | 12 h 03 | 5:58 | 6:02 PM | 48.5° |
| November 3 | 10 h 16 | 6:52 | 5:08 PM | 33.3° |
| December 21 | 9 h 15 | 7:22 | 4:38 PM | 25.9° |
Times are local solar time. Miami at 25.8° N swings only between about 10.5 and 13.75 hours; Anchorage at 61.2° N between about 5.5 and 19.5 hours.
Solar time versus clock time
In solar time, noon is the moment the Sun is highest. Your clock differs because:
- Time zones are about 15° wide, so your solar noon can be up to half an hour or more from 12:00, and more in wide zones.
- Daylight saving time adds an hour from March to November.
- The equation of time, caused by Earth’s elliptical orbit and tilt, shifts solar noon by up to about 16 minutes over the year.
The day length itself is not affected by any of these.
Polar day and night
Above the Arctic Circle (about 66.6° N), the Sun stays up for 24 hours around the June solstice, the midnight sun, and does not rise at all around the December solstice, the polar night. The calculator flags both cases.
Limits
The declination formula is an approximation accurate to a few tenths of a degree, which can shift sunrise and sunset by a couple of minutes. Mountains, buildings and altitude also change the moment you actually see the Sun.