Search topics and sections

The sunrise equation gives the time of sunrise or sunset at a place from two angles: the place's latitude and the Sun's declination on that day. It does not give a clock time directly. It gives the angle the Earth turns through between sunrise and solar noon (when the Sun is highest), and that angle converts to time at 15° per hour.[1]

In its simplest form the equation is cos⁡ω0=−tan⁡ϕtan⁡δ\cos\omega_0 = -\tan\phi\tan\delta. Here ϕ\phi is the latitude, δ\delta is the declination, and ω0\omega_0 is the Sun's hour angle at sunset, the angle that measures how far the Sun is east or west of the local north-south line.[1]

Agencies such as the National Oceanic and Atmospheric Administration (NOAA) and the U.S. Naval Observatory use a corrected form. It allows for the bending of sunlight by the air and for the size of the Sun's disk.[2][3]

The angles involved

The equation uses three angles.[1]

  • Latitude, ϕ\phi, is how far north or south of the equator the observer is. North is positive, and the range is −90° to +90°.
  • Declination, δ\delta, is the Sun's angle north or south of the plane of Earth's equator at solar noon. North is positive. Over a year it stays between −23.45° and +23.45°.
  • Hour angle, ω\omega, is how far the Sun has moved east or west of the local meridian because of Earth's rotation. It grows at 15° per hour, is zero at solar noon, and is negative in the morning and positive in the afternoon.

Finding the declination

Declination changes through the year, so it must be found for the date in question. A simple estimate, due to Cooper (1969), is:[1]

δ≈23.45∘sin⁡(360∘×284+n365)\delta \approx 23.45^\circ \sin\left(360^\circ \times \frac{284 + n}{365}\right)

Here nn is the day of the year, from 1 on 1 January. Declination changes by at most about 0.4° per day, so one value per day is good enough for most engineering work.[1]

The basic equation

The basic sunrise equation gives the hour angle at which the Sun's center crosses the horizon:[1]

cos⁡ω0=−tan⁡ϕ tan⁡δ\cos\omega_0 = -\tan\phi\,\tan\delta
  • ω0\omega_0 is the sunset hour angle, taken between 0° and 180°.
  • −ω0-\omega_0 is the sunrise hour angle.
  • ϕ\phi is the latitude and δ\delta is the Sun's declination.

The equation has a solution only when ∣tan⁡ϕtan⁡δ∣≤1|\tan\phi\tan\delta| \le 1, and it needs cos⁡ϕ≠0\cos\phi \neq 0, so it does not apply at the poles themselves. The section on special cases explains what happens when no solution exists.

Daily path of the Sun at 40 degrees north on a summer day N E S W Zenith Celestial pole Celestial equator Sunrise Solar noon Sunset Observer φ δ ω₀
The sky seen by an observer at about 40° N on a summer day. The Sun's daily path runs parallel to the celestial equator (Earth's equator projected onto the sky) but is shifted toward the celestial pole by the declination δ\delta, so more than half of it lies above the horizon. The sunset hour angle ω0\omega_0 is the angle at the center of the path between solar noon and sunset.

From hour angle to time

Solar time

The hour angle turns into time at 15° per hour. In solar time, where solar noon is the moment the Sun crosses the meridian, sunrise falls ω0/15\omega_0/15 hours before solar noon and sunset the same amount after.[1]

The number of daylight hours, NN, is twice that:[1]

N=215cos⁡−1(−tan⁡ϕtan⁡δ)N = \frac{2}{15}\cos^{-1}\left(-\tan\phi\tan\delta\right)

Here cos⁡−1\cos^{-1}, the inverse cosine, gives the angle whose cosine is the value inside the brackets. The angle is in degrees and NN is in hours.

Worked example

Duffie and Beckman give this example for latitude 43° N on 16 March, when δ=−2.4∘\delta = -2.4^\circ:[1]

  1. Compute ω0=cos⁡−1[−tan⁡43∘tan⁡(−2.4∘)]=87.8∘\omega_0 = \cos^{-1}[-\tan 43^\circ \tan(-2.4^\circ)] = 87.8^\circ.
  2. Divide by 15° per hour to get 5.85 hours, or 5 hours 51 minutes.
  3. Sunrise is 5 hours 51 minutes before solar noon, at 6:09 a.m. solar time.
  4. Sunset is 5 hours 51 minutes after solar noon, at 5:51 p.m. solar time.

Clock time

Solar time differs from clock time for two reasons.[2]

  • The observer is usually away from the time zone's central meridian, the line of longitude at the center of the time zone.
  • Solar noon shifts through the year because of the equation of time.

NOAA gives these formulas for times in UTC, in minutes after midnight:[2]

