Daylight Duration Calculator

Daylight Duration Calculator

Leading AI Skill PRO

Enter Calculation

Formula

D=24πarccos⁡(−tan⁡ϕtan⁡δ)where{ϕ=Latitudeδ=23.45∘sin⁡(360(284+Day of Year)365)\begin{gathered} D = \frac{24}{\pi}\,\arccos\!\left(-\tan\phi\,\tan\delta\right) \\[1.5em] \text{where}\quad \left\{ \begin{aligned} \phi &= \text{Latitude} \\ \delta &= 23.45^{\circ}\sin\!\left(\frac{360(284 + \text{Day of Year})}{365}\right) \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Daylight Duration
14.85
hours of daylight
Length (h:m) 14 h 51 min
Solar declination 23.45°

Report an error on this page

What is the Daylight Duration Calculator?

This calculator estimates the number of daylight hours for any location, defined by its latitude, on a given day of the year. It uses the standard "sunrise equation" from solar geometry, combining your latitude with the Sun's declination angle for that date. The result is the time between sunrise and sunset (geometric daylight, ignoring atmospheric refraction and the apparent size of the Sun).

How to use it

Enter your latitude in degrees — positive for the Northern Hemisphere and negative for the Southern Hemisphere. Then enter the day of the year (1 = January 1, 172 ≈ June 21, 355 ≈ December 21). The calculator returns the daylight length in decimal hours and in hours and minutes, along with the computed solar declination for that day.

Diagram of a sphere split into illuminated day side and dark night side with the sunrise hour angle marked
The sunrise equation finds the fraction of a latitude circle that lies in daylight.

The formula explained

First the solar declination \(\delta\) is found with Cooper's equation: $$\delta = 23.45^{\circ}\sin\!\left(\frac{360(284 + N)}{365}\right)$$ where \(N\) is the day of the year. Then day length is $$D = \frac{24}{\pi}\,\arccos\!\left(-\tan\phi\,\tan\delta\right)$$ with \(\phi\) the latitude. When \(-\tan\phi\,\tan\delta\) falls outside \(\pm 1\) the Sun never sets (polar day, \(D = 24\)) or never rises (polar night, \(D = 0\)).

Advertisement

Worked example

At latitude 40° N on day 172 (around the June solstice), \(\delta \approx 23.45^{\circ}\). Then \(-\tan(40^{\circ})\cdot\tan(23.45^{\circ}) \approx -0.8391\cdot 0.4337 \approx -0.3640\), and \(\arccos(-0.3640) \approx 1.9438\ \text{rad}\). So $$D = \frac{24}{\pi}\cdot 1.9438 \approx 14.85\ \text{hours}$$ about 14 h 51 min of daylight.

Diagram of Earth tilted on its axis with sun rays, showing latitude angle phi and solar declination angle delta
The geometry behind day length: latitude (phi) and solar declination (delta) determine the sunrise hour angle.

Day Length by Latitude and Season

The table lists geometric daylight in hours, computed with \(D = \frac{24}{\pi}\arccos(-\tan\phi\,\tan\delta)\) and Cooper's declination \(\delta = 23.45^{\circ}\sin\!\left(\frac{360(284+N)}{365}\right)\). Latitudes are northern. Values are rounded to 0.01 h, so the last digit may differ slightly depending on rounding.

Latitude March equinox (N=80, δ≈−0.40°) June solstice (N=172, δ≈+23.45°) September equinox (N=266, δ≈−1.01°) December solstice (N=355, δ≈−23.45°)
0° 12.00 12.00 12.00 12.00
23.5° N 11.98 13.45 11.94 10.55
40° N 11.95 14.85 11.89 9.15
51.5° N 11.93 16.41 11.83 7.59
60° N 11.91 18.49 11.77 5.51

Notes:

  • These are geometric day lengths: the time the Sun's center is above a flat horizon, with no atmospheric refraction or solar-disc correction. Published sunrise/sunset tables usually show somewhat longer days (roughly 5–10 minutes more at mid-latitudes).
  • The Cooper formula is an approximation, and the day numbers are approximate dates. The equinoxes do not give exactly 12.00 h because the formula's declination is not exactly zero on days 80 and 266.
  • Southern latitudes mirror the northern values six months apart. For example, 40° S on day 355 (December) has about the same daylight as 40° N on day 172 (June), 14.85 h.

Constants and Reference Values

Quantity Value Role
Axial tilt (obliquity) used in Cooper's equation 23.45° Maximum solar declination; the actual obliquity is about 23.44° and changes very slowly
Year length approximation 365 days Converts day of year into an angle (360°/365 ≈ 0.986° per day)
Day offset in Cooper's equation 284 days Phase shift so that δ is near zero around the March equinox (day ≈ 81)
Full circle per year 360° Angular span of the declination cycle
Earth rotation 360° per 24 h = 15° per hour Converts the hour angle in degrees to hours: \(D = 2H/15\), equivalent to \(\frac{24}{\pi}\arccos(\cdot)\) with H in radians
Arctic / Antarctic Circle latitude ≈ 66.56° (90° − 23.44°) Poleward of this, polar day and polar night occur around the solstices
Standard refraction + solar-disc correction −0.833° (about 50′) Sun's center is taken at this altitude at sunrise/sunset in published tables; not included in this calculator's geometric result

Latitude and declination are in degrees, and day length is in hours. At the equator, the −0.833° correction adds only about 7 minutes to a 12-hour day, but it adds more at high latitudes, where the Sun crosses the horizon at a shallow angle.

Advertisement

Key Terms Explained

Latitude (φ)
Angular distance of a place north (+) or south (−) of the equator, from −90° to +90°.
Solar declination (δ)
The angle between the Sun's rays and the equatorial plane. It varies between about −23.45° and +23.45° over the year.
Day of the year (N)
The count of days since 1 January, where 1 January is 1 and 31 December is 365 (366 in a leap year).
Sunrise hour angle (H)
The angle the Earth must rotate between solar noon and sunrise or sunset. It satisfies \(\cos H = -\tan\phi\,\tan\delta\). Day length is \(2H\) divided by 15° per hour.
Solstice
The day when the Sun's declination reaches its maximum or minimum, around 21 June and 21 December, giving the longest and shortest days in each hemisphere.
Equinox
One of the two days a year, around 20 March and 22 September, when the Sun's declination is about zero and day and night are nearly equal everywhere.
Polar day
A period when the Sun stays above the horizon for 24 hours. It occurs when \(\tan\phi\,\tan\delta \ge 1\). The arccos then has no solution, so the day length is taken as 24 h.
Polar night
A period when the Sun never rises, at the opposite condition \(\tan\phi\,\tan\delta \le -1\), so the day length is 0 h.
Geometric vs. observed daylight
Geometric daylight is the time the Sun's center is above an ideal horizon. Observed daylight also reflects refraction, the Sun's disc size, elevation and local terrain, and is usually a few minutes longer.
Atmospheric refraction
The bending of sunlight by the atmosphere, which makes the Sun appear higher than it really is. At the horizon this is about 0.57° (34′), so the Sun is visible slightly before its geometric sunrise and after its geometric sunset.

FAQ

Why does my result differ from a sunrise table by a few minutes? Published tables include atmospheric refraction and the Sun's disc radius (~50' adjustment), which lengthen observed daylight slightly. This calculator gives the geometric center-of-Sun value.

Why is it capped at \(\pm 66.5^{\circ}\) latitude? Beyond the polar circles the Sun can stay up or down for 24 hours; the input range keeps results in the normal sunrise/sunset regime, though the math still handles the polar cases.

Which hemisphere uses negative latitude? Use negative latitude for the Southern Hemisphere, where seasons (and day lengths) are reversed relative to the North.

Last updated:

Most popular in Time and Date

View all Time and Date calculators