How We Calculate Sunrise, Sunset and Moon Times
This page describes how SunriseAlmanac calculates every time and date it publishes. It is intended as the canonical reference for our figures, and it may be cited as such.
Data sources
All astronomical figures are computed on our server at request time or in advance; none are copied from third-party tables. The algorithms come from Jean Meeus, "Astronomical Algorithms", 2nd edition (Willmann-Bell, 1998):
- Sun: solar coordinates from chapter 25, the same formulation used by the NOAA Solar Calculator.
- Moon: lunar position from chapter 47, using the full set of periodic terms for longitude, latitude and distance.
- Moon phases: the times of new moon, first quarter, full moon and last quarter from chapter 49.
- Equinoxes and solstices: chapter 27, including the periodic correction terms.
City names, coordinates, populations and time zone assignments come from GeoNames. Geographical data is provided by GeoNames (https://www.geonames.org/) under a Creative Commons Attribution 4.0 License. Time zone offsets and daylight saving rules come from the IANA time zone database (often called the tz or Olson database), the standard used by most operating systems.
Sunrise and sunset
Sunrise and sunset are the moments when the upper limb (top edge) of the sun touches the horizon. Because the atmosphere bends light, the sun is visible when it is geometrically slightly below the horizon. We apply the standard correction: 34 arcminutes for atmospheric refraction plus 16 arcminutes for the sun's apparent radius. Sunrise and sunset are therefore the times when the centre of the sun is at an altitude of −0.833°.
Solar noon is the moment the sun crosses the local meridian and reaches its highest point of the day. Day length is the interval between sunrise and sunset.
Twilight
Twilight is defined by how far the centre of the sun is below the horizon:
- Civil twilight: sun between −0.833° and −6°. Morning civil twilight begins at −6° (first light); evening civil twilight ends at −6° (last light).
- Nautical twilight: sun between −6° and −12°.
- Astronomical twilight: sun between −12° and −18°. Below −18° the sky is fully dark.
Golden hour and blue hour
Golden hour and blue hour have no official astronomical definition, so we state ours precisely:
- Golden hour: the sun's centre is between +6° and −4° altitude. In the evening it starts when the sun descends to +6° and ends when it reaches −4°; in the morning the order is reversed.
- Blue hour: the sun's centre is between −4° and −6° altitude, immediately before morning golden hour and immediately after evening golden hour.
Despite the names, neither period lasts exactly an hour. Near the equator they are short; at high latitudes, especially near the summer solstice, they can last much longer, and in some places golden hour does not end at all.
Moonrise, moonset and phases
Moonrise and moonset are the moments when the upper limb of the moon touches a sea-level horizon. Because the moon is close to Earth, its parallax (up to about 1°) is significant and changes through the month. We therefore use a variable threshold: the moon's centre is at an altitude of 0.7275 × horizontal parallax − 0.5667°, which accounts for parallax, the moon's apparent radius and standard refraction.
The moon rises on average about 50 minutes later each day, so on roughly one day each month there is no moonrise, and on another there is no moonset. On those days the page states that there is no moonrise or no moonset.
The four principal phases are computed as instants in Universal Time (UTC) and then converted to each city's local time. A full moon that occurs late on one date in UTC may fall on the following date in Australia or New Zealand, or on the previous evening in North America. The illuminated fraction shown for a given day is calculated from the geometry of the sun, moon and Earth.
Full moons are labeled with their traditional North American names (Wolf, Snow, Worm, Pink, Flower, Strawberry, Buck, Sturgeon, Corn or Harvest, Hunter's, Beaver and Cold). The Harvest Moon is the full moon closest to the September equinox. These names reflect northern hemisphere seasons and are given for interest only.
We describe a full moon as a supermoon when the moon is closer than about 361,900 km from Earth's centre at the moment of full moon. Definitions of "supermoon" vary between sources, so other publications may label a slightly different set of full moons.
Equinoxes and solstices
The March and September equinoxes and the June and December solstices are computed as instants in UTC using Meeus chapter 27 and shown in local time for each city and country. Because of time zone differences, the local date of an event can differ from the UTC date. Our solstices and equinoxes page lists them for each year.
Time zones and daylight saving
Every city is assigned an IANA time zone (for example America/Denver or Australia/Brisbane). All times are converted to the local clock time in force on that date, so daylight saving time is applied automatically where and when it is observed, and not applied where it is not, such as Arizona (outside the Navajo Nation), Hawaii, Queensland, Western Australia, the Northern Territory and most of Saskatchewan.
"Today" on a city page always means the current date in that city, not the date on the server or in your own time zone. Shortly after midnight in Sydney, for example, the Sydney page already shows the new day while a Los Angeles page still shows the previous one.
On the day the clocks change, day length is still the true interval between sunrise and sunset; it is not distorted by the one-hour shift.
Accuracy and limits
Times are rounded to the nearest minute. The algorithms are accurate to well under a minute for the sun and typically within a minute for the moon. The observed time at a given spot can still differ by a few minutes because of conditions the calculation cannot know:
- Refraction: the standard correction assumes average temperature and pressure. Unusually cold air, temperature inversions or mirage conditions can shift the visible sunrise or sunset by a minute or more, and occasionally much more at high latitudes.
- Terrain: we assume a flat, sea-level horizon. Mountains, hills, buildings or trees will make the sun appear to rise later and set earlier.
- Elevation: no elevation adjustment is applied. An observer high above the surrounding land sees a lower horizon, so the sun rises slightly earlier and sets slightly later than listed.
- Location within a city: each place is represented by one coordinate. In large cities, times at the eastern and western edges can differ from the listed time by a minute or so.
Polar day and polar night. At high latitudes the sun may stay above or below the horizon all day. In that case the page says that the sun does not set, or does not rise, instead of showing a time. The same applies to twilight: across much of the UK, Ireland and Canada in early summer, the sun never gets 18° below the horizon, so astronomical twilight lasts all night and no "full darkness" time is shown.
Sunsets after midnight. Where daylight saving time and a high latitude combine, as in Fairbanks, Alaska, around the June solstice, the sun can set after midnight. Such a sunset is listed on the evening it belongs to rather than on the following calendar date.
Corrections
If you believe a time, place or time zone is wrong, please write to hello@sunrisealmanac.com or use the contact page. Include the page address, the date, the figure you expected and the source you compared it with. We check every report against independent references and correct confirmed errors.