Sunrise Sunset Calculator

Calculate accurate sunrise and sunset times for any location worldwide.

Location & Date

🌅
Sunrise
4:45 AM
🌇
Sunset
7:19 PM

Daylight Information

14h 34m
Daylight Duration
12:02 PM
Solar Noon

Twilight Times

Civil Dawn4:08 AM
Civil Dusk7:56 PM

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

cosH = −tan(lat) × tan(decl); sunriseMinutes = solarNoon − H × 4

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 / SunsetUpper limb of Sun crosses the horizon
Solar NoonMaximumSun reaches its highest point; due south (northern hemisphere)

How to Use This Calculator

  1. Select a Date: Choose the date for which you want sunrise and sunset times.
  2. Enter Latitude and Longitude: Use decimal degrees (e.g., New York: 40.7128, −74.0060). Positive = north/east, negative = south/west.
  3. Set Timezone: Select your UTC offset (e.g., UTC−5 for Eastern Standard Time).
  4. 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:

  1. 1dayOfYear = 172; B = (360/365)×(172−81)×π/180 = 0.495 rad
  2. 2Solar declination = 23.45°×sin(0.495) ≈ 23.45°×0.474 ≈ 23.4° → decl = 0.409 rad
  3. 3cosH = −tan(40.71°×π/180) × tan(23.4°×π/180) = −0.862 × 0.433 = −0.373
  4. 4H = arccos(−0.373) ≈ 111.9°
  5. 5EoT ≈ −1.5 min; solarNoon = 720 − 4×(−74.01) − (−1.5) + (−5)×60 = 717.5 min
  6. 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:

  1. 1At latitude 70°N and solar declination −23.45° (winter solstice):
  2. 2cosH = −tan(70°) × tan(−23.45°) = −2.747 × (−0.434) = +1.19
  3. 3|cosH| > 1 → no solution → the Sun never rises at 70°N on the December solstice
  4. 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:

  1. 1Solar noon = 720 − 4×longitude − EoT + timezone×60 minutes
  2. 2For Chicago (longitude −87.6, timezone UTC−6, EoT ≈ +2 min in late October):
  3. 3solarNoon = 720 − 4×(−87.6) − 2 + (−6)×60 = 720 + 350.4 − 2 − 360 = 708.4 min ≈ 11:48 AM
  4. 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

Sunset time varies because Earth's axis is tilted 23.5° relative to its orbital plane. As Earth orbits the Sun, the Northern Hemisphere tilts toward the Sun in summer (longer days, later sunsets) and away in winter (shorter days, earlier sunsets). Near the summer solstice in the Northern Hemisphere, sunset can be as late as 9–10 PM at mid-latitudes; near the winter solstice, it can occur before 4 PM. The variation is greatest at higher latitudes and minimal near the equator.
The light visible before sunrise (dawn) and after sunset (dusk) is called twilight, caused by sunlight scattering through Earth's atmosphere even when the Sun is below the horizon. Civil twilight (Sun 0° to 6° below horizon) is bright enough for outdoor activities. Nautical twilight (6° to 12°) is dim but the horizon is visible for navigation. Astronomical twilight (12° to 18°) is barely perceptible. Only when the Sun is more than 18° below the horizon is the sky truly dark for astronomy.
Yes — observers at higher elevations see the Sun rise slightly earlier and set slightly later than those at sea level, because their higher vantage point gives them a more extended view of the horizon. The effect is about 1 minute earlier per 1,500 meters (5,000 feet) of elevation. This calculator uses sea-level calculations; for high-altitude locations (mountain peaks, aircraft), a small additional correction would apply.
Each time zone is centered on a standard meridian (e.g., Eastern Time is centered on 75°W). Locations east of this meridian experience solar noon earlier than 12:00 PM, and those west experience it later. For example, a location at 80°W in the Eastern time zone (centered at 75°W) experiences solar noon 20 minutes later than 12:00 PM (5° × 4 min/degree = 20 min). This longitude correction, combined with the Equation of Time, gives the precise solar noon and sunrise/sunset times.
Yes — the calculator works for any latitude between −90° and +90° and any longitude. Near the poles (above ~66.5°), the calculator may indicate midnight sun or polar night conditions at certain times of year, where no sunrise or sunset occurs. The calculator correctly identifies these conditions instead of returning invalid times.

Sources & References

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.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.

Privacy choices

MyCalcBuddy uses necessary storage for the site to work. Optional analytics, notifications, and future advertising features stay off unless you allow them.