tnoon=720−4λ−Et_\text{noon} = 720 - 4\lambda - E
trise=720−4(λ+ω0)−E,tset=720−4(λ−ω0)−Et_\text{rise} = 720 - 4(\lambda + \omega_0) - E, \qquad t_\text{set} = 720 - 4(\lambda - \omega_0) - E
  • λ\lambda is the longitude in degrees, positive east of the Prime Meridian (the 0° longitude line through Greenwich, England).[2][4]
  • ω0\omega_0 is in degrees. The factor 4 turns degrees into minutes, since the Earth turns 1° in 4 minutes.
  • EE is the equation of time in minutes.

Adding the time zone offset then gives local clock time.[2]

Special cases

Some places and dates give simple results that follow directly from the basic equation.

Condition What the equation gives Result
At the equator (ϕ=0\phi = 0) cos⁡ω0=0\cos\omega_0 = 0, so ω0=90∘\omega_0 = 90^\circ 12 hours of daylight every day
At an equinox (δ=0\delta = 0) cos⁡ω0=0\cos\omega_0 = 0, so ω0=90∘\omega_0 = 90^\circ 12 hours of daylight at every latitude
Latitude and declination on the same side of the equator cos⁡ω0<0\cos\omega_0 < 0, so ω0>90∘\omega_0 > 90^\circ More than 12 hours of daylight
Latitude and declination on opposite sides cos⁡ω0>0\cos\omega_0 > 0, so ω0<90∘\omega_0 < 90^\circ Less than 12 hours of daylight
−tan⁡ϕtan⁡δ<−1-\tan\phi\tan\delta < -1 No solution The Sun does not set
−tan⁡ϕtan⁡δ>1-\tan\phi\tan\delta > 1 No solution The Sun does not rise

Polar day and night

The last two rows can happen only at high latitudes. For positive angles, tan⁡ϕtan⁡δ>1\tan\phi\tan\delta > 1 is the same as ϕ>90∘−δ\phi > 90^\circ - \delta. Since δ\delta never exceeds 23.45°, the Sun can stay up or down all day only closer to the poles than about 66.5° north or south (90° minus 23.45°), in the regions of the midnight sun and polar night.

Day length versus latitude at the solstices and equinox0°10°20°30°40°50°60°70°80°90°04812162024Latitude (degrees north)Daylight (hours)about 66.5°June solstice (δ = +23.45°)Equinox (δ = 0°)December solstice (δ = −23.45°)Sun never setsSun never rises
Hours of daylight against latitude from N=215arccos⁡(−tan⁡φtan⁡δ)N = \tfrac{2}{15}\arccos(-\tan\varphi\tan\delta) with no refraction correction. At the solstices, when the Sun is farthest north or south (δ=±23.45∘\delta = \pm 23.45^\circ), day length reaches 24 h or 0 h at about 66.5∘66.5^\circ N, and at the equinox it stays at 12 h everywhere.

Derivation

The astronomical triangle

