How this instrument works
The hour angle H₀ measures how far the sun sits, along its daily arc, from the observer's meridian at the moment it crosses the horizon. It comes from solving the astronomical triangle formed by the celestial pole, the zenith, and the sun, for the case where the sun's altitude is zero. That triangle reduces to cos H₀ = −tanφ·tanδ: latitude φ sets how tilted the observer's horizon is relative to the sky's daily rotation, and declination δ sets how far north or south of the celestial equator the sun currently sits. The minus sign is what pushes H₀ past 90° once latitude and declination share a sign — the reason summer days run long.
Declination is not fixed; it drifts with Earth's 23.44° axial tilt over the year, from about −23.45° at the December solstice to +23.45° at the June one, crossing zero at each equinox. At 40°N that swing alone moves sunrise from roughly solar hour 7.42 in December to about 4.58 in June — nearly three hours of difference produced entirely by the changing tilt of the sun's path, with latitude held constant. The second line of the formula just rescales H₀, which the engine carries in radians, into hours by the fixed rate of 15° of hour angle per hour of Earth's rotation, then counts back from solar noon.
This is the geometric sunrise: the instant the sun's centre, not its upper limb, crosses a perfectly flat horizon with no atmosphere bending the light. Real sunrises arrive a few minutes earlier because refraction lifts the image of a still-below-horizon sun and the visible disk has width. There is also a genuine failure case: once |tanφ·tanδ| exceeds 1, no arccosine exists, because the sun never reaches the horizon at all that day — polar day or polar night, depending on the sign, a real condition this formula correctly refuses to paper over.
- Enter Latitude in degrees, positive for the Northern Hemisphere and negative south of the equator.
- Enter Solar declination in degrees for the date you care about — 0° at either equinox, up to ±23.45° at the solstices.
- Read Sunrise hour angle, rad, the arc in radians the sun travels between sunrise and solar noon.
- Read Sunrise, solar hours after midnight, the sunrise time on a clock running on local solar time.
- Subtract that value from 24 for the matching solar sunset, since sunrise and sunset sit symmetrically around solar noon.
Worked example — latitude 40°N on an equinox
Set Latitude to 40° (0.698131700797732 rad internally) and Solar declination to 0°, the value on either equinox when the sun sits exactly on the celestial equator. The formula gives H₀ = acos(−tan 40°·tan 0°) = acos(0) = 1.57079632679 rad, which is precisely 90° — a quarter of the sky's daily circuit. That is the equinox signature: the sun is above the horizon for exactly half the day everywhere on Earth, so the hour angle at sunrise is always a right angle on those two dates alone.
Feeding that H₀ into the second line gives sunrise = 12 − 1.57079632679 × 3.8197186342054885 = 6.0 exactly, meaning sunrise at solar hour 6.00 — 6:00 AM solar time, the half-a-day-before-noon result equinoxes are named for. Hold the latitude at 40° and change only the declination and the picture tilts: +23.45° at the June solstice pulls sunrise to about solar hour 4.58 (4:35 AM), while −23.45° at the December solstice pushes it back to about 7.42 (7:25 AM) — the same triangle, three different suns.
Questions
What does the sunrise hour angle actually represent?
It is the angular distance the sun still has to travel, along its daily arc, to reach the observer's meridian at solar noon — measured backward from noon to the moment of sunrise. At the equinoxes it is always exactly 90° (1.5708 rad); away from them it grows or shrinks with latitude and declination together, which is why the same latitude produces a different hour angle on every date.
Why does solar declination change through the year?
Earth's axis is tilted 23.44° from the plane it orbits in, so the point on the celestial sphere the sun appears to sit against drifts north and south as the planet goes around. Declination reaches +23.45° at the June solstice, falls through 0° at each equinox, and bottoms out at −23.45° at the December solstice — the whole cause of seasons and of shifting sunrise times at fixed latitude.
Why does the calculator give no result at some latitude and declination pairs?
Because acos is undefined once |tanφ·tanδ| exceeds 1, which happens at high latitude during the local summer or winter. That is not a bug in the arithmetic — it is the formula correctly reporting polar day (the sun never sets) or polar night (it never rises), conditions that genuinely occur inside the Arctic and Antarctic circles.
Will this match the sunrise time on my phone or a weather site?
Closely, but not exactly. This formula finds the geometric moment the sun's centre crosses a flat horizon with no atmosphere; consumer apps also correct for atmospheric refraction and the sun's visible width, which together move the reported sunrise a few minutes earlier, and they convert solar time to your zone's clock time using longitude and the equation of time, which this instrument leaves to you.
Who actually needs a formula like this?
Solar installers estimating how many daylight hours a panel array sees at a given site and season; celestial navigators cross-checking sextant sights against predicted sunrise bearings; agronomists and beekeepers tracking day-length changes that trigger seasonal behaviour; and anyone writing software that has to compute sunrise without calling an external API.
Why tangent and arccosine instead of sine or a simpler ratio?
Because the sunrise condition is solved from the spherical law of cosines applied to the astronomical triangle, setting the sun's altitude to zero; expanding that equation and isolating the hour angle naturally produces cos H₀ = −tanφ·tanδ. It is not a simplification of something else — it is the direct algebraic result of the underlying spherical trigonometry.