Sunrise & Sunset Calculator

Estimate sunrise, sunset (in UTC), and day length for six US cities or any latitude and longitude.

By Konstantin Iakovlev · Updated September 2026 · Source: U.S. Naval Observatory — Rise, Set, and Twilight Definitions

Sunrise (UTC)

11:20 AM

Sunset (UTC)

10:32 PM

Day Length

11.2h

Sun Times (approx UTC)

Sunrise11:20 AM
Solar Noon4:56 PM
Sunset10:32 PM
Day Length11.2 hours
Golden Hour AM12:20 PM
Golden Hour PM9:32 PM

Use the Sunrise & Sunset Calculator above to calculate your results. Enter your values and see instant results — all calculations run in your browser.

Disclaimer: This calculator is for informational purposes only. Results are estimates based on the information you provide and the assumptions described on this page.

How It Works

Pick one of six US cities (or enter a latitude and longitude) and a date, and you'll see approximate sunrise and sunset times along with the total span of daylight in between. Those times drive a lot of planning, from outdoor activities and photography to managing energy use.

The math is a short approximation. The calculator estimates the sun's declination from the day of the year as −23.45° × cos(360/365 × (day + 10)), finds the hour angle at which the center of the sun reaches a flat horizon at your latitude (cos H = −tan(latitude) × tan(declination)), and places solar noon at 720 − 4 × longitude minutes after midnight UTC. Sunrise and sunset are solar noon minus and plus 4 minutes per degree of hour angle. It leaves out the 50 arcminutes the U.S. Naval Observatory allows for atmospheric refraction and the sun's apparent radius, and it skips the equation of time, so its times can differ from almanac times by several minutes and its day length comes out a little short.

Raw astronomy can't see your horizon, so mountains and other local terrain may shift the sunrise or sunset you actually witness. Picking the wrong city or date is the easiest way to get a result that doesn't match reality, so confirm both inputs. The times are shown in Coordinated Universal Time (UTC), not your local time: subtract 4 hours for Eastern Daylight Time, 5 for Eastern Standard Time, 7 for Pacific Daylight Time, and so on.

Example: Sunrise and Sunset in Miami on the June Solstice

  1. 1 The June solstice falls on June 21, 2026 (08:24 UTC, per the U.S. Naval Observatory). Select Miami (25.76° N, 80.19° W) and enter 2026-06-21.
  2. 2 Declination: June 21 is day 172 of the year, so the calculator gets −23.45° × cos(360/365 × (172 + 10)) = 23.45°. Hour angle: cos H = −tan(25.76°) × tan(23.45°) = −0.2093, so H = 102.08°, or 408.33 minutes.
  3. 3 Solar noon = 720 + 4 × 80.19 = 1,040.76 minutes after midnight UTC (5:21 PM UTC). Sunrise = 1,040.76 − 408.33 = 632.43 minutes (10:32 AM UTC); sunset = 1,040.76 + 408.33 = 1,449.09 minutes (12:09 AM UTC the next day). Day length = 816.66 minutes, shown as 13.6 hours.
  4. 4 In Eastern Daylight Time (UTC−4) that is 6:32 AM and 8:09 PM. The Naval Observatory lists 6:30 AM and 8:15 PM for the same day, 13 hours 45 minutes of daylight; the gap comes from the refraction and equation-of-time terms the calculator leaves out.

Source: U.S. Naval Observatory — Rise, Set, and Twilight Definitions · Last updated: September 2026

Frequently Asked Questions

How do you calculate sunrise and sunset times?
Sunrise and sunset depend on your latitude, longitude, and the date. The calculator uses astronomical formulas accounting for Earth's axial tilt and orbital position to determine when the sun crosses the horizon.
What is the longest day of the year?
In the Northern Hemisphere, the summer solstice (around June 20-21) has the most daylight hours. Cities farther north get more daylight then: for June 21, 2026 the U.S. Naval Observatory lists about 16 hours for Seattle (5:12 AM to 9:11 PM) and 13 hours 45 minutes for Miami (6:30 AM to 8:15 PM). This calculator, which leaves out refraction, shows 15.8 and 13.6 hours.
What is civil twilight?
Civil twilight is the period when the sun is 0-6 degrees below the horizon. There is enough light for most outdoor activities without artificial lighting. Morning civil twilight starts before sunrise; evening civil twilight ends after sunset.