How Sunrise and Sunset Are Calculated
No one measures sunrise with a stopwatch and a horizon. Modern sunrise and sunset times are *computed* — derived from the Earth's geometry, the sun's position, and a couple of centuries of astronomical refinement. The results are accurate to within a minute or two for most purposes. Here's what's actually going on behind the numbers on WorldTimeWise's sun page.
What "sunrise" technically means
Sunrise is not the moment the sun's center crosses the horizon. By convention, sunrise is the moment the upper edge (upper limb) of the sun's disk appears at the horizon, and sunset is the moment the upper limb disappears.
Two corrections are folded into this definition:
- The sun has apparent size. The sun's disk spans about half a degree of sky (roughly 0.53°). The center is still below the horizon when the top edge first peeks over it.
- Atmospheric refraction bends light. The Earth's atmosphere refracts sunlight, making the sun appear higher than its true geometric position — by about 0.57° near the horizon. This is why you can see the sun for a few minutes after it has geometrically set.
Combined, these mean sunrise and sunset are computed for the sun's center at about 0.833° below the geometric horizon (0.2666° for the sun's radius plus roughly 0.5667° for refraction). That single number — −0.833° — is the standard "sunrise angle" used worldwide.
The solar position algorithm
To find when the sun reaches that angle at your location, you need to know where the sun is in the sky at any given moment. That comes from a solar position algorithm — a set of standard astronomical formulas that compute, from the date and time:
1. The sun's declination — its angle north or south of the celestial equator, which swings between +23.44° and −23.44° over the year (this is what causes the seasons).
2. The equation of time — the difference between clock time and true solar time, caused by the Earth's elliptical orbit and axial tilt. It varies by up to about ±16 minutes over the year, which is why solar noon drifts relative to 12:00.
3. The hour angle — how far the sun is from its highest point, which combined with your latitude and the sun's declination gives the sun's altitude above the horizon.
The widely used formulas (in the tradition of the US Naval Observatory's calculations and popularized for programmers by NOAA's solar calculator) then solve for the times when the sun's altitude equals −0.833°. Iterate over the day in small steps, find the crossings, convert from solar time to clock time using your longitude and time zone — and you have sunrise and sunset.
WorldTimeWise uses this standard approach: no lookup tables, just the formulas, typically accurate within a minute at moderate latitudes.
Why times vary by latitude and season
Two things control your sunrise and sunset times: where you are and where the Earth is in its orbit.
Latitude determines how steeply the sun's path crosses the horizon. Near the equator, the sun rises almost vertically, so it pops above the horizon quickly — twilight is short and day length barely changes through the year (roughly 12 hours of daylight year-round at the equator). At high latitudes, the sun's path meets the horizon at a shallow angle, so sunrise and sunset are drawn-out affairs, and day length swings wildly: long summer days, short winter days.
Season (the sun's declination) determines how far north or south the sun rises and how high it climbs. In the Northern Hemisphere's summer, the sun's northerly declination means it rises north of east, climbs high, and sets north of west — a long day. In winter the reverse: it rises south of east, stays low, and sets early.
Longitude matters too, in a subtler way: within a single time zone, sunrise comes earlier in the east. Two cities in the same zone can differ by an hour or more in sunrise time (compare eastern and western Spain, both on Central European Time).
Polar day and polar night
Above the Arctic Circle (66.5°N) and below the Antarctic Circle (66.5°S), the geometry breaks the normal pattern. In summer, the sun's declination is so far toward the pole that at some latitudes the sun never dips 0.833° below the horizon — polar day (the midnight sun). In winter, it never rises that high — polar night.
These aren't gradual: at the North Pole itself, the sun rises once a year (around the March equinox) and sets once (around the September equinox). At 70°N (northern Norway), expect roughly two months of midnight sun and two months of polar night. A well-built calculator doesn't return an error or a nonsense time for these dates — it reports "no sunrise" or "no sunset" plainly, which is the correct answer.
Twilight: the three kinds
After sunset (or before sunrise), the sky doesn't go instantly dark. The sun continues to illuminate the upper atmosphere, and the fading glow is classified by how far below the horizon the sun's center has sunk:
- Civil twilight (sun 0–6° below horizon): the brightest phase. There is still enough light for most outdoor activities without artificial lighting. This is why "sunset" in everyday speech often feels like it includes the next half hour — civil twilight is the afterglow.
- Nautical twilight (6–12° below horizon): the horizon at sea is still visible enough for celestial navigation (hence the name), but streetlights are on and the brighter stars appear.
- Astronomical twilight (12–18° below horizon): the sky is dark enough for most astronomical observation. Beyond 18°, it is full night.
At high latitudes in summer, the sun may never sink past 6° or even past 0° below the horizon — which is why Scandinavian summer nights never get fully dark. These are the famous "white nights": not polar day, but a twilight that never ends.
Accuracy and limitations
Computed sunrise/sunset times assume a flat, unobstructed horizon at sea level. In reality:
- Elevation lets you see slightly farther — sunrise comes a touch earlier on a mountaintop.
- Terrain (mountains to the east) delays visible sunrise; a city in a valley sees the sun later than the computed time.
- Weather — clouds, haze, and pollution — affects when you actually *see* the sun, though not the computed geometric time.
- Refraction varies with temperature and pressure. The standard 0.5667° is an average; on unusually cold days the bending is stronger and the sun appears slightly earlier.
For most everyday purposes — planning photography, knowing when it gets dark, scheduling outdoor work — the computed times are accurate to within a couple of minutes. If you need precision for surveying or navigation, use a tool that accounts for your exact elevation and local horizon.
The short version
Sunrise and sunset are computed, not observed: standard astronomical formulas find when the sun's upper edge crosses −0.833° below the horizon (accounting for the sun's size and atmospheric refraction). Latitude and season shape the results; near the poles the sun may not rise or set at all; and the fading light after sunset comes in three stages — civil, nautical, and astronomical twilight. Check today's times for your city on the sun page.