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.
It is formulated as: where: The Earth rotates at an angular velocity of 15°/hour.
is in degree, gives the interval of time in hours from sunrise to local solar noon or from local solar noon to sunset.
The sign convention is typically 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 at the vernal and autumnal equinoxes when the sun is exactly above the equator, positive during the Northern Hemisphere summer and negative during the Northern Hemisphere winter.
North of the Arctic Circle or south of the Antarctic Circle, there is at least one day of the year with no sunrise or sunset.
For locations outside these latitudes, it is either 24-hour daytime or 24-hour nighttime.
In the equation given at the beginning, the cosine function on the left side gives results in the range [-1, 1], but the value of the expression on the right side is in the range
in the format of Fortran 90 is as follows: omegao = acos(max(min(-tan(delta*rpd)*tan(phi*rpd), 1.0), -1.0))*dprwhere omegao is
in degree, rpd is equal to
The above expression gives results in degree in the range
, it means it is polar night, or 0-hour daylight; when
, it means it is polar day, or 24-hour daylight.
is the corresponding sunrise hour angle that has a negative value, and similarly,
is the same latitude but in Southern Hemisphere, which means
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
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 with the altitude angle (a) of the center of the solar disc set to about −0.83° (or −50 arcminutes).
The above general equation can be also used for any other solar altitude.
The NOAA provides additional approximate expressions for refraction corrections at these other altitudes.
[1] There are also alternative formulations, such as a non-piecewise expression by G.G.
Naval Observatory's "Vector Astronomy Software".
[2] The generalized equation relies on a number of other variables which need to be calculated before it can itself be calculated.
These equations have the solar-earth constants substituted with angular constants expressed in degrees.
where: where: where: where: where: where: where: Alternatively, the Sun's declination could be approximated [4] as: where: This is the equation from above with corrections for atmospherical refraction and solar disc diameter.
where: For observations on a sea horizon needing an elevation-of-observer correction, add
This corrects for both apparent dip and terrestrial refraction.
For example, for an observer at 10,000 feet, add (−115°/60) or about −1.92° to −0.833°.