What sunrise actually means, and why it is not geometric
Sunrise is defined as the instant the upper limb of the Sun first appears at the visible horizon, not the instant the centre of the Sun crosses the geometric horizon. Two effects separate those, and both push sunrise earlier and sunset later.
The first is the Sun's angular size. Its disc subtends about 32 arcminutes, so its upper edge reaches the horizon while the centre is still 16 arcminutes below. The second is atmospheric refraction: light entering the atmosphere at a grazing angle bends downward, lifting the apparent position of a body at the horizon by about 34 arcminutes under standard conditions. Add the two and the centre of the Sun sits 50 arcminutes — 0.833° — below the geometric horizon at the moment of sunrise. That is the number this calculator uses, and it is the value the NOAA solar calculator uses.
Those 0.833° are not a small correction. At the equator the Sun climbs at about 15° per hour, so the pair of effects adds roughly three and a half minutes to each end of the day — about seven minutes of day length, which is why day and night are not exactly equal at the equinox. At high latitudes the Sun's path is much shallower, so the same angular allowance can move sunrise by half an hour or more.
Refraction is the weak link in any sunrise prediction. The 34-arcminute figure is a standard-atmosphere average; on a cold morning with a strong temperature inversion, real refraction can exceed a degree, and mirages of the Sun rising several minutes early are routinely observed in polar regions. Quoting sunrise to the second is therefore false precision. To the minute is honest.
The formula, one variable at a time
Everything follows from one spherical-triangle relation. For an observer at latitude φ, the Sun at declination δ reaches altitude h₀ at the hour angle ω₀ satisfying cos ω₀ = (sin h₀ − sin φ sin δ) / (cos φ cos δ). Hour angle is measured in degrees from the meridian, so ω₀ is literally how far the Earth must rotate between solar noon and sunset.
Declination is the Sun's angular distance north or south of the celestial equator, swinging between +23.44° at the June solstice and −23.44° at the December solstice. This calculator computes it from the Sun's apparent ecliptic longitude via the geometric mean longitude, the equation of centre and the corrected obliquity, which is the NOAA chain and is good to a few arcseconds — far better than the refraction uncertainty. The solar declination calculator works through that chain on its own.
Solar noon in local clock minutes is 720 − 4λ − EoT + 60·tz. The 720 is midday in minutes; −4λ corrects for how far you sit from the zone's central meridian, at four minutes per degree; −EoT corrects for the fact that a sundial and a clock disagree by up to about a quarter of an hour depending on the date; and +60·tz converts from Greenwich to your civil zone. The equation of time calculator explains that term, which arises from the eccentricity of Earth's orbit and the tilt of its axis.
Sunrise and sunset are then simply noon ∓ 4ω₀, converting hour-angle degrees to minutes of time. When |cos ω₀| exceeds 1 there is no solution: the Sun's daily circle never crosses the altitude h₀, and you have polar day or polar night. This calculator detects that and says so rather than returning nonsense.
Worked example: day length at 45°N on the June solstice
Take an observer at latitude 45°N at sea level on 21 June, when the solar declination is at its maximum of about +23.44°.
- Horizon altitude. At sea level h₀ = −0.833°, so sin h₀ = −0.014538.
- Latitude terms. sin 45° = 0.707107 and cos 45° = 0.707107.
- Declination terms. sin 23.44° = 0.397766 and cos 23.44° = 0.917490.
- Numerator. −0.014538 − (0.707107 × 0.397766) = −0.014538 − 0.281279 = −0.295817.
- Denominator. 0.707107 × 0.917490 = 0.648754.
- Hour angle. cos ω₀ = −0.295817 / 0.648754 = −0.455977, so ω₀ = arccos(−0.455977) = 117.128°.
- Day length. 2 × 117.128 / 15 = 15.617 hours, which is 15 h 37 m.
Repeat with δ = −23.44° for the December solstice: the numerator becomes −0.014538 + 0.281279 = +0.266741, so cos ω₀ = 0.411159, ω₀ = 65.722° and the day length is 2 × 65.722 / 15 = 8.763 hours, or 8 h 46 m. The annual swing at 45°N is therefore 15.617 − 8.763 = 6.854 hours. Note that the two day lengths sum to 24.380 hours rather than 24: the excess of 0.380 h, about 23 minutes, is the refraction-and-semidiameter allowance counted once at each solstice.
Day length at the solstices and equinox by latitude
| Latitude (N) | June solstice | Equinox | December solstice | Annual swing |
|---|---|---|---|---|
| 0° | 12.12 h | 12.11 h | 12.12 h | 0.00 h |
| 10° | 12.71 h | 12.11 h | 11.54 h | 1.17 h |
| 20° | 13.34 h | 12.12 h | 10.92 h | 2.42 h |
| 30° | 14.08 h | 12.13 h | 10.21 h | 3.87 h |
| 40° | 15.01 h | 12.14 h | 9.32 h | 5.69 h |
| 45° | 15.62 h | 12.16 h | 8.76 h | 6.85 h |
| 50° | 16.37 h | 12.17 h | 8.07 h | 8.30 h |
| 60° | 18.87 h | 12.22 h | 5.87 h | 13.00 h |
| 66.5° | 24.00 h | 12.28 h | 2.24 h | 21.76 h |
| 75° | 24.00 h | 12.43 h | 0.00 h | 24.00 h |
Every cell is the same arccos evaluated at the three declinations, so you can reproduce any row on a scientific calculator. The equinox column creeps upward with latitude rather than staying at 12.11 h: with δ = 0 the numerator is fixed at sin(−0.833°), but the denominator still carries cos φ, so the refraction allowance buys more time the further you go from the equator.
How to read the result
Trust the times to about a minute at mid-latitudes and to several minutes above 66°, where the Sun's shallow approach magnifies every uncertainty in refraction. The algorithm itself is far more accurate than that; the atmosphere is the limiting factor, not the arithmetic.
Solar noon is rarely at 12:00, and the gap tells you two things at once. Part of it is your longitude offset from the zone's central meridian, worth four minutes per degree, and part is the equation of time, which swings from about −14 minutes in mid-February to about +16 minutes in early November. A location on the western edge of a wide time zone can see solar noon after 13:30 in summer with daylight saving applied.
The sunrise and sunset bearings are compass angles clockwise from true north, so 90° is due east and 270° due west. They are equal to 90° and 270° only at the equinoxes; in northern summer the Sun rises well north of east. Photographers and architects should note these are true bearings, not magnetic, so apply your local magnetic declination before using a hand compass.
Day length is the interval between the calculated sunrise and sunset, so it inherits the same −0.833° convention. It is not the interval of useful light: civil twilight adds a meaningful working period at each end, and at high latitudes that period can be hours long. The twilight times calculator gives those thresholds, and the daylight hours calculator compares day length across dates.
Assumptions and limits
- Standard refraction is assumed. The 34-arcminute allowance is a mean value; temperature inversions can shift real sunrise by minutes, and by far more inside the polar circles.
- The horizon is assumed unobstructed and level. A hill, building or mountain ridge to your east delays sunrise, sometimes by an hour, and no coordinate-based calculation can know about it.
- The elevation correction models a sea horizon. The dip formula 0.0347√h degrees applies when you can see the true horizon; on land, terrain usually intervenes.
- No daylight saving is applied. Enter the UTC offset actually in force on that date, including the summer hour if relevant.
- Times are quoted to the minute. Anything finer is not physically meaningful given the refraction uncertainty.
- Polar cases return a state, not a time. Where the Sun never reaches −0.833°, the calculator reports that it stays up or stays down rather than inventing a time.
Where the algorithm comes from
The chain used here — geometric mean longitude, mean anomaly, equation of centre, apparent longitude, corrected obliquity, declination and equation of time — is the low-precision solar position method set out in Jean Meeus's Astronomical Algorithms and implemented in the NOAA Global Monitoring Laboratory's solar calculator spreadsheets. NOAA states that its accuracy for sunrise and sunset is within about a minute for latitudes below 72°, degrading beyond that because of the shallow solar path and refraction variability. Nothing here uses a proprietary or undocumented model.
Related calculations and when to use them
Use this calculator when you want clock times for a specific place and date. When you care about how much daylight there is rather than when it starts, the daylight hours calculator gives day length and the day-over-day change, which is what growers managing photoperiod actually need. When you need the low-light windows, the twilight times calculator handles the −6°, −12° and −18° thresholds along with the golden and blue hour.
For shadow work — solar access studies, panel siting, film scheduling — the sun shadow length calculator converts solar altitude to shadow length at any time of day, and the sundial hour line angle calculator lays out a dial for a given latitude. The equation of time calculator is the tool for reconciling a sundial reading against a clock.
Two things this page cannot do for you. It cannot account for terrain, so in a valley you should measure the real horizon altitude and treat that as your h₀. And it will not tell you the offset in force on a historical date; for that, check the zone rule and enter the correct offset yourself, using the time zone converter if you need to move the result into another zone afterwards.
Key terms
- Hour angle
- The angle through which the Earth must turn to bring an object to the local meridian, measured in degrees. Fifteen degrees is one hour.
- Declination
- The angular distance of the Sun north or south of the celestial equator, varying between ±23.44° over the year.
- Equation of time
- Apparent solar time minus mean solar time, ranging from about −14 to +16 minutes, caused by orbital eccentricity and axial tilt.
- Horizon dip
- The angle by which the visible sea horizon falls below the geometric horizontal when you are above sea level, about 0.0347√h degrees for h in metres.
- Azimuth
- A compass bearing measured clockwise from true north: 0° north, 90° east, 180° south, 270° west.
