Skip to content
DigitalHorology
All guides

Field guide / HelioKron

How Are Sunrise and Sunset Times Calculated?

How date, latitude, longitude, Earth’s tilt, the solar disk, and atmospheric refraction determine sunrise and sunset times.

Illustration for How Are Sunrise and Sunset Times Calculated?

Sunrise and sunset tables begin with astronomy, then add a practical definition of what an observer sees at the horizon. The calculation needs a date and location, models Earth’s orientation relative to the Sun, and accounts for the Sun’s apparent size and average atmospheric refraction.

The inputs: date, latitude, and longitude

Earth rotates from west to east, so longitude largely determines when a place turns toward or away from the Sun. Latitude determines the angle at which the Sun crosses the local horizon and how strongly day length changes through the year. The date locates Earth in its orbit and therefore gives the Sun’s apparent declination—the angular distance north or south of the celestial equator.

A time zone converts the astronomical result into local clock time. It does not change when the event occurs. Daylight saving time is a civil adjustment added after the physical event has been calculated.

From the Sun’s position to a local hour

An algorithm first calculates the Sun’s apparent position for the date. Using the observer’s latitude and the Sun’s declination, spherical astronomy gives the hour angle at which the Sun reaches the chosen horizon altitude. Local solar noon anchors that angle in time. One crossing on the eastern side gives sunrise; the corresponding western crossing gives sunset.

This is why there is no single sunrise time for a whole time zone. Places farther east generally see the event earlier, while latitude and season change both the time and the length of daylight. Near the polar circles, the equation may have no crossing at all on a given date because the Sun remains above or below the horizon.

What counts as sunrise?

Sunrise is conventionally the moment the upper edge of the Sun appears at an ideal, unobstructed horizon; sunset is when that upper edge disappears. The U.S. Naval Observatory defines the calculation using the Sun’s center at a geometric zenith distance of 90.8333 degrees—50 arcminutes below the horizon.

Those 50 arcminutes combine about 16 arcminutes for the Sun’s apparent radius with about 34 arcminutes for average atmospheric refraction. Refraction bends sunlight through the atmosphere, allowing us to see the Sun while it is geometrically below the horizon.

Why the observed time can differ

Published times assume average atmospheric conditions, sea level, and a level unobstructed horizon. Actual temperature and pressure change refraction. Mountains, trees, and buildings delay the first visible sunrise or advance the disappearance at sunset. An elevated observer can see a more distant horizon and may see sunrise earlier and sunset later.

The Naval Observatory notes that even under ideal conditions a calculation may differ from observation by a minute or more. At high latitudes, where the Sun crosses the horizon at a shallow angle, refraction and terrain can shift the observed time by many minutes. A “precise” value is therefore a well-defined astronomical convention, not a promise about the view from every window.

Twilight uses different solar angles

Civil, nautical, and astronomical twilight end when the Sun’s center is respectively 6, 12, and 18 degrees below the geometric horizon. These are separate events from sunset. They describe progressive levels of darkness useful for ordinary outdoor activity, navigation, and astronomical observation.

How HelioKron uses the calculation

HelioKron receives time and location from GPS, calculates local sunrise and sunset, and turns the changing daylight into color and pattern. Because both date and coordinates are known automatically, the display follows seasonal change and can establish itself in a new location without an app or Wi-Fi setup. Optional chimes mark the approach to sunset, while the illuminated face keeps the day’s solar rhythm visible between the two events.