How long is the longest day where you live? You can look it up in an almanac, but it is more satisfying to work it out yourself. The calculation uses only your latitude and the tilt of Earth’s axis, and a basic calculator with trigonometry functions is enough. This guide shows how to calculate day length at the solstice, with a worked example, a table of approximate results and a simpler shortcut if you would rather not do the maths.
What determines day length?
Two things control how many hours the Sun is above the horizon:
- Your latitude, meaning how far north or south of the equator you are.
- The Sun’s declination, which is the Sun’s angular position north or south of the celestial equator. Declination changes through the year. It is zero at the equinoxes, about +23.4 degrees at the June solstice and about -23.4 degrees at the December solstice.
At the equator, day length is close to 12 hours all year. As you move toward the poles, the seasonal swing grows until, beyond the polar circles, the Sun can stay above or below the horizon for 24 hours.
The formula
The basic sunrise equation gives the hour angle of the Sun at sunrise and sunset:
cos(H) = – tan(φ) × tan(δ)
Where:
– φ (phi) is your latitude (positive north, negative south)
– δ (delta) is the Sun’s declination on the day you are calculating
– H is the hour angle, the angle Earth must turn between solar noon and sunset
Day length in hours is then:
Day length = 2 × H / 15
Divide by 15 because Earth rotates 15 degrees per hour. H must be in degrees for this step.
A more precise version
The Sun is not a point, and the atmosphere bends its light. To account for both, use a slightly adjusted equation, with the Sun’s center at an altitude of about -0.833 degrees at sunrise and sunset:
cos(H) = (sin(-0.833°) – sin(φ) × sin(δ)) / (cos(φ) × cos(δ))
This version adds a few minutes to the day length and is closer to what almanacs publish. For a first attempt, the simple version is fine.
Step-by-step example: London-like latitude at the June solstice
Let us calculate for a latitude of 51.5 degrees north on the June solstice.
- Choose values. φ = 51.5°, δ = +23.44° (we use 23.44° as the axial tilt).
- Find the tangents. tan(51.5°) ≈ 1.257 and tan(23.44°) ≈ 0.434.
- Multiply. 1.257 × 0.434 ≈ 0.545.
- Apply the negative sign. cos(H) = -0.545.
- Take the inverse cosine. H = arccos(-0.545) ≈ 123.0°.
- Calculate day length. 2 × 123.0 / 15 ≈ 16.4 hours, or about 16 hours and 24 minutes.
Using the more precise formula gives roughly 16.6 hours, which is nearer to the almanac value.
For the December solstice, flip the sign of δ. The result is about 7.6 hours with the simple formula (24 minus 16.4), or about 7.4 hours with the precise one.
Step-by-step example: 40 degrees north
- φ = 40°, δ = +23.44°.
- tan(40°) ≈ 0.839, tan(23.44°) ≈ 0.434. Product ≈ 0.364.
- cos(H) = -0.364, so H ≈ 111.3°.
- Day length ≈ 2 × 111.3 / 15 ≈ 14.8 hours.
The precise formula gives about 15 hours.
Approximate results by latitude
These values use the precise formula for the June solstice in the Northern Hemisphere. For the Southern Hemisphere, they apply to the December solstice.
| Latitude | Longest day (hours) | Shortest day (hours) |
|---|---|---|
| 0° (equator) | about 12.1 | about 11.9 |
| 20° | about 13.3 | about 10.7 |
| 35° | about 14.5 | about 9.5 |
| 40° | about 15.0 | about 9.0 |
| 51.5° | about 16.6 | about 7.4 |
| 60° | about 18.9 | about 5.1 |
| 65° | about 22.0 | about 2.0 |
These are calculations, not official data. Real values vary with local horizon, altitude and the exact formula used.
What happens near the polar circles?
The formula only works when the result of -tan(φ) × tan(δ) is between -1 and 1. If it falls outside that range, the Sun never sets (midnight Sun) or never rises (polar night).
At the solstice, this happens when the latitude exceeds roughly 90° minus 23.44°, which is about 66.56°, the position of the Arctic and Antarctic Circles. At those latitudes, a calculator will return an error for the inverse cosine, which is the formula telling you the Sun is up (or down) all day.
Calculating change in day length
To find how quickly daylight is changing, calculate the day length for two dates and compare. For that, you need the Sun’s declination on each date. A rough approximation is:
δ ≈ 23.44° × sin[360° × (284 + N) / 365]
where N is the day number of the year (1 January = 1). This is an approximation and is good for general interest.
Try it for a date near the equinox and a date near the solstice, and you will see that daylight changes by several minutes per day around the equinox but only seconds per day near the solstice. That matches what you notice outdoors, and it is covered further in our guide to solstices and equinoxes.
The quick method: almanacs and tools
If you want results without maths:
- Official almanacs and observatory websites publish sunrise and sunset tables for any location.
- Weather services list daylight hours.
- Astronomy apps show daily day length. See our best astronomy apps roundup.
- A spreadsheet can be set up with the formulas above, and will let you chart the whole year.
Subtract sunrise from sunset to find the day length. These sources use more accurate models and will account for your exact position and time zone.
Setting up a spreadsheet
If you prefer to automate:
- Make a column for day numbers 1 to 365.
- Calculate declination using the approximation.
- Use your latitude in radians for the tangent and cosine functions.
- Compute H with ACOS and convert to degrees.
- Multiply by 2/15 to get hours.
- Chart the results.
Be careful with units, since spreadsheet trigonometry functions use radians and you must convert degrees by multiplying by π/180.
Common mistakes
- Using degrees in a radian calculator (or vice versa).
- Forgetting the sign of latitude or declination. South latitudes are negative.
- Expecting an exact match with an almanac. Refraction, elevation and the Sun’s apparent size cause differences of a few minutes.
- Mixing solar time with clock time. The day length is independent of the time zone, but sunrise and sunset clock times are not.
- Applying the formula inside the polar circles without checking the range.
Frequently asked questions
Why is the longest day not the day with the earliest sunrise?
Because of the equation of time, which describes how solar noon drifts relative to clock time through the year. Earliest sunrise and latest sunset occur on different dates from the solstice, though they are close.
Is the day length the same at the solstice every year?
It is very similar, with tiny variations because of the calendar and Earth’s orbit.
What is the longest day at the equator?
Around 12 hours and a few minutes. The equator changes little through the year.
Solstices and Equinoxes: Complete Guide to Earth’s Seasons
Key Equinox and Solstice Dates for 2026
Conclusion
To calculate day length at the solstice, use cos(H) = -tan(latitude) × tan(declination), convert the hour angle to hours and refine with the horizon correction if you want almanac-level accuracy. Try it for your own latitude, then check the result against a local sunrise table to see how close you get.
