How sunrise and sunset times are calculated
What exactly counts as sunrise, why the calculation uses 0.833° below the horizon, what refraction and elevation do, and how accurate the minutes you see really are.

A sunrise time looks like a simple fact, but behind every minute there is a precise definition and some physics. Here is how the times on Heliotempo are calculated, and what can make the real sunrise you see differ from the calculated one.
What counts as sunrise
By convention, sunrise is the moment when the upper edge of the sun’s disc appears on the horizon, and sunset is when the upper edge disappears. The horizon is assumed to be flat and at sea level, as at sea.
Two things mean that this happens when the sun’s centre is still below the geometric horizon:
- The sun’s size. The disc is about half a degree wide, so its upper edge is about 0.27° (16 arcminutes) above its centre.
- Atmospheric refraction. Air bends light downward as it enters denser layers, like a weak lens. Near the horizon this lifts the image of the sun by about 0.57° (34 arcminutes). You can see the sun even though, geometrically, it is still below the horizon.
Together that makes 0.833°: sunrise and sunset happen when the centre of the sun is 0.833° below the geometric horizon. This is the standard value used by the US Naval Observatory, many national almanacs and virtually all sunrise calculators.
The astronomy
To find the moment the sun’s centre reaches −0.833°, a calculator needs to know where the sun is at any moment. That means modelling:
- Earth’s orbit around the sun (an ellipse, disturbed slightly by the Moon and planets),
- the tilt of Earth’s axis and its slow wobble (precession and nutation),
- Earth’s rotation, including the tiny irregularities that make atomic time and Earth time drift apart (Delta T).
Heliotempo uses Astronomy Engine, an open-source library that reproduces the positions of the sun and planets to within about one arcminute, verified against the NOVAS software of the US Naval Observatory and NASA JPL’s Horizons system. An arcminute of the sun’s position corresponds to at most a few seconds of sunrise time at mid-latitudes. The site then searches for the exact moments when the sun crosses the required altitudes: −0.833° for sunrise and sunset, −6°, −12° and −18° for the three kinds of twilight, and +6° and −4° for golden hour.
We check the results against an independent implementation of the NOAA solar equations and against published almanac times; they agree within a minute for all tested places and dates. The methodology page has the details.
Why the real sunrise can differ
The calculated time is exact for its definition. The sunrise you actually see depends on your surroundings:
- Mountains and buildings. If the eastern horizon is a ridge 3° high, the sun appears roughly 15 to 25 minutes later than the calculated sunrise at mid-latitudes, depending on the season. In deep Alpine valleys the difference can be an hour or more.
- Elevation. From a mountaintop or a tall building you look down on the horizon, so the sun appears earlier and sets later. From 100 m above flat land or sea the gain is about one to two minutes at mid-latitudes; from 1,000 m, about five minutes or more.
- Unusual refraction. The 34 arcminutes of refraction is an average. Very cold air over warm water, or a strong temperature inversion, can change it noticeably, especially at high latitudes where the sun moves along the horizon slowly. Sunrise and sunset can then shift by a minute or more.
- Latitude. Near the poles the sun rises and sets at a very shallow angle, so tiny changes in refraction or horizon height shift the time by many minutes. Some days are right on the edge between midnight sun and a brief sunset.
Why times are rounded
Times are shown to the minute. Showing seconds would suggest a precision that the atmosphere does not allow. Our tables round to the nearest minute, so a time shown as 06:49 means the calculated moment falls between 06:48:30 and 06:49:29.
Frequently asked questions
Is sunrise when the sun is fully above the horizon?
No. Sunrise is the moment the upper edge of the sun first appears on a flat horizon, and sunset is the moment the upper edge disappears. That is why the calculation uses a point 0.833° below the horizon for the centre of the sun.
Why do different websites show slightly different times?
They may use different algorithms, round differently, include the observer's elevation or not, or use a slightly different refraction value. Differences of a minute are normal. Larger differences usually mean a different definition or location.
How accurate are sunrise and sunset times?
The astronomy itself is accurate to well under a minute. The real limit is the atmosphere, which bends light by slightly different amounts from day to day, and the shape of your horizon. In practice, expect about one to two minutes near the equator and mid-latitudes, and more near the poles.
Does elevation change sunrise time?
Yes. From a high point you can see over the curve of the Earth, so the sun appears earlier and disappears later. From 100 m above flat terrain the difference is about one to two minutes at mid-latitudes. Standard tables, including this site's, use a sea-level horizon.