Day Length (Daylight Hours) Calculator
Solve the classic daylight-hours relation N = (2/15) · arccos( −tan φ · tan δ ) for any of its three unknowns — day length, observer latitude, or solar declination — with step-by-step math, a live 24-hour sun-path diagram, and companion metrics including sunrise, sunset, noon altitude and polar-day detection.
The 15° per hour is Earth's rotation
The formula divides the full sunrise-to-sunset arc, 2·H₀, by the Earth's rotation rate of 15° per hour. H₀ is the hour angle at which the Sun's geometric altitude is exactly zero — the angular distance from the meridian to the horizon crossing — and it appears twice because the Sun must travel that arc in the morning and again in the afternoon. The 2/15 factor is therefore not a convention but an exact expression of geometry: the day is twice the sunrise hour angle, converted from degrees to hours at the Earth's rotation rate.
Twelve hours at the equinox, everywhere
When δ = 0°, the argument of the arccosine becomes zero and H₀ = 90°, giving N = 2 × 90 / 15 = 12 hours. This is true at every latitude from the equator to the poles, which is why the equinoxes are the only days of the year when day and night are equal everywhere on Earth. (Strictly, because of atmospheric refraction and the Sun's finite size, the observed equinox day is a few minutes longer than 12 hours, which is why the auxiliary horizon offset is provided.) The reason is geometric: with the Sun over the equator, the plane dividing day from night passes exactly through the poles, so every latitude spends exactly half the rotation in sunlight.
The seasonal swing grows with latitude
At the equator the day is 12 hours all year, because the Sun's path is always split equally by the horizon. At 40° N it swings from 9.16 h at the December solstice to 14.84 h at the June solstice, a range of 5.7 hours. At 60° N the swing is from about 5.5 h to 18.5 h, a range of 13 hours. At the Arctic Circle it reaches from 0 h (polar night) to 24 h (midnight sun). The swing scales roughly as 2 × 24/π × arctan-style amplification with latitude, which is why high-latitude residents experience such dramatic seasonal daylight changes and why the concept of "day length" becomes almost meaningless near the poles.
Assumptions — and where the formula breaks
The formula assumes a spherical Earth, no atmospheric refraction, a point-like Sun, and the Sun's centre exactly on the astronomical horizon at sunrise and sunset. All four are approximations. The Earth's oblateness shifts the effective latitude by up to 0.2° at high latitudes. Refraction lifts the Sun by 34′ at the horizon and the Sun's own radius adds 16′, which together lengthen the observed day by several minutes — more at high latitudes. Solar parallax shifts the apparent position by 9″. None of these matter for first-order work, but all are worth knowing when comparing calculator output with published sunrise/sunset tables.
How to Use This Calculator
The day-length relation links three quantities: N, φ, and δ. Pick which one you want the tool to solve, then enter the other two. The auxiliary horizon offset refines the derived sunrise and sunset times.
1. Choose what to solve for
Pick N, φ, or δ from the toggle. The calculator inverts the arccos relation automatically, including the edge cases where the argument falls outside [−1, +1] and the day becomes 24 h (midnight sun) or 0 h (polar night).
2. Use realistic presets
Day-length presets cover 8 h, 10 h, 12 h (equinox), 14 h, 16 h and 24 h (polar day). Latitude presets run from the equator through the tropics, 40° N, London, the Arctic Circle and the pole. Declination presets span the full −23.44° to +23.44° range.
3. Set the horizon convention
The primary formula uses the geometric horizon (0°). To match published sunrise/sunset tables set the horizon offset to 0.833° — refraction plus solar radius. The offset affects only the displayed sunrise and sunset times, not the primary N value.
4. Read the result and verdict
The result card shows the solved value plus the sunrise hour angle, sunrise and sunset times, and a colour-coded verdict classifying the day from polar night through very short, short, equal, long, very long and midnight sun.
5. Check the 24-hour sun path
The diagram plots the Sun's altitude over a full rotation from midnight to midnight, with the daylight interval shaded in teal, the night interval in violet, the horizon at altitude zero, and sunrise and sunset marked at the two crossings. The current time is highlighted with a red marker on the curve.
6. Switch to Advanced for depth
Advanced mode adds a day-length-versus-declination chart showing the seasonal curve at the current latitude alongside the equator, tropic and Arctic, a sensitivity table on ±1° changes in φ and δ, and companion metrics including sunrise and sunset in clock time, noon altitude, day/night ratio, and polar condition detection.
What This Tool Offers
Built around the classic daylight-hours relation N = (2/15)·arccos(−tan φ · tan δ), the exact expression of how latitude and season determine the length of the day.
Three-way solving
Solve for day length, observer latitude, or solar declination. The calculator inverts the arccos relation in closed form and handles the polar-day and polar-night edge cases explicitly.
Live 24-hour sun path
A complete diurnal curve from midnight to midnight, with the daylight interval shaded, the horizon at zero altitude, sunrise and sunset marked, and the current moment highlighted on the curve.
Day-length verdict
Each result is classified from polar night through very short, short, equinox-equal, long, very long and midnight sun, with a colour-coded badge and the appropriate seasonal interpretation.
Sunrise and sunset times
The sunrise hour angle is converted into local solar times for sunrise and sunset, and the horizon offset can be set to 0.833° to match the standard published convention.
Dual comparison charts
Day length against latitude for three declinations (June solstice, current, December solstice), plus an advanced chart of day length against declination over the year at four representative latitudes.
Reference tables
A day-length lookup grid by latitude and declination, a table of representative values for twelve notable cities, and a month-by-month declination and day-length table.
Reference Tables & Conversions
A daylight explorer, a day-length lookup grid, and a table of representative cities.
Daylight explorer
Day Length Lookup by Latitude and Declination
Computed from N = (2/15)·arccos(−tan φ · tan δ). Values are in decimal hours; 24.00 means polar day and 0.00 means polar night.
| Latitude φ | δ = −23.44° | δ = −12° | δ = 0° | δ = +12° | δ = +23.44° |
|---|
Representative Cities and Their Day Lengths
Values computed at the standard 0.833° horizon offset (refraction plus solar radius) with declination at the two solstices and at the equinoxes.
| City | Latitude | December solstice | Equinoxes | June solstice | Annual range |
|---|
Variable Reference
| Symbol | Meaning | Typical range | Units |
|---|---|---|---|
| N | Day length (sunrise to sunset) | 0 – 24 | hours |
| φ | Observer latitude | −90 – +90 | degrees |
| δ | Solar declination | −23.44 – +23.44 | degrees |
| H₀ | Sunrise hour angle | 0 – 180 | degrees |
| Ref | Horizon offset (refraction + solar radius) | 0 – 1.0 | degrees |
| αnoon | Solar-noon altitude = 90° − |φ − δ| | −90 – +90 | degrees |
What Does N = (2/15)·arccos(−tan φ · tan δ) Measure?
The day-length formula expresses the number of hours between sunrise and sunset as a function of two quantities: the observer's latitude and the Sun's declination. It is the direct consequence of the Sun's daily path around the celestial sphere, sliced by the local horizon. Because the arithmetic is purely geometric — a spherical triangle with the observer's zenith, the celestial pole and the rising Sun — the result has no free parameters other than the two inputs, and the whole seasonal behaviour of daylight falls out of the way the Sun's declination swings north and south over the year.
Day Length Formula
The defining relationship is:
Rearranged to solve for the other two unknowns:
For δ: tan δ = − cos( N·15/2 ) / tan φ → δ = arctan( − cos( N·15/2 ) / tan φ )
When the horizon offset is included, the sunrise hour angle becomes:
N = 2 · H₀ / 15 where H₀ is now the hour angle at the offset horizon
The polar conditions are detected from the argument of the arccos:
If −tan φ · tan δ ≥ +1 → H₀ = 0° → N = 0 h (polar night)
The companion quantities are:
Sunset (local solar time): 12 + H₀ / 15
Noon altitude: αnoon = 90° − |φ − δ|
Day / night ratio: N / ( 24 − N )
Day Length Variables
| Symbol | Meaning | Notes |
|---|---|---|
| N | Day length | Hours of daylight between sunrise and sunset |
| φ | Observer latitude | Positive north, negative south |
| δ | Solar declination | Sun's position north or south of the celestial equator |
| H₀ | Sunrise hour angle | The angular distance from the meridian to sunrise |
| Ref | Horizon offset | Refraction plus solar radius; 0° for geometric |
| αnoon | Noon altitude | 90° − |φ − δ|; the Sun's highest altitude that day |
How Each Variable Affects the Result
The day length is at its maximum when −tan φ · tan δ is at its minimum, which for a given latitude occurs at the solstice of the observer's own hemisphere. At 40° N the longest day is 14.84 h at the June solstice and the shortest is 9.16 h at the December solstice, giving an annual range of 5.68 hours. The range grows with latitude and vanishes at the equator: at 0° N the day is 12.00 hours on every day of the year, because the plane dividing the illuminated half of the Earth from the dark half always passes through the poles, and the equator always straddles it symmetrically.
Declination drives the seasonal swing, and its effect is amplified by latitude. At the equator a ±23.44° change in δ produces no change in N at all. At 40° N it produces a ±2.84 h swing. At 60° N the swing is ±6.5 h. At the Arctic Circle (66.56° N) the June solstice reaches 24 h (midnight sun) and the December solstice reaches 0 h (polar night), so the annual range is the full 24 hours. Above the Arctic and below the Antarctic circles, day and night cease to be single intervals during part of the year — the Sun simply does not cross the horizon on those days, and the concept of day length becomes either 0 or 24 depending on season.
Day Length Calculation Examples
−tan 40° · tan 0° = 0
arccos(0) = 90°
N = 2 × 90 / 15 = 12.000 hours
−tan 40° · tan 23.44° = −0.8391 × 0.4335 = −0.3637
arccos(−0.3637) = 111.33°
N = 2 × 111.33 / 15 = 14.844 hours
−tan 40° · tan(−23.44°) = +0.3637
arccos(0.3637) = 68.67°
N = 2 × 68.67 / 15 = 9.156 hours
−tan 0° · tan δ = 0
arccos(0) = 90°
N = 12.000 hours on every day of the year
−tan 66.56° · tan 23.44° = −2.3098 × 0.4335 = −1.0013 ≤ −1
Polar day condition — the Sun does not set
N = 24.000 hours (midnight sun)
−tan 66.56° · tan(−23.44°) = +1.0013 ≥ +1
Polar night condition — the Sun does not rise
N = 0.000 hours (polar night)
−tan 51.5° · tan 23.44° = −1.2572 × 0.4335 = −0.5450
arccos(−0.5450) = 123.03°
N = 2 × 123.03 / 15 = 16.404 hours
cos(N·15/2) = cos(90°) = 0
tan δ = −0 / tan 40° = 0
δ = 0.00° (equinox)
cos(N·15/2) = cos(120°) = −0.5
tan φ = −(−0.5) / tan(0°) = undefined
In this case δ = 0° forces N = 12 h at every latitude, so no φ satisfies N = 16 h with δ = 0°.
Frequently Asked Questions
Because the Sun is on the celestial equator, which means the plane dividing the illuminated half of the Earth from the dark half passes exactly through the Earth's rotation axis. Every point on Earth then spends exactly half of the 24-hour rotation with the Sun above its local horizon and half below. Setting δ = 0° in the formula gives −tan φ · tan 0° = 0, so arccos(0) = 90° and N = 2 × 90 / 15 = 12 hours for every value of φ. This geometric fact is why the equinoxes are the only days of the year when day and night are equal everywhere from the equator to the poles. It is worth noting that the observed equinox day is actually a few minutes longer than 12 hours because of atmospheric refraction and the Sun's finite angular size — which is why the standard published sunrise/sunset convention uses a horizon offset of 0.833° rather than 0°.
The argument of the arccosine is −tan φ · tan δ. For a normal day this lies strictly between −1 and +1, and the arccos is well defined. When the argument reaches or falls below −1, the arccos saturates at 180° and the day length becomes 24 hours: the Sun never sets — the midnight sun. When the argument reaches or exceeds +1, the arccos saturates at 0° and the day length becomes 0 hours: the Sun never rises — the polar night. These conditions occur inside the polar circles, i.e. when |φ| > 90° − |δ|. At the Arctic Circle (66.56° N) this happens on the June solstice for the midnight sun and on the December solstice for the polar night, and the duration of the polar day and polar night grows as you move toward the pole, reaching six months at the pole itself.
Because at the equator the plane of the celestial equator is perpendicular to the horizon at all times. The Sun's daily path is a circle parallel to the celestial equator, and at the equator that circle is divided by the horizon into two exactly equal halves — one above, one below — regardless of the Sun's declination. Substituting φ = 0° into the formula gives −tan 0° · tan δ = 0 for any δ, so arccos(0) = 90° and N = 12 h on every day of the year. The seasonal variation that exists at higher latitudes disappears completely at the equator, which is why equatorial climates have no significant seasonal daylight variation — the seasons there are driven by rainfall and wind, not by day length.
At the horizon the atmosphere lifts the apparent position of the Sun by about 34 arcminutes, and the Sun's own radius adds another 16 arcminutes, for a combined 0.833° effective horizon depression. This is why the standard sunrise and sunset convention is defined at geometric altitude −0.833°. The extra daylight depends strongly on latitude: near the equator the Sun crosses the horizon almost vertically, so the extra minutes are small — about 5 to 6 minutes at the equator. At high latitudes the Sun crosses at a shallow angle, so the same 0.833° takes much longer to traverse, and the observed day can be extended by 20 to 40 minutes or more. In the polar regions the effect can be dramatic: places that would have polar night under the geometric formula can have a brief sunrise because refraction lifts the Sun above the horizon.
Because the day-length calculation uses the geometric horizon and the Sun's centre, but published sunrise and sunset times use the 0.833° offset — and the rate at which the Sun's declination changes is not zero at the solstice. Around the June solstice the declination is nearly stationary, so sunrise and sunset occur at nearly the same hour for several days, and the exact dates of earliest sunrise and latest sunset are shifted by several days from the solstice. At 40° N the earliest sunrise is around 12 June and the latest sunset around 28 June, while the longest day is on 21 June. The reason is the equation of time combined with the flat-topped declination curve, and it means that "the longest day" and "the earliest sunrise" are on different dates.
Yes, with a substitution. The formula assumes a rotation period of 24 hours and a day-night division by a horizon plane. For another planet the 15° per hour becomes 360° per rotation period (in hours), and the declination range is the planet's axial tilt. For Mars (tilt 25.19°, rotation 24.62 h) the formula becomes N = 2·H₀ / (360/24.62) = H₀ / 7.31 with the same arccos expression but δ ranging over ±25.19°. For Venus (tilt 177.4°, effectively retrograde with a tiny tilt of 2.6°) the day length is essentially 12 hours everywhere all year, and for Uranus (tilt 97.8°) the seasonal swings are extreme — the poles have 42-year-long days and nights. The underlying spherical geometry is the same; only the constants change.
For the geometric day — Sun's centre on the astronomical horizon, spherical Earth, no refraction — the formula is exact. It becomes approximate when you compare it with published sunrise and sunset tables because those use the 0.833° horizon offset, the Earth's oblateness (up to 0.2° effective latitude shift), solar parallax (9″), and nutation. Adding the 0.833° offset brings the geometric answer into agreement with tables to within a minute or so at mid-latitudes, and the calculator's auxiliary horizon offset is provided for exactly this reason. For most applications — agriculture, solar energy, photography, architecture, ordinary daylight planning — the formula is more than accurate enough, and the dominant uncertainty is not the model but the accuracy of the declination you feed it.
Day length drives a surprising number of things. In agriculture it controls photoperiodism — when crops flower, when poultry lay, when plants enter dormancy — and it determines the daily solar energy input for a field or a greenhouse. In solar energy it sets the daily energy yield of a photovoltaic array, and combined with the noon altitude it determines the peak irradiance. In architecture it governs daylighting design, the depth of shading overhangs, and the sizing of passive solar heating. In ecology it drives migration timing, hibernation cycles and animal behaviour. In everyday life it sets the schedule of human activity at high latitudes, drives the design of street lighting schedules, and influences everything from farming calendars to electricity demand curves.
Variables
| Symbol | Quantity | Unit |
|---|---|---|
| N | Day length | hours |
| φ | Observer latitude | deg |
| δ | Solar declination | deg |
What it means
This formula calculates the length of daylight (in hours) for any location on Earth, given its latitude φ and the Sun’s declination δ. It is derived from the solar altitude angle equation. It is widely used in climatology to model seasonal changes, in agriculture to plan planting and harvesting, and in solar energy engineering to estimate solar radiation. It also applies to the length of the day on other planets. Understanding this helps in understanding seasonal variations in temperature and in designing systems that depend on sunlight.
Worked example
Day Length – Two Detailed Examples
Real‑World| Parameter | Value |
|---|---|
| φ (deg) | 40 |
| δ (deg) | 23.44 |
| Parameter | Value |
|---|---|
| φ | -37 |
| δ | -23.44 |
Common mistakes
- Day length: Number of daylight hours at a given latitude on a given date.
- φ: Latitude in degrees – positive for North, negative for South.
- δ: Solar declination in degrees – must be between −23.44° and +23.44°.
- arccos: The result is in degrees – ensure your calculator uses degrees.
- Polar regions: If the argument of arccos is outside [−1,1], the Sun never rises (or never sets) – handle cases.
Applications
Day length (daylight hours), N = (2/15) arccos(−tan φ tan δ), gives the number of hours of daylight for a given latitude (φ) and solar declination (δ). This is crucial for climate studies, agriculture, solar energy, and chronobiology. Solar engineers use it to estimate the daily solar radiation available for photovoltaic systems. Farmers use it to plan planting and harvesting schedules, as photoperiod affects crop growth. Ecologists study the impact of day length on animal behaviour and migration. By calculating day length, professionals can optimise solar panel orientation, design lighting systems, and understand seasonal variation. This formula is a cornerstone of solar geometry and its applications.
- Solar energy system design and performance estimation
- Agricultural planning and crop management
- Environmental and ecological studies of photoperiod
- Building design for natural lighting and heating
- Astronomical and navigational calculations
Related calculators · Orbital Mechanics
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.