Sunrise Sunset Calculator
Calculate accurate sunrise and sunset times for any location worldwide.
Location & Date
Daylight Information
Twilight Times
What Is the Sunrise and Sunset Calculator?
The Sunrise and Sunset Calculator computes the exact times of sunrise and sunset for any location on Earth (specified by latitude and longitude) on any date. It also calculates the total length of the day, solar noon (the moment the sun reaches its highest point), and related astronomical events like civil twilight.
Sunrise and sunset times vary dramatically by location and date. A location at the equator experiences roughly 12 hours of daylight year-round, while Fairbanks, Alaska (latitude 64.8°N) sees over 21 hours of daylight around the summer solstice and less than 4 hours in mid-December. The calculation uses solar geometry — specifically the hour angle formula — to find the angle at which the sun crosses the horizon at the observer's latitude.
The calculator accounts for the Equation of Time correction (the difference between apparent and mean solar time) and your longitude offset from the time zone center, giving a precise local clock time for sunrise and sunset at your specific coordinates.
Sunrise and Sunset Formula
Sunrise and sunset are computed by finding the hour angle at which the Sun's altitude equals 0° (the horizon), adjusted for refraction and the Sun's disk diameter.
Solar Hour Angle at Sunrise/Sunset
Where:
- lat= Observer latitude in radians (positive = north, negative = south)
- decl= Solar declination: 23.45° × sin((360/365) × (dayOfYear − 81) × π/180) — how far north/south of the equator the Sun is
- H= Solar hour angle in degrees: arccos(cosH) — angular distance from solar noon to sunrise/sunset
- EoT= Equation of Time correction in minutes: 9.87·sin(2B) − 7.53·cos(B) − 1.5·sin(B)
- solarNoon= 720 − 4 × longitude − EoT + timezone × 60 (minutes from midnight)
- sunsetMinutes= solarNoon + H × 4
Twilight and Daylight Types
| Event | Sun Altitude | Description |
|---|---|---|
| Astronomical twilight begins | −18° | Faintest stars visible; sky no longer fully dark |
| Nautical twilight begins | −12° | Horizon barely visible; navigation becomes possible |
| Civil twilight begins | −6° | Enough light for outdoor activities without artificial light |
| Sunrise / Sunset | 0° | Upper limb of Sun crosses the horizon |
| Solar Noon | Maximum | Sun reaches its highest point; due south (northern hemisphere) |
How to Use This Calculator
- Select a Date: Choose the date for which you want sunrise and sunset times.
- Enter Latitude and Longitude: Use decimal degrees (e.g., New York: 40.7128, −74.0060). Positive = north/east, negative = south/west.
- Set Timezone: Select your UTC offset (e.g., UTC−5 for Eastern Standard Time).
- Read Results: Sunrise, sunset, solar noon, day length, and twilight times are displayed in local time.
Real-World Applications
Photographers plan outdoor shoots around sunrise and sunset to capture golden hour light. Precise timing lets them arrive at locations before the best light and leave after it passes, maximizing the limited window of optimal illumination. The calculator helps plan weeks or months in advance for travel photography or time-lapse projects.
Farmers and agronomists use daylight hours to plan irrigation schedules, crop lighting supplements in greenhouses, and harvest timing. Some crops are sensitive to photoperiod (day length) — knowing the exact day length in a field at any date helps predict flowering and harvest windows.
Emergency services, construction projects, and outdoor event organizers use sunrise/sunset data to plan work windows, lighting schedules, and safety procedures. Knowing that sunset is at 16:42 in November tells a construction foreman exactly when to switch on site lighting.
Worked Examples
Sunrise in New York on June 21
Problem:
Find sunrise and sunset for New York (40.71°N, 74.01°W) on June 21, 2026.
Solution Steps:
- 1dayOfYear = 172; B = (360/365)×(172−81)×π/180 = 0.495 rad
- 2Solar declination = 23.45°×sin(0.495) ≈ 23.45°×0.474 ≈ 23.4° → decl = 0.409 rad
- 3cosH = −tan(40.71°×π/180) × tan(23.4°×π/180) = −0.862 × 0.433 = −0.373
- 4H = arccos(−0.373) ≈ 111.9°
- 5EoT ≈ −1.5 min; solarNoon = 720 − 4×(−74.01) − (−1.5) + (−5)×60 = 717.5 min
- 6Sunrise = 717.5 − 111.9×4 = 269.9 min ≈ 4:30 AM; Sunset = 717.5 + 447.6 = 1165 min ≈ 7:25 PM
Result:
New York on June 21: sunrise ≈ 4:30 AM, solar noon ≈ 11:58 AM, sunset ≈ 7:25 PM EST. Day length ≈ 14h 55m.
Polar Condition Check
Problem:
What happens when cosH > 1 (polar night) or cosH < −1 (midnight sun)?
Solution Steps:
- 1At latitude 70°N and solar declination −23.45° (winter solstice):
- 2cosH = −tan(70°) × tan(−23.45°) = −2.747 × (−0.434) = +1.19
- 3|cosH| > 1 → no solution → the Sun never rises at 70°N on the December solstice
- 4This is polar night — the sun stays below the horizon all day
Result:
At 70°N on the December solstice, cosH > 1 — polar night conditions. The Sun does not rise.
Solar Noon vs. Clock Noon
Problem:
Why is solar noon not at 12:00 PM?
Solution Steps:
- 1Solar noon = 720 − 4×longitude − EoT + timezone×60 minutes
- 2For Chicago (longitude −87.6, timezone UTC−6, EoT ≈ +2 min in late October):
- 3solarNoon = 720 − 4×(−87.6) − 2 + (−6)×60 = 720 + 350.4 − 2 − 360 = 708.4 min ≈ 11:48 AM
- 4Solar noon is 12 minutes before clock noon because Chicago is west of its time zone center (90°W)
Result:
Solar noon in Chicago in late October is approximately 11:48 AM CST — 12 minutes before clock noon.
Tips & Best Practices
- ✓Find your decimal latitude and longitude by right-clicking in Google Maps and selecting 'What's here?' — the coordinates appear at the bottom.
- ✓For photography, the golden hour starts at sunrise and lasts about 60 minutes; the evening golden hour begins about 60 minutes before sunset.
- ✓Solar noon is the best time for solar panels to produce maximum power — it's typically not exactly 12:00 PM due to longitude offset and the Equation of Time.
- ✓In summer at high latitudes (Norway, Alaska, Canada), civil twilight can last all night, making it never truly dark — plan night photography accordingly.
- ✓The 'equal day and night' myth: on the equinox, day length is slightly more than 12 hours due to atmospheric refraction — true 12-hour days occur a few days before the spring equinox and after the fall equinox.
- ✓Aviation weather briefings reference BMNT (Begin Morning Nautical Twilight) and EENT (End Evening Nautical Twilight) — these correspond to nautical twilight start and end in this calculator.
Frequently Asked Questions
Sources & References
- Solar Position Algorithm — NREL (2008)
- Sunrise/Sunset — NOAA (2024)
- Twilight — Wikipedia (2024)
Last updated: 2026-06-06
Help us improve!
How would you rate the Sunrise Sunset Calculator?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Standard Mathematical References
by Various