📅 Daily Life
🌅 🌅 Sunrise & Sunset Calculator: How Daylight Hours Are Calculated
Learn how sunrise and sunset times are calculated from latitude and date. Covers daylight hours by location, the solstice effect, golden hour, and how to find your local sun times.
⏱️ 8 min read🦉 365tool.net🌍 For everyone worldwide
Sunrise and sunset times are not arbitrary — they follow precise astronomical mathematics driven by Earth's tilt, your latitude, and the time of year. The same location can have just 8 hours of daylight in December and 16 hours in June. Understanding why this happens, and how to calculate it, is useful for photography, travel planning, gardening, solar energy, outdoor activities, and simply knowing when to expect light and dark.
Why Sunrise and Sunset Times Change
Two factors drive variation in daylight hours:
- Earth's axial tilt (23.45°): Earth orbits the Sun tilted on its axis. This means the Northern Hemisphere leans toward the Sun in summer (more daylight) and away in winter (less daylight). The Southern Hemisphere experiences the opposite.
- Your latitude: The further from the equator you are, the more extreme the seasonal variation. The equator always gets close to 12 hours of daylight. The Arctic Circle gets 24 hours of daylight at the summer solstice and 24 hours of darkness at the winter solstice.
Daylight Hours by Latitude
| Location |
Latitude |
June Solstice |
Dec Solstice |
| Equator (Quito) | 0° | ~12.0 hrs | ~12.0 hrs |
| Miami, FL | 25.8°N | ~13.7 hrs | ~10.5 hrs |
| New York City | 40.7°N | ~15.1 hrs | ~9.1 hrs |
| London, UK | 51.5°N | ~16.7 hrs | ~7.7 hrs |
| Reykjavik, Iceland | 64.1°N | ~21.5 hrs | ~4.5 hrs |
| Arctic Circle | 66.5°N | 24 hrs (midnight sun) | 0 hrs (polar night) |
How the Calculation Works
Sunrise and sunset calculations use solar position geometry. The core formula involves the solar hour angle (H₀) — the angle from solar noon at which the Sun crosses the horizon:
cos(H₀) = (cos(90.833°) − sin(latitude) × sin(declination)) ÷ (cos(latitude) × cos(declination))
Where:
- 90.833° corrects for atmospheric refraction and the sun's angular size (without this, calculated times would be ~4 minutes off)
- Declination = the sun's angle above/below the celestial equator, which varies from +23.45° at the summer solstice to −23.45° at the winter solstice
- When |cos(H₀)| > 1, there is no real solution — this indicates polar night or midnight sun
Once H₀ is found, sunrise time = solar noon − H₀/15 hours, and sunset = solar noon + H₀/15 hours. (Earth rotates at 15° per hour.) The NOAA Solar Calculator, based on algorithms from Jean Meeus's Astronomical Algorithms, is the gold standard for precision within about 1 minute for latitudes below 72°.
Equinoxes and Solstices
- Summer Solstice (June 20–21, Northern Hemisphere): Longest day of the year. Sun reaches its maximum northward declination (+23.45°). After this, days shorten until the winter solstice.
- Winter Solstice (December 21–22, Northern Hemisphere): Shortest day. After this, days lengthen until summer solstice.
- Equinoxes (March 20, September 22–23): Day and night are nearly equal (approximately 12 hours each) everywhere on Earth. Sun rises due east and sets due west.
Golden Hour, Blue Hour, and Twilight Types
The period around sunrise and sunset produces distinctive lighting that photographers and outdoor enthusiasts track:
- Golden hour: Roughly the first and last hour of daylight. Light is warm, low-angled, and soft — ideal for portrait and landscape photography.
- Blue hour: The period just before sunrise and just after sunset when the sky is a deep blue. Technically "civil twilight" when the sun is 0–6° below the horizon.
- Civil twilight: Sun is 0–6° below horizon. Enough light for most outdoor activities without artificial lighting.
- Nautical twilight: Sun 6–12° below horizon. Horizon still visible at sea; good for navigation.
- Astronomical twilight: Sun 12–18° below horizon. Sky is dark enough for most astronomical observation.
Practical Applications
- Photography: Arrive 20–30 minutes before calculated sunrise to catch pre-dawn colors. For golden hour portraits, the first 45 minutes after sunrise and last 45 minutes before sunset give the most flattering light.
- Solar energy: Knowing daily sun hours is essential for sizing solar panel systems. Summer months at higher latitudes can produce 16+ hours of potential solar generation.
- Travel planning: A July trip to Iceland means near-24-hour daylight; a December trip to Scandinavia means just 4–6 hours. Planning outdoor activities requires knowing actual daylight.
- Gardening: Many plants require specific day-length conditions to flower (photoperiodism). Knowing your location's changing day length through the year helps predict bloom times.
❓ Frequently Asked Questions
Why do sunrise and sunset times change throughout the year?▼
Earth's axial tilt of 23.45° causes the Sun's apparent path across the sky to shift with the seasons. In summer, the Northern Hemisphere tilts toward the Sun, producing longer days. In winter, it tilts away, producing shorter days. The equator stays near 12 hours of daylight year-round; polar regions experience extreme variation, including 24-hour daylight and darkness.
How many hours of daylight does a location get at the summer solstice?▼
It depends entirely on latitude. The equator gets ~12 hours year-round. New York City (40.7°N) gets about 15.1 hours at the June solstice. London (51.5°N) gets about 16.7 hours. Reykjavik (64.1°N) gets about 21.5 hours. Above the Arctic Circle (66.5°N), the sun never sets — 24 hours of daylight, the "midnight sun."
What is the golden hour in photography?▼
Golden hour is roughly the first hour after sunrise and last hour before sunset. The sun's low angle at these times creates warm, soft, directional light with long shadows — ideal for portraits and landscapes. For the most accurate golden hour timing at your specific location and date, use a sunrise/sunset calculator that also shows solar elevation angles.
What is the difference between civil, nautical, and astronomical twilight?▼
Civil twilight: sun is 0–6° below horizon; enough light for outdoor activities. Nautical twilight: 6–12° below; horizon visible at sea for navigation. Astronomical twilight: 12–18° below; sky dark enough for most observation. After astronomical twilight ends, the sky reaches full darkness — ideal for stargazing and astrophotography.
Why does sunrise happen slightly before the mathematical prediction?▼
Two effects make sunrise appear earlier than geometric calculations: atmospheric refraction bends sunlight over the horizon by about 0.57°, making the sun visible before it geometrically rises. Additionally, we define sunrise as when the upper edge of the sun clears the horizon, not its center. Together, these add about 4–6 minutes of visible daylight. The standard sunset/sunrise calculation already corrects for this by using 90.833° instead of 90° in the formula.