Sunlight Hours Calculator

Day length changes with the seasons and with how far you are from the equator. This calculator estimates geometric daylight hours for any latitude and day of the year using the sunrise equation. It first works out the Sun's declination for the chosen day, then finds the hour angle at which the Sun crosses the horizon, and doubles it to give total daylight. The model is the standard astronomical approximation used in solar engineering. It does not add twilight or refraction, so it returns the time the Sun's centre is above the true horizon.

0.00
0.00
0.00
0.00

Sunrise equation

Declination d = 23.44 * sin(360 * (284 + N) / 365) degrees
cos H = -tan(latitude) * tan(d)
If cos H < -1: daylight = 24 hours (midnight sun)
If cos H > 1: daylight = 0 hours (polar night)
Otherwise daylight hours = 2 * H / 15, with H in degrees
Night hours = 24 - daylight hours

This is the standard geometric daylight model. Declination uses the Cooper approximation. The factor 15 converts the hour angle in degrees to hours, since the sky turns 15 degrees per hour.

How daylight varies

  • At the equator daylight stays near 12 hours throughout the year.
  • The June solstice (around day 172) gives the longest day in the northern hemisphere.
  • The December solstice (around day 355) gives the shortest northern day.
  • Inside the Arctic and Antarctic circles, the Sun can stay up or down for a full 24 hours.
  • Use negative latitude for the southern hemisphere; the seasons then reverse.

Sunlight hours: frequently asked questions

How is daylight length calculated?

The calculator uses the sunrise equation. It first finds the Sun's declination for the day of year, then computes the hour angle of sunrise from the latitude and declination: cos H equals minus tangent of latitude times tangent of declination. Daylight hours equal two times that hour angle divided by 15 degrees per hour.

Why does day length depend on latitude?

The Earth's axis is tilted about 23.44 degrees. As the Earth orbits the Sun, this tilt changes how long each latitude is lit. Near the equator days stay close to 12 hours all year, while high latitudes swing from very long summer days to very short winter days, reaching 24-hour daylight or darkness inside the polar circles.

What is solar declination?

Declination is the angle between the Sun's rays and the Earth's equatorial plane. It ranges from about plus 23.44 degrees at the June solstice to minus 23.44 degrees at the December solstice. This calculator estimates it from the day of year using the standard Cooper approximation.

Does this include twilight or atmospheric refraction?

No. It returns geometric daylight, the time the Sun's centre is above the true horizon. Civil twilight and atmospheric refraction add roughly several minutes to perceived daylight. For most planning the geometric figure is accurate to within minutes outside the polar regions.

What happens at the poles?

Inside the polar circles the cosine of the hour angle can exceed one or fall below minus one. The calculator caps those cases at 24 hours of daylight (midnight sun) or 0 hours (polar night), which is the physically correct result.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.