Sunrise Sunset Calculator
Calculate sunrise, sunset, golden hour, twilight, and daylight hours for any location and date.
Sunrise Sunset Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: Hour Angle = arccos((sin(-0.833°) - sin(lat) × sin(dec)) / (cos(lat) × cos(dec)))
Worked example — Sunrise: ~05:25, Sunset: ~20:31 (UTC) — approximately 15 hours of daylight
Formula
Hour Angle = arccos((sin(-0.833°) - sin(lat) × sin(dec)) / (cos(lat) × cos(dec)))
The sunrise/sunset hour angle is computed from the observer's latitude and the Sun's declination. The -0.833° accounts for atmospheric refraction (0.567°) and the Sun's apparent radius (0.266°). Solar declination is derived from the ecliptic longitude, which depends on the date via the solar mean anomaly and equation of center.
Worked Examples
Example 1: Summer Day in New York
Problem:Find sunrise and sunset for New York City (40.71°N, 74.01°W) on June 21.
Solution:Using solar position calculations: Solar declination ≈ +23.44° Hour angle ≈ 112.8° Sunrise ≈ 05:25 UTC (local 01:25 EDT → adjusted) Daylight ≈ 15.05 hours
Result:Sunrise: ~05:25, Sunset: ~20:31 (UTC) — approximately 15 hours of daylight
Example 2: Winter in London
Problem:Find sunrise and sunset for London (51.51°N, 0.13°W) on December 21.
Solution:Solar declination ≈ -23.44° At 51.5°N with negative declination, very short day Daylight ≈ 7.9 hours
Result:Sunrise: ~08:04, Sunset: ~15:53 (UTC) — approximately 7.9 hours of daylight
Frequently Asked Questions
How are sunrise and sunset times calculated?
Sunrise and sunset are calculated using the sun's position relative to the observer. The algorithm computes the Julian date, solar mean anomaly, equation of center, ecliptic longitude, solar declination, and hour angle. Sunrise occurs when the sun's center is 0.833° below the horizon (accounting for atmospheric refraction of 0.567° and the sun's apparent radius of 0.266°). These calculations use the NOAA solar position algorithm, accurate to within 1-2 minutes.
What is the golden hour in photography?
The golden hour is the period shortly after sunrise and before sunset when the sun is between 0° and 6° above the horizon. During this time, sunlight travels through more atmosphere, scattering blue wavelengths and producing warm, golden tones with soft shadows. The actual duration varies by latitude and season — near the equator it may last only 20-30 minutes, while at high latitudes it can last over an hour.
What are the different types of twilight?
Civil twilight (sun 0° to 6° below horizon): enough light for most outdoor activities without artificial lighting. Nautical twilight (6° to 12° below): the horizon is still visible at sea, stars are becoming visible. Astronomical twilight (12° to 18° below): sky is dark enough for most astronomical observations. Below 18°, it is full night.
Why do daylight hours change throughout the year?
Earth's rotational axis is tilted 23.44° relative to its orbital plane. As Earth orbits the Sun, this tilt causes different hemispheres to receive varying amounts of sunlight. At the summer solstice, your hemisphere is tilted toward the Sun, producing the longest day. At the equinoxes, day and night are approximately equal everywhere. The effect is more extreme at higher latitudes — the Arctic and Antarctic experience 24-hour daylight or darkness around the solstices.
What is the equation of time, and why is solar noon not at 12:00 on the clock?
The equation of time is the difference between apparent solar time, set by the Sun's actual transit of your meridian, and mean solar time, which ticks uniformly. It arises from two effects: Earth's orbital eccentricity of 0.0167, which makes the Sun appear to move faster along the ecliptic near perihelion, and the 23.44 degree obliquity, which projects that motion unevenly onto the celestial equator. The combined offset swings from roughly minus 14 minutes in February to plus 16 minutes in early November, so true solar noon drifts against the clock all year.
How do I convert the UTC times Sunrise Sunset Calculator returns into local clock time?
Add your standard time zone offset, then add another hour if daylight saving time is in force on that date. New York at UTC minus 5 becomes UTC minus 4 on eastern daylight time; Tokyo is UTC plus 9 year round. Because the calculation uses your longitude directly, the raw output is longitude-correct rather than zone-correct: a location at the western edge of a wide zone will legitimately show a much later clock sunrise than one at the eastern edge of the same zone.
At what latitude does the midnight sun begin, and why does the hour angle equation fail there?
The polar circles sit at 66.56 degrees, which is 90 minus the 23.44 degree obliquity. Poleward of that line the Sun's declination can keep it permanently above or below the horizon near a solstice, and the expression for cos H then falls outside the range minus one to plus one, so no rise or set solution exists. The calculator flags this as polar day or polar night. In practice refraction and the solar semidiameter push the observed midnight sun a fraction of a degree equatorward of the geometric circle.
How does observing from a high vantage point change the sunrise time?
Elevation lowers your visible horizon by the dip angle, which is roughly 1.93 arcminutes times the square root of your height in metres for the geometric case, slightly less once refraction is included. From 100 metres the horizon drops about 0.3 degrees, so the Sun clears it a couple of minutes earlier and sets a couple of minutes later at mid-latitudes. The standard sunrise convention assumes a sea-level horizon at zero elevation, so mountain and aircraft observations will always run ahead of the tabulated value.
What is the difference between the equinox and the day when daylight equals darkness?
The equinox is the instant the Sun's declination crosses zero, which by pure geometry would give twelve hours of daylight everywhere. Observed daylight is longer, because sunrise is defined at 0.833 degrees below the horizon rather than at zero, adding several minutes at each end. The date of genuinely equal day and night, sometimes called the equilux, therefore falls a few days before the March equinox and a few days after the September one, and the gap widens with latitude.
Why do observed sunrise times sometimes differ from the computed value by several minutes?
The 0.833 degree allowance bakes in a mean refraction of about 34 arcminutes measured under standard temperature and pressure. Real air departs from that constantly. Cold surface layers and temperature inversions bend light more strongly and can raise the Sun's image well before its geometric rise, while warm ground or low pressure does the opposite. Because the Sun crosses the horizon at a shallow angle at high latitudes, a small altitude error there translates into a large time error, which is why polar results degrade fastest.
References
Background & Theory
History
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer · Editorial policy
Related Calculators
🧮Space Mission Cost Calculator
Estimate space mission costs from payload mass, orbit, and launch vehicle selection.
🧮Space Suit Air Supply Calculator
Calculate breathable air supply duration for EVA from tank pressure, volume, and consumption rate.
🧮Blackbody Peak Wavelength Calculator
Calculate blackbody peak wavelength with inputs, formulas, and instant results.
🧮Parallax Distance Calculator
Calculate parallax distance with inputs, formulas, and instant results.
🧮Redshift Calculator
Calculate redshift with inputs, formulas, and instant results.
🧮Field of View Calculator
Calculate field of view with inputs, formulas, and instant results.
🧮Limiting Magnitude Calculator
Calculate limiting magnitude with inputs, formulas, and instant results.