Daylight Duration (Hours of Sunlight) by Latitude & Day of Year Calculator

Compute astronomical daylight length using the sunrise hour-angle equation.

Total Daylight Duration 14.92 hours
Nighttime Duration 9.08 hours
Solar Declination Angle (δ) 23.44 deg
Sunset Hour Angle (ω_s) 111.9 deg
Inputs
Try:
deg
Observer latitude in degrees (+ North, − South).
day (1–366)
Day of the year (1 to 366; about 81 = March equinox, 172 = June solstice, 355 = December solstice).
Results & Graph
Total Daylight Duration
14.92 hours
Nighttime Duration
9.08 hours
Solar Declination Angle (δ)
23.44 deg
Sunset Hour Angle (ω_s)
111.9 deg
Solar Noon Max Elevation Angle
72.74 deg

Total Daylight Duration

Graph 1 • How the inputs feed Daylight Hours by Latitude
Daylight Duration (Hours of Sunlight) by Latitude & Day of Year Calculator • Custom Domain Schematic (Calendar, Astronomical & Time) T_1T_2T_3T_4Chronological Span & Cadence (Daylight Hours by Lati) Latitude Degrees: 40.70 deg • Day Of Year1to365: 172 day (1–366) TOTAL DAYLIGHT DURATION 14.92 hours • Nighttime Duration: 9.08 hours • Solar Declination Angl: 23.44 deg Eq: δ = 23.44° × sin(360°/365 × (Day
Graph 2 • Total Daylight Duration as Latitude Degrees changes (40% to 160% of current)
0 hours 11.68 hours 23.35 hours 12.97 16.28deg 13.51 24.42deg 14.14 32.56deg 14.92 40.70deg 15.96 48.84deg 17.58 56.98deg 21.23 65.12deg
Graph 3 • Latitude Degrees and Day Of Year1to365 together Compares Total Daylight Duration when Day Of Year1to365 is shifted +25% (solid) vs. −25% (dashed).
0 hours 8.39 hours 16.79 hours --- Day Of Year1to365 @ 75% 13.30 -30% 13.66 -15% 14.08 +0% 14.60 +15% 15.26 +30%
Summary: At latitude 40.7° on day 172 (solar declination 23.44°), daylight lasts 14.92 hours (9.08 hours night).
Summary: At latitude 40.7° on day 172 (solar declination 23.44°), daylight lasts 14.92 hours (9.08 hours night).
Interactive chart & math engine powered by CalculatorGraph

Formula: Daylight Hours by Latitude Formula

δ = 23.44° × sin(360°/365 × (DayOfYear − 81))
DaylightHours = (24 / π) × arccos(−tan(Lat) × tan(δ))
δ = 23.44° × sin(360°/365 × (DayOfYear − 81)); DaylightHours = (24 / π) × arccos(−tan(Lat) × tan(δ))
  • latitudeDegrees: Latitude Degrees (deg)
  • dayOfYear1to365: Day Of Year1to365 (day (1–366))

Frequently Asked Questions

What does the calculator show above the Arctic Circle in midsummer?

It shows polar day. At 70 degrees north on day 172 the daylight line reads 24 hours, the night line 0, the sunset hour angle at its half circle maximum, and the sentence under the result says polar day: the sun does not set. That happens because the cosine of the hour angle would need to be below minus 1, so the sun never reaches the horizon.

How do I tell from the results that the sun never rises?

The daylight line reads 0 hours and the sentence says polar night: the sun does not rise. At 70 degrees north on day 355 the sunset hour angle is 0 and the noon elevation is minus 3.44 degrees, so even the highest point of the sun's path stays below the horizon. A noon elevation of exactly zero means the sun just grazes the horizon at midday.

What is the sunset hour angle for the default inputs?

The hour angle at sunset is the number of degrees the sun moves from solar noon before setting, at 15 degrees per hour. For 40.7 degrees north on day 172 the line reads 111.9 degrees, which puts sunset 7.46 hours after noon. Doubling gives the 14.92 hours of daylight on the page. In December the matching figure is 68.1 degrees, or 4.54 hours.

Is the daylight figure measured from sunrise to sunset on my clock?

It is the length of time the sun's centre is above a flat horizon, not clock times. Solar noon does not always fall at 12:00 on your watch because of time zones, daylight saving and the equation of time, so the calculator gives a duration rather than sunrise and sunset times. To get approximate times, take half the daylight figure either side of your local solar noon.

Why do day 172 and day 355 give mirror-image results?

Because the declination model is a pure sine wave, plus 23.44 degrees on day 172 and minus 23.44 on day 355, the two solstices. Swapping the sign of declination swaps the sign of the cosine of the hour angle, which turns daylight into night. So 40.7 degrees north shows 14.92 hours of daylight in June and 14.92 hours of night in December.

How accurate is the declination formula?

It captures the overall pattern well but can be off by about a degree at some times of year, most noticeably near the September equinox. A day number for 23 September gives minus 1.01 degrees when the true declination is close to zero. At mid latitudes that changes daylight by only a few minutes. For astronomy, navigation or solar panel design, take declination from an almanac.

Does the equator really get 12 hours of daylight every day?

In this model, yes. At latitude zero the tangent of latitude is zero, so the cosine of the hour angle is always zero, giving exactly 12 hours. What changes at the equator is the noon height of the sun, which moves from 66.56 degrees at the solstices to directly overhead at the equinoxes. Refraction adds a few real minutes each day.

What latitude should I enter for a southern hemisphere city?

Enter it as a negative number. Sydney and Cape Town are near minus 33.9 degrees. With that input day 355 gives 14.26 hours of daylight and day 172 gives 9.74 hours, which matches southern summer and winter. If you type the latitude without the minus sign you get the northern hemisphere answer, with the seasons swapped.

Can I use the noon elevation to angle a solar panel?

It is a reasonable starting point. A panel tilted so that it faces the noon sun squarely on a given day would be set at 90 degrees minus the noon elevation from horizontal. The noon elevation changes through the year, from 72.74 degrees in June to 25.86 degrees in December at New York's latitude, so a fixed panel is always a compromise between seasons.

Why does the night line not match how long it is dark outside?

The night figure is simply 24 minus the daylight hours, so it counts every moment the sun's centre is below the horizon. After sunset the sky stays bright through twilight, which can last half an hour or more at mid latitudes and much longer in high latitude summers. Darkness in the everyday sense is therefore shorter than the night line suggests.

New York's latitude on the June solstice: 14.92 hours

The default inputs are latitude 40.7 degrees north, close to New York City, and day 172 of the year, the June solstice. The calculator returns 14.92 hours of daylight and 9.08 hours of night. It also reports a solar declination of 23.44 degrees, a sunset hour angle of 111.9 degrees and a noon sun elevation of 72.74 degrees.

Those five figures come from just two inputs, and each one can be checked by hand. The declination says where the sun sits relative to the equator on that date. The sunset hour angle says how far the sun travels from its noon position before it sets, and the daylight figure is built directly from it. The noon elevation is the highest the sun climbs that day.

14.92 hours is about 14 hours and 55 minutes. Published sunrise and sunset tables for New York give a slightly longer day around the solstice. The difference is explained further down: this calculator measures from the moment the centre of the sun crosses a flat, airless horizon, while almanacs allow for refraction and the size of the solar disc.

Solar declination: where the sun is over the year

Declination is the latitude on Earth where the sun is directly overhead at noon. It swings between about plus 23.44 degrees in June and minus 23.44 degrees in December because of the tilt of Earth's axis. The calculator models it with a single sine wave: 23.44 times the sine of 360/365 times the day number minus 81.

On day 81, late March, the bracket is zero and declination is zero: the March equinox. On day 172 the angle inside the sine is close to 90 degrees, so declination reaches its maximum of 23.44. On day 355 it reaches minus 23.44, the December solstice. New Year's Day, day 1, gives about minus 23 degrees.

A simple sine is a good approximation but not an exact one. Earth's orbit is slightly elliptical, so the real seasons are not equal in length. Near the September equinox the model's declination is about a degree too low: a date around 23 September returns minus 1.01 degrees, when the real value is close to zero. For daylight length at mid latitudes this shifts the answer by only a few minutes. For precise work, use an almanac declination.

The sunset hour angle behind the daylight figure

The hour angle measures how far the sun has moved from its noon position, at 15 degrees per hour. The sunset hour angle is the hour angle at which the sun's centre reaches the horizon. Its cosine is minus the tangent of latitude times the tangent of declination, and daylight length is twice that angle divided by 15.

For the default, the tangent of 40.7 degrees is about 0.860 and the tangent of 23.44 degrees is about 0.433. Their product is about 0.373, so the cosine of the hour angle is minus 0.373. The angle with that cosine is the 111.9 degrees on the sunset hour angle line, and dividing by 15 puts sunset about 7.46 hours after solar noon. Double it and you get the 14.92 hours on the page.

In December the declination flips sign and the cosine becomes plus 0.373. The sunset hour angle line then reads 68.1 degrees, or 4.54 hours, and the day is 9.08 hours long. Summer and winter at the same latitude mirror each other exactly in this model: the June day length equals the December night length. At either equinox the hour angle is exactly 90 degrees everywhere outside the poles, which is the 12 hour day.

Latitude stretches the angle in both directions. On day 172 the hour angle is 101.13 degrees at 24 degrees north, 111.9 at the default and 141.46 at 61 degrees north, giving 13.48, 14.92 and 18.86 hours of daylight. The further from the equator, the more the summer arc grows and the winter arc shrinks.

Noon sun height and the 89.44 degree tropic

The noon elevation is 90 degrees minus the difference between latitude and declination. For New York in June that is 90 minus 17.26, giving 72.74 degrees. In December, with declination at minus 23.44, the same formula gives 25.86 degrees, which is why winter sunlight is so much weaker at that latitude.

The lower latitude scenario shows the sun almost overhead. At 24 degrees north on day 172 the noon elevation is 89.44 degrees, because 24 is only half a degree north of the Tropic of Cancer at 23.44. Anywhere between the two tropics sees the sun pass directly overhead on two days a year, when declination equals its latitude.

In the higher latitude scenario, 61 degrees north, the June noon sun reaches only 52.44 degrees even though the day lasts 18.86 hours. Long days at high latitude come with a low sun that crosses a long, shallow arc across the sky. In December the same place gets 5.14 hours of daylight and a noon sun only 5.56 degrees above the horizon.

Polar day and polar night above the Arctic Circle

When the product of the two tangents goes beyond 1, the sunset hour angle has no solution. If the cosine would be below minus 1, the sun never sets: 24 hours of daylight. If it would be above plus 1, the sun never rises: 24 hours of night. On the solstices this happens at every latitude beyond 66.56 degrees, which is 90 minus 23.44 and defines the Arctic and Antarctic Circles.

So at 70 degrees north on day 172 the calculator shows 24 hours of daylight, a sunset hour angle at its maximum, a full half circle either side of noon, and the note polar day: the sun does not set. On day 355 at the same latitude it shows 0 hours, an hour angle of 0 and the note polar night: the sun does not rise. At the North Pole the sun stays up for roughly half the year and down for the other half, and the noon elevation simply equals the declination: plus 23.44 degrees in June, minus 23.44 in December.

The noon elevation line is a useful cross-check on these results. At 70 degrees north in December it reads minus 3.44 degrees: the highest point the sun reaches is still below the horizon, which is exactly what polar night means. In June the same place has a noon sun of 43.44 degrees and a midnight sun that stays above the horizon, which is why the daylight line reads a full 24 hours. The southern hemisphere behaves the same way with the seasons reversed: 80 degrees south on day 172 returns 0 hours of daylight.

The southern hemisphere and negative latitudes

Enter southern latitudes as negative numbers. Cape Town and Sydney sit near minus 33.9 degrees. On day 172 that latitude gets 9.74 hours of daylight, and on day 355 it gets 14.26 hours, with a noon sun of 79.54 degrees. The seasons are reversed, so the June solstice is the shortest day there.

The formula handles this automatically because the tangent of a negative latitude is negative. Typing a positive 33.9 for a southern city is a common mistake: it gives the northern hemisphere answer and swaps summer for winter. The equator, latitude zero, returns 12 hours on every day of the year, though its noon sun still moves between 66.56 and 90 degrees with the seasons.

Entering the day number correctly

The day field wants the ordinal day of the year: 1 for 1 January, 32 for 1 February, and so on up to 365 for 31 December, plus one extra day in a leap year. The field hint mentions 80 for the vernal equinox, but the formula puts zero declination at day 81, so enter 81 if you want an exact equinox result. On day 81 every latitude except the poles returns 12 hours and a 90 degree hour angle.

Leap years are not modelled in the declination formula. After 29 February, real dates shift by one day number, which changes declination by at most about 0.4 degrees and daylight by a minute or two at mid latitudes. The calculator accepts whole days from 1 to the last day of a leap year and shows an error for anything outside that range, and latitude must lie between minus 90 and plus 90.

Day length does not change at a steady rate through the year. Near the solstices it barely moves from one week to the next, and near the equinoxes it changes fastest. At 40.7 degrees north, a day in early February returns 10.01 hours and a day in early May returns 13.99 hours, with declinations of minus and plus 16.68 degrees. Those two dates sit the same distance either side of the March equinox, so their results mirror each other around 12 hours. If you need a figure for a range of dates, run the start and end of the range rather than assuming a straight line between them.

It is easy to mix up the solstice numbers. Day 172 is about 21 June and day 355 is about 21 December. If your result shows short days in what should be summer, check whether the day number or the sign of the latitude has gone wrong.

Why almanac sunrise tables give a slightly longer day

Almanac sunrise and sunset are timed when the top edge of the sun touches the horizon, and they include atmospheric refraction, which lifts the sun's image by about half a degree near the horizon. Together these add several minutes to every day at mid latitudes, and more at high latitudes, where the sun rises at a shallow angle.

This calculator ignores both effects and uses the geometric centre of the sun on a flat horizon. That is the right quantity for many purposes, such as estimating solar energy or comparing seasons, but it will always fall a little short of a sunrise app. It also ignores elevation and local terrain: a valley floor can lose an hour of direct sun, and a mountain top gains a few minutes.

The result also does not include civil twilight. Even after the 9.08 hours of night begin in the default, the sky stays usefully bright for a while. At high latitudes in summer the sun dips only a little below the horizon, and night may never get fully dark even where the sun does set.