On the longest day of the year, Paris has about 16 hours between sunrise and
sunset. On the same day Singapore has close to 12 hours, as it does in every
month (between about 11.9 and 12.1 hours without the air), and Tromsø, in the
north of Norway, has 24: the Sun goes round the sky without setting. Six months later Tromsø does not see the Sun at all. The goal
of this lesson is to compute the length of the
dayDay lengthThe time from sunrise to sunset: the part of the Sun's daily circle that lies above the horizon, at 15° an hour. It depends only on the latitude and on the Sun's declination that day. for any place on any date, from two angles only: the place's
latitudeLatitudeThe angle of a place north or south of the equator, from 0° at the equator to 90° at the poles. It sets how fast the ground moves with the Earth's turn, how high the Sun climbs at noon and how long the days are. and the Sun's
declinationDeclinationHow far north or south of the equator a body in the sky is: for the Sun, the latitude where it stands straight overhead at noon that day. It runs from +23.44° at the June solstice through 0° at the equinoxes to −23.44° in December. that day.
The Sun's circle for the day
Watch the Sun for one day and it traces an arc across the sky, as
P93.sun-path.02 showed: up in the east, highest at noon, down in the west. That
arc is part of a full circle. Below the horizon, out of sight, the Sun carries
on round the rest of it, and comes back up the next morning.
The circle is the Earth's turn seen from the ground, so the Sun goes round it at
the Earth's pace: 15° an hour. The length of the day is simply the part of the circle that lies above the horizon,
counted in degrees, divided by 15.
How much of the circle is above the horizon depends on two things.
The Sun's declination. It sets which
circle the Sun follows that day. At the
equinoxesEquinoxOne of the two days of the year, about 20 March and 22 September, when the Earth's axis leans neither towards nor away from the Sun. Day and night then last about 12 hours each everywhere on Earth. the Sun runs along the
celestial equatorCelestial equatorThe Earth's equator carried out onto the sky: a circle right round the celestial sphere, halfway between the two celestial poles, dividing the sky into a northern and a southern half.; in June it runs on a
smaller circle 23.44° further north, in December on one 23.44° further south.
Your latitude. It sets how the horizon is tilted against those circles.
Three cases need no formula at all.
At the equator the celestial poleCelestial poleOne of the two points of the sky that do not move as the sky turns: where the line of the Earth's axis, carried far out into space, meets the celestial sphere. The north one is close to the Pole Star; it stands above your horizon at an angle equal to your latitude. sits on the horizon, so every daily
circle stands upright and the horizon cuts it exactly in half: 12 hours of day
and 12 of night, all year.
At an equinox the Sun is on the celestial
equator, a circle centred on you, like the horizon itself. Two such circles,
both centred on you, cross at two points straight opposite each other, on the
line where their two planes meet, so each cuts the other in half, wherever you
stand, except exactly at a pole, where the two circles are one and the Sun
skims the horizon all day: the day lasts 12 hours everywhere else on Earth.
The word says it: aequus, equal, and nox, night.
At the North Pole the celestial pole is overhead, so the daily circles lie
flat, parallel to the horizon. The Sun is either above it all day or below it
all day: six months of light, six months of dark.
Everywhere else, and on every other day, the horizon cuts the circle unequally.
Take an observer north of the equator, as in every example before Sydney,
below. The celestial poleCelestial poleOne of the two points of the sky that do not move as the sky turns: where the line of the Earth's axis, carried far out into space, meets the celestial sphere. The north one is close to the Pole Star; it stands above your horizon at an angle equal to your latitude. above your horizon
is then the north one, and in the northern summer the Sun's circle is shifted
towards it, so more than half of it is above your horizon, and the further
north you are, the more.
The length of the day is the Sun's circle above the horizon, read at 15° an hour.
The Sun's height at any hour
To put a number on it, we need the Sun's height above the horizon, its
altitudeAltitude (sky)How high something is in the sky: its angle above the horizon, from 0° on the horizon to 90° straight overhead. Below the horizon it is negative., at any moment, not just at noon.
Call φ your latitude, δ the Sun's declination, and H the angle
the sky has turned since noon: 15° for each hour, so H is 45° three hours
after noon, by the Sun rather than by the clock. Write h for the Sun's
height, a small letter, since the capital H is already the angle of turning.
Then
sinh=sinφsinδ+cosφcosδcosH
Check it against what you already know. At noon H=0 and cosH=1. In
Paris (48.86° N) at the June solsticeSolsticeOne of the two days of the year when the Sun is furthest north or south at noon: about 21 June and 21 December. One hemisphere has its longest day, the other its shortest., when δ = 23.44°, the two products are
sinφsinδ≈0.2996 and cosφcosδ≈0.6036, so sinh≈0.9032 and h≈64.58°: the same 64.6° as
the noon formula 90°−∣φ−δ∣ of P91.seasons.01 gave.
Where the formula comes from
Picture the sky as a ball of radius 1 around you, and use three directions
fixed to the sky: one along the Earth's axis, towards the celestial pole, and
two in the plane of the celestial equator, one of them pointing where the
equator crosses your south. In those directions, the Sun's position is
S=(cosδcosH,cosδsinH,sinδ)
the same recipe as a point on the unit
circleunit circleThe circle of radius 1 centred on the point (0, 0). Turning through an angle θ from (1, 0) lands on the point (cos θ, sin θ). (P84.angles-trigonometry.02),
lifted by the declination. The point straight above your head lies on the line
the Sun crosses at noon (H=0), and its "declination" is your latitude: the
pole stands φ above your horizon, so it is 90°−φ from the
point overhead. So that point is Z=(cosφ,0,sinφ).
For two arrows of length 1, the
dot productDot productA way to multiply two vectors that gives a single number: their lengths multiplied together and by the cosine of the angle between them, so it is largest when they point the same way, zero when they are at right angles and negative when they point apart. It is also what you get by multiplying each pair of matching components and adding them up. In machine learning it measures how alike two embeddings are: words with similar meanings tend to have high dot products. (P84.vectors.02) is the
cosinecosineFor an angle in a right-angled triangle, the side next to it divided by the hypotenuse. On the circle of radius 1, how far across the point reached by turning through the angle lies. of the angle between them. The angle between
the Sun and the overhead point is 90°−h, and in a right-angled triangle the
cosine of one sharp angle is the sinesineFor an angle in a right-angled triangle, the opposite side divided by the hypotenuse. On the circle of radius 1, the height of the point reached by turning through the angle. of the other, so
cos(90°−h)=sinh. Multiplying S and Z term by
term and adding gives the formula above.
Sunrise, sunset and the length of the day
The Sun rises and sets when its height is zero, that is when sinh=0. Put
that into the formula and solve for the angle H0 between noon and sunset:
cosH0=−cosφcosδsinφsinδ
The day runs from H0 before noon to H0 after it, so it lasts 2H0
degrees of turning, and at 15° an hour
day length=152H0hours
The angle whose cosine is a given number is what Python's math.acos returns,
in radiansradianThe angle whose arc on a circle is exactly as long as the circle's radius. A full turn is 2π radians, about 6.283.. For Paris at the June solstice:
import math
lat = math.radians(48.86) # Paris
dec = math.radians(23.44) # June solstice
num = math.sin(lat) * math.sin(dec)
den = math.cos(lat) * math.cos(dec)
half = math.degrees(math.acos(-num / den))
print(round(half, 2)) # 119.76
print(round(2 * half / 15, 2)) # 15.97 hours
That is 15 h 58 min. At the December solstice, with δ = −23.44°, the numerator
changes sign (the top of the fraction becomes negative), H0≈60.24° and the day lasts 8.03 hours, 8 h 02 min. The
two add up to 24 hours: the June day is exactly as long as the December night.
That is no accident of these numbers. Changing the sign of δ changes the sign
of cosH0, and the angle whose cosine is −c is 180° minus the angle whose
cosine is c; so H0 becomes 180°−H0, and the day of 2H0/15 hours
becomes 24 minus it.
The same formula works south of the equator, with a negative latitude: there
the celestial pole above your horizon is the south one. Sydney
(33.87° S) gets 9.74 hours, 9 h 45 min, at the June solstice and 14.26 hours in
December: its longest days fall in its summer, in December.
The midnight sun and the polar night
The formula has a limit. A cosine is always between −1 and 1, so when the
right-hand side falls below −1, no angle H0 fits: the Sun's circle never
meets the horizon, and the Sun stays up all day. That is the
midnight sunMidnight sunThe Sun staying above the horizon for a whole day and night in summer, beyond a polar circle, so that it is still shining at midnight, low in the north (or in the south, near the South Pole).. When the right-hand side goes
above +1, the Sun never rises: the polar
nightPolar nightA stretch of days in winter, beyond a polar circle, when the Sun does not rise at all, not even at noon..
At the June solstice the boundary falls where φ=90°−23.44°=66.56°: the Arctic CirclePolar circleOne of the two lines of latitude, 66.56° north (the Arctic Circle) and 66.56° south (the Antarctic Circle), beyond which the Sun stays up for a whole day at least once a year, and stays down for a whole day six months later.. North of it, the Sun does not set on that day. The
same circle marks the polar night at the December solstice, and its mirror in
the south, the Antarctic CirclePolar circleOne of the two lines of latitude, 66.56° north (the Arctic Circle) and 66.56° south (the Antarctic Circle), beyond which the Sun stays up for a whole day at least once a year, and stays down for a whole day six months later. at 66.56° S, does the same six months apart.
Further north, the season of the midnight sun grows. Tromsø, at 69.65° N, is
3.09° beyond the circle, and the Sun's declination stays above 90° − 69.65° =
20.35° for about 59 days around the June solstice: by the formula, about two
months without a sunset, and about two months without a sunrise around
December. At the pole itself, the Sun is up for half the year.
One city through the year
To follow a city's days through a year, we need the Sun's declination on each
date. The eclipticEclipticThe Sun's yearly path among the stars, as seen from the Earth: the plane of the Earth's orbit carried out onto the sky. The Sun creeps along it eastwards by about one degree a day and goes once round in a year. (P93.sun-path.01) gives it: the Sun moves along a circle
tilted 23.44° to the celestial equator, about 1° a day, and its declination
after d days since the March equinox is close to (P93.sun-path.01 derives
it)
sinδ=sin23.44°×sin(365.25360°×d)
This assumes the Sun moves along the ecliptic at an even pace. It does not
quite: the Earth moves a little faster in January, nearest the Sun, so the
northern spring and summer last about 186 days and the autumn and winter about
179. The formula puts the solstices and the September equinox up to about four
days early; in Paris, that moves a day's length by up to about 14 minutes, in
the autumn, when the days change fastest.
Run it day by day for Paris and the day grows from 12 hours at the March
equinox to 15 h 58 min at the June solstice, shrinks back to 12 hours in
September and to 8 h 02 min in December. It does not change at an even pace.
Near the equinoxes the Paris day gains or loses about 3.6 minutes a day; in the
week after a solstice it changes by only about 2 minutes in all. This is the
standstill the word solstice names, "the Sun stands still", as P93.sun-path.01
noted: the Sun's noon height and the day's length both seem to stop there
before turning back.
ⓘ Concept: Why the almanac's equinox day is longer than 12 hours
Our formula counts the day from the moment the centre of the Sun crosses a
flat horizon on an Earth without air. Two things make the real day longer.
The air bends the light coming from near the horizon, a bending known as
atmospheric refractionAtmospheric refractionThe bending of light by the air, strongest near the horizon. It makes the Sun, the Moon and the stars look a little higher than they are, so we still see the Sun for a moment after it has really set., and lifts
the Sun's image by about 0.57°, so we still see it when it has already set.
And sunrise is counted when the Sun's upper edge appears, about 0.27° above
its centre. Together, the almanacs count a sunrise when the centre is 0.83°
below the horizon. In Paris that adds about 10 minutes to the equinox day,
12 h 10 min, and about 13 minutes to the June day, 16 h 11 min. At Tromsø it
stretches the midnight sun from about 59 days to about 67.
Why it matters — Look up the sunrise and sunset on an equinox and you will not find 12 hours exactly; here is why.
Check yourself
Fill each gap. Each one says why after you check.
Loading the exercise...
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
Images, PDF or text. Kept on this device only.
Keeping your files on this device
Off by default. The mentor always gets your file; this only decides whether your own copy stays here. Copies live in this browser only - they do not follow you to another device, and clearing site data removes them.
Ctrl/Cmd + Enter to send
🎓 Practice ladder
2 graded rungs · ~24 min
Two coding rungs in your browser, with a little Python (math.acos, a loop
over the days of a year). The first turns a latitude and a declination into
the length of the day, midnight sun and polar night included; the second,
with the Sun's declination handed over from P93.sun-path.01, follows a city
through a whole year and counts its days without a sunset or a sunrise. Run checks the
visible tests; Submit grades against hidden tests, which try cities you
have not seen.
Rung 1 — the length of the day
Loading exercise…
Rung 2 — a city's days through the year
Loading exercise…
My notes on this module
Loading your notes...
Day length, latitude, the solstices and the equinoxes — TransformerLab