The equation comes from a triangle drawn on the celestial sphere, the imaginary sphere on which the Sun and stars appear. Its corners are the celestial pole PP (the point where Earth's axis, extended, meets the sky), the observer's zenith ZZ (the point straight overhead), and the Sun SS. It is called the astronomical triangle.[4][5]

The triangle's sides and one angle are known quantities:[4][5]

  • Side PZPZ is the colatitude, the angle from the pole to the zenith, equal to 90∘−ϕ90^\circ - \phi.
  • Side PSPS is the Sun's polar distance, the angle from the pole to the Sun, equal to 90∘−δ90^\circ - \delta.
  • Side ZSZS is the zenith distance, the Sun's zenith angle θz\theta_z.
  • The angle at PP, between the observer's meridian and the Sun's meridian, is the hour angle ω\omega.
Astronomical triangle on the celestial sphereZenith ZCelestial pole PSun S90° − φ90° − δθzωφNOEarth's axisHorizon
The astronomical triangle joins the celestial pole PP, the zenith ZZ and the Sun SS on the celestial sphere. Its sides are 90∘−φ90^\circ - \varphi, 90∘−δ90^\circ - \delta and θz\theta_z, and its angle at PP is the hour angle ω\omega.

Applying the law of cosines

The law of cosines of spherical trigonometry links a side aa to the other two sides bb, cc and the angle AA between them:[5]

cos⁡a=cos⁡bcos⁡c+sin⁡bsin⁡ccos⁡A\cos a = \cos b\cos c + \sin b\sin c\cos A

Take a=θza = \theta_z, b=90∘−ϕb = 90^\circ - \phi, c=90∘−δc = 90^\circ - \delta and A=ωA = \omega. Since cos⁡(90∘−x)=sin⁡x\cos(90^\circ - x) = \sin x and sin⁡(90∘−x)=cos⁡x\sin(90^\circ - x) = \cos x, this gives the zenith-angle formula:[4][2]

cos⁡θz=sin⁡ϕsin⁡δ+cos⁡ϕcos⁡δcos⁡ω\cos\theta_z = \sin\phi\sin\delta + \cos\phi\cos\delta\cos\omega

Setting the Sun on the horizon

When the Sun's center is on the horizon, θz=90∘\theta_z = 90^\circ and cos⁡θz=0\cos\theta_z = 0.[1] Solving for the hour angle gives:

cos⁡ω0=−sin⁡ϕsin⁡δcos⁡ϕcos⁡δ=−tan⁡ϕtan⁡δ\cos\omega_0 = -\frac{\sin\phi\sin\delta}{\cos\phi\cos\delta} = -\tan\phi\tan\delta

The division by cos⁡ϕcos⁡δ\cos\phi\cos\delta is why the formula needs that product to be nonzero.

Corrections for refraction and the solar disk

Why the basic equation is off

The basic equation misses two effects.

  • Official sunrise and sunset are the moments when the upper edge of the Sun's disk is on the horizon, not its center.[3]
  • Atmospheric refraction bends sunlight passing low through the air, which lifts the Sun's apparent position near the horizon.[6]

The U.S. Naval Observatory combines both effects into one fixed value. At sunrise or sunset the Sun's true center, ignoring refraction, is taken to be 50 arcminutes below the horizon (an arcminute, written ′, is 1/60 of a degree). That is the Sun's average apparent radius (16 arcminutes) plus the average refraction at the horizon (34 arcminutes).[3]

Atmospheric refraction at sunriseHorizon50′16′ radiusApparent SunRefraction lifts 34′True (geometric) positionnot to scale
At official sunrise the apparent upper edge of the Sun touches the horizon, so its center is 16′16' below it. Refraction of about 34′34' lifts the image, so the true center is 50′50' below the horizon. Angles are exaggerated and not to scale.

The general equation

The full form lets the Sun's center sit at any altitude h0h_0, the angle above or below the horizon, at the moment of rising or setting:[2][1]

cos⁡ω0=sin⁡h0−sin⁡ϕsin⁡δcos⁡ϕcos⁡δ\cos\omega_0 = \frac{\sin h_0 - \sin\phi\sin\delta}{\cos\phi\cos\delta}

For sunrise and sunset, h0=−50′≈−0.833∘h_0 = -50' \approx -0.833^\circ. NOAA writes the same thing as a zenith angle of 90.833°.[2][3] With h0=0h_0 = 0 the general equation reduces to the basic one.

The correction makes the day longer than the basic equation predicts. Alejandro Jenkins found that, for a Sun-center altitude of −0.85°, the added daylight is at least 7 minutes at every place outside the polar regions, on every date. It grows larger far from the equator and far from the equinoxes.[6]

As a result, even at an equinox the day from sunrise to sunset is a little longer than 12 hours.[6]

Twilight

The same general equation gives the start and end of twilight. Each kind uses a deeper position of the Sun's center below the horizon.[3]

Event Sun's center below horizon h0h_0 Zenith angle
Sunrise, sunset 50′ −0.833° 90.833°
Civil twilight 6° −6° 96°
Nautical twilight 12° −12° 102°
Astronomical twilight 18° −18° 108°

Accuracy and limits

Even the corrected equation predicts the event under ideal conditions. The standard calculation assumes:[3]

  • average air conditions;
  • a level, clear horizon;
  • an observer at sea level.

Real conditions differ in several ways.

  • Refraction varies with the weather. Even under ideal conditions, such as a clear sky at sea, computed times may be off by a minute or more.[3]
  • Mountains on the horizon and the observer's height can change the times even more. Routine calculations leave these out.[3]
  • Accuracy falls at high latitudes. There the Sun crosses the horizon at a shallow angle, so small changes in refraction shift the time by many minutes.[3]
  • Declination changes by up to about 0.4° per day.[1] More precise methods, such as NOAA's, therefore compute it from the hour of the day as well as the date.[2]

Testing against observations

Teresa Wilson's dissertation work at Michigan Tech compared predictions with 251 recorded sunrises and 514 sunsets.[7]

Models that used weather data did no better than the fixed 34-arcminute refraction value. She found that value cited as a standard as early as 1865.[7]

Wilson found that predictions are often off by 1 to 5 minutes. She concluded that sunrise and sunset times cannot be reliably predicted to better than 2 minutes.[7]

References

  1. Solar Engineering of Thermal Processes, 4th ed., John A. Duffie and William A. Beckman, Wiley, 2013.
  2. General Solar Position Calculations, NOAA Global Monitoring Laboratory, undated (accessed 2026).
  3. Rise, Set, and Twilight Definitions, U.S. Naval Observatory, undated (accessed 2026).
  4. Appendix H: Introduction to Principles of Astronomy, NOAA Global Monitoring Laboratory, undated (accessed 2026).
  5. Astronomical Triangle, University of British Columbia Mathematics 308 student project, undated (accessed 2026).
  6. The Sun's position in the sky, Alejandro Jenkins, arXiv, 2012.
  7. We Don't Really Know When the Sun Rises, Sky & Telescope, 2019.

Figure