Skip to content
Omnikalc

Day length calculator: hours of daylight by date and latitude

Calculate the hours of daylight, the solar times of sunrise and sunset and the height of the sun at noon for any date and latitude.

Updated on
Your inputs

Value out of range

°

Value out of range

Results

Day length

10:15:30

Sunrise (local solar time)
6:52 AM
Sunset (local solar time)
5:08 PM
Sun height at solar noon
33.3 °
Solar declination
-15.96 °
Night length
13.74 h

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

  1. It estimates the Sun’s declination for the chosen date: δ ≈ 23.44° × sin(360/365 × (day of year + 284)).
  2. It finds the hour angle H of sunrise and sunset at your latitude φ: cos H = (sin(−0.833°) − sin φ × sin δ) ÷ (cos φ × cos δ)
  3. 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.

Frequently asked questions

How is day length calculated?

From the sun's declination on that date and the latitude: cos H = (sin(−0.833°) − sin φ sin δ) ÷ (cos φ cos δ), and day length = 2H ÷ 15 hours. The −0.833° accounts for refraction and the size of the sun's disk.

Why are the sunrise and sunset times different from my clock?

The calculator gives local solar time, where noon is when the sun is highest. Clock time also depends on your position within the time zone, daylight saving time and the equation of time, which can shift sunrise by up to an hour or more.

Which day is the longest?

In the Northern Hemisphere, the June solstice, around June 21. In New York it brings about 15 hours of daylight, compared with about 9 hours 15 minutes at the December solstice.

Why is the day 12 hours everywhere on the equinox?

On the equinoxes, around March 20 and September 22, the sun is over the equator, so day and night are roughly equal at every latitude, slightly longer days because of refraction.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.