Sunrise Sunset Calculator
Calculate sunrise, sunset, and daylight hours for any location and date on Earth. Enter values for instant results with step-by-step formulas.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
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.
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.
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.