The sunrise equation or sunset equation can be used to derive the time of sunrise or sunset for any solar declination and latitude in terms of local solar time when sunrise and sunset actually occur.
The time at which a celestial object crosses the horizon can be calculated by converting its coordinates from the equatorial coordinate system to the horizontal coordinate system, and then solving the equation for an altitude of zero. We then obtain
where:
This gives the geometric rise or set time (ignoring refraction) of the center of the Sun. See below for an equation which accounts for these effects.
The Earth rotates at an angular velocity of 15ð/hour. Therefore, the expression , where is in degrees, gives the interval of time in hours from sunrise to local solar noon or from local solar noon to sunset.
The sign convention is that the observer latitude is 0 at the equator, positive for the Northern Hemisphere and negative for the Southern Hemisphere, and the solar declination is 0 when the Sun is exactly above the equator, positive during the Northern Hemisphere summer and negative during the Northern Hemisphere winter.The declination of the Sun is nearly, but not exactly, zero at the equinoxes.
The equation has no solution when . This occurs north of the Arctic Circle or south of the Antarctic Circle, during the polar night, when the Sun is not visible above the horizon at local midday.
Suppose is a given latitude in Northern Hemisphere, and is the corresponding sunrise hour angle that has a negative value, and similarly, is the same latitude but in Southern Hemisphere, which means , and is the corresponding sunrise hour angle, then it is apparent that
which means
The above relation implies that on the same day, the lengths of daytime from sunrise to sunset at and sum to 24 hours if , and this also applies to regions where polar days and polar nights occur. This further suggests that the global average of length of daytime on any given day is 12 hours without considering the effect of atmospheric refraction.
The equation above neglects the influence of atmospheric refraction (which lifts the solar disc â i.e. makes the solar disc appear higher in the sky â by approximately 0.6ð when it is on the horizon) and the non-zero angle subtended by the solar disc â i.e. the apparent diameter of the sun â (about 0.5ð). The times of the rising and the setting of the upper solar limb as given in astronomical almanacs correct for this by using the more general equation
where is the geometric altitude angle of the center of the Sun at the time of rising or setting, which is approximately âÂÂ0.833ð or âÂÂ50.0 arcminutes, although the exact figure depends on atmospheric conditions along the line of sight.
This equation, as given by Jean Meeus, can be also used for any other solar altitude. The NOAA provides additional approximate expressions for refraction corrections at these other altitudes. There are also alternative formulations, such as a non-piecewise expression by G.G. Bennett used in the U.S. Naval Observatory's "Vector Astronomy Software".
The dip of the horizon in radians, including refraction and the geometric correction for the observer's height above the apparent horizon, is well approximated by
where h is the height of the observer, is the radius of the Earth, and k is the ratio of the ray's curvature to the radius of the Earth. For a typical value of k of 0.17, this gives
or
where the prime () indicates arcminutes, i.e. 1/60 ð. This should be subtracted from the altitude angle. In summary, at sunrise or sunset:
where s is the semidiameter of the Sun, about 16 arcminutes.
To calculate the time of the sunrise in Universal Time, Meeus recommends the following procedure. The position of the Sun in equatorial coordinates should first be calculated or looked up for the day of interest. For the day D, find:
Calculate the approximate time of the sunset using
Calculate the transit, sunrise and sunset time in fractions of a day:
where L is the geographical longitude expressed as an angle increasing westwards from Greenwich, i.e. the opposite sign convention than is typically used in geography.
These values of m can be multiplied by 24 to give the time of each event in hours, accurate to about ñ0.01 days (14 minutes). For greater accuracy, the elevation angle of the Sun should be calculated at the proposed time, and then an adjustment applied to bring it to the desired elevation. The adjustment is:
where
The final time is then .
With modern ephemeris software like Skyfield, it's simpler and more precise to iteratively recompute the position of the Sun until the desired elevation angle is found. However, without knowledge of the temperature profile of the atmosphere, accuracy is limited to about two minutes.