b2KIT

Sunrise & Sunset Calculator

Calculate sunrise, sunset, golden hour, and blue hour times for any location and date.

Tested tool guide Tested browser tools Checked August 16, 2026

What Sunrise & Sunset Calculator does, with a checked example

Every sunrise and sunset time is a geometry problem with a fixed answer: for the date and coordinates you enter, the tool places the Sun in the sky and reports when its center crosses 0.833 degrees below the horizon - the standard definition that folds in the solar disk's radius and atmospheric refraction. The calculation is pure solar-position math and runs entirely in the browser, so it works offline and your location never leaves the page. The surprise: on the equinox, daylight is not 12 hours and solar noon is not 12:00. Timezone offsets, the equation of time, and the horizon correction shift both.

Worked example

A concrete input and expected output from the current implementation.

Input

Location: New York, NY (40.71 N, 74.01 W). Date: March 20, 2026

Expected output

Sunrise 6:59 AM, sunset 7:07 PM (EDT). Daylight: 12 h 7 m. Golden hour: from sunrise to about 7:36 AM, and from about 6:31 PM to sunset.

The Sun's declination on this equinox date is about -0.19 degrees, so its center crosses the standard -0.833-degree horizon at 10:59:56 UTC (6:59:56 AM EDT), with sunset 12 h 7 m later at 23:07:24 UTC; the disk-plus-refraction offset adds about 9 minutes over the geometric 12-hour day, and the 6-degree altitude mark comes 36 minutes after sunrise and 36 minutes before sunset. Some tools start golden hour earlier, when the Sun is 4 degrees below the horizon, which moves the morning start to about 6:43 AM.

How the result is produced

1

How the times are computed

The tool derives the Sun's right ascension and declination for the date, then solves the hour angle where the Sun's center sits 0.833 degrees below the horizon: about 0.267 degrees of solar radius plus roughly 0.57 degrees of refraction. Daylight length is twice that hour angle, solar noon is its midpoint, and longitude and timezone convert the result to clock time.

2

Golden hour and blue hour bands

Golden hour is the stretch when the Sun sits between about 4 degrees below and 6 degrees above the horizon; sunlight then travels a long path through the atmosphere and turns warm and soft. Blue hour is the twilight band when the Sun is roughly 4 to 8 degrees below the horizon and the sky reads deep blue. Both are conventions, not physics, and calculators differ on the exact bands.

Good uses

  • Planning a photo shoot: before booking, check the evening golden hour for the exact spot and date so the subject is in low, warm light rather than harsh midday sun.
  • Trip planning: compare how late the sun sets at a destination across the season, so an outdoor dinner, a hike, or a beach evening still has daylight on the day you will be there.
  • Scheduling outdoor work or exercise: confirm whether the sun will still be up at a set time, for example whether a 6:45 PM run or garden session is still in daylight that week.

Limits and checks

  • A city name resolves to a single point, and sunrise shifts about 4 minutes per degree of longitude, so a wrong or vague location (city center versus your neighborhood) moves the times by minutes. Enter coordinates when the minutes matter.
  • The 0.833-degree rule assumes a flat, unobstructed horizon at sea-level refraction. Mountains, buildings, and valley walls delay what you actually see, and above the Arctic or Antarctic circles the sun may not rise or set on some dates - a sensible output says so instead of printing a time.
  • Results are in the location's local time, including daylight saving only if the tool knows the location's timezone; check before comparing with your own clock. And golden hour is not an hour - at mid-latitudes it runs roughly 30 to 45 minutes, longer in summer and near the poles.

Common questions

Why is solar noon not 12:00, and why is the equinox not a 12-hour day?

Solar noon is when the Sun crosses your meridian. Three things move it off 12:00: your longitude's distance from your timezone's standard meridian, daylight saving time, and the equation of time, which swings roughly plus or minus 16 minutes over the year. The equinox day also runs about 4 to 5 minutes longer at each end because sunrise and sunset use the Sun's center 0.833 degrees below the horizon.

How accurate are these times?

On a flat, unobstructed horizon the standard algorithm is accurate to about a minute or two. Real-world error is dominated by your local horizon, which delays what you actually see, and by definitions: golden hour and blue hour bands vary between calculators, so two tools can disagree by several minutes even when their sunrise times match.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools