Guide · updated 2026-09-30
How sunrise and sunset times are calculated
Short answer
What counts as sunrise
The sun is a disk about half a degree wide, and the atmosphere bends its light so it appears higher than it is near the horizon. A sunrise defined by the center of the sun on a geometric horizon would come a few minutes late compared with what you see. The calculation used on this site, from the SunCalc library, counts sunrise when the sun's center is 0.833° below the horizon: roughly its radius plus a standard allowance for refraction.
That definition is why the equator gets slightly more than 12 hours of daylight even on the equinox. At 0° on March 20, 2026 the calculation gives 12 h 07 min.
The steps of the calculation
- Count the days since a fixed reference date and compute the sun's position along its yearly path, including the small correction for Earth's elliptical orbit.
- From that, get the sun's declination, the latitude where it is overhead at noon. It swings between about 23.4° north in June and 23.4° south in December.
- Find solar noon for the longitude: the moment the sun crosses the local meridian. This shifts by 4 minutes per degree of longitude.
- Solve for the hour angle at which the sun's altitude equals -0.833°. The hour angle before and after solar noon gives sunrise and sunset.
- Convert those moments from universal time to local clock time with the place's time zone rules, including daylight saving time.
Worked example: Denver on June 21
Denver's capitol sits at 39.739° N, 104.985° W. On June 21, 2026 the sun reaches its highest point at 1:01 PM local time, at an altitude of 4,222.9°. Sunrise comes at 5:32 AM and sunset at 8:31 PM, for 14 h 59 min of daylight. The Denver sunrise and sunset page has the same numbers for every month.
June vs December daylight at every capital
Sorted by the difference between the longest and shortest day. Juneau, AK swings the most, from 18 h 17 min in June to 6 h 22 min in December. Honolulu, HI swings the least, by 2 h 36 min.
| Capital | June 21 | December 21 | Difference |
|---|---|---|---|
| Juneau, AK | 18 h 17 min | 6 h 22 min | 11 h 54 min |
| Olympia, WA | 15 h 54 min | 8 h 30 min | 7 h 24 min |
| Bismarck, ND | 15 h 52 min | 8 h 32 min | 7 h 20 min |
| Helena, MT | 15 h 50 min | 8 h 34 min | 7 h 16 min |
| Saint Paul, MN | 15 h 37 min | 8 h 46 min | 6 h 50 min |
| Salem, OR | 15 h 37 min | 8 h 46 min | 6 h 50 min |
| Pierre, SD | 15 h 32 min | 8 h 51 min | 6 h 42 min |
| Augusta, ME | 15 h 32 min | 8 h 51 min | 6 h 41 min |
| Montpelier, VT | 15 h 31 min | 8 h 51 min | 6 h 40 min |
| Boise, ID | 15 h 26 min | 8 h 56 min | 6 h 30 min |
| Concord, NH | 15 h 23 min | 8 h 59 min | 6 h 25 min |
| Madison, WI | 15 h 22 min | 9 h 00 min | 6 h 23 min |
| Lansing, MI | 15 h 20 min | 9 h 02 min | 6 h 18 min |
| Albany, NY | 15 h 19 min | 9 h 03 min | 6 h 17 min |
| Boston, MA | 15 h 17 min | 9 h 05 min | 6 h 13 min |
| Providence, RI | 15 h 13 min | 9 h 08 min | 6 h 05 min |
| Hartford, CT | 15 h 13 min | 9 h 08 min | 6 h 04 min |
| Des Moines, IA | 15 h 12 min | 9 h 10 min | 6 h 02 min |
| Cheyenne, WY | 15 h 09 min | 9 h 13 min | 5 h 56 min |
| Lincoln, NE | 15 h 06 min | 9 h 15 min | 5 h 52 min |
| Salt Lake City, UT | 15 h 06 min | 9 h 15 min | 5 h 51 min |
| Harrisburg, PA | 15 h 03 min | 9 h 18 min | 5 h 45 min |
| Trenton, NJ | 15 h 02 min | 9 h 18 min | 5 h 44 min |
| Columbus, OH | 15 h 01 min | 9 h 20 min | 5 h 41 min |
| Springfield, IL | 15 h 00 min | 9 h 21 min | 5 h 39 min |
| Indianapolis, IN | 15 h 00 min | 9 h 21 min | 5 h 38 min |
| Denver, CO | 14 h 59 min | 9 h 21 min | 5 h 38 min |
| Carson City, NV | 14 h 56 min | 9 h 25 min | 5 h 31 min |
| Dover, DE | 14 h 56 min | 9 h 25 min | 5 h 31 min |
| Topeka, KS | 14 h 55 min | 9 h 25 min | 5 h 29 min |
| Annapolis, MD | 14 h 54 min | 9 h 26 min | 5 h 29 min |
| Washington, DC | 14 h 54 min | 9 h 26 min | 5 h 28 min |
| Jefferson City, MO | 14 h 52 min | 9 h 28 min | 5 h 24 min |
| Sacramento, CA | 14 h 52 min | 9 h 28 min | 5 h 24 min |
| Charleston, WV | 14 h 50 min | 9 h 30 min | 5 h 21 min |
| Frankfort, KY | 14 h 49 min | 9 h 30 min | 5 h 19 min |
| Richmond, VA | 14 h 46 min | 9 h 34 min | 5 h 11 min |
| Nashville, TN | 14 h 37 min | 9 h 42 min | 4 h 56 min |
| Raleigh, NC | 14 h 35 min | 9 h 44 min | 4 h 51 min |
| Santa Fe, NM | 14 h 35 min | 9 h 44 min | 4 h 50 min |
| Oklahoma City, OK | 14 h 34 min | 9 h 45 min | 4 h 48 min |
| Little Rock, AR | 14 h 29 min | 9 h 49 min | 4 h 40 min |
| Columbia, SC | 14 h 25 min | 9 h 53 min | 4 h 32 min |
| Atlanta, GA | 14 h 24 min | 9 h 55 min | 4 h 29 min |
| Phoenix, AZ | 14 h 22 min | 9 h 56 min | 4 h 26 min |
| Montgomery, AL | 14 h 17 min | 10 h 01 min | 4 h 15 min |
| Jackson, MS | 14 h 16 min | 10 h 02 min | 4 h 14 min |
| Baton Rouge, LA | 14 h 07 min | 10 h 11 min | 3 h 56 min |
| Tallahassee, FL | 14 h 07 min | 10 h 11 min | 3 h 56 min |
| Austin, TX | 14 h 06 min | 10 h 12 min | 3 h 54 min |
| Honolulu, HI | 13 h 26 min | 10 h 50 min | 2 h 36 min |
How accurate is a calculated sunrise?
The formulas are close approximations, and the larger errors are local: hills or buildings on the horizon delay the sunrise you see, and unusual air temperatures change refraction by a minute or more. Elevation matters too, since a viewer on a mountain sees over the curve of the Earth. Treat any published sunrise as a guide to within a few minutes, and only for a flat, open horizon. The horizon distance guide explains the effect of height.
Twilight before sunrise and after sunset
The sky is light before sunrise and after sunset. Civil twilight lasts until the sun is 6° below the horizon, the point where most outdoor activity still works without lights. Nautical twilight runs to 12° and astronomical twilight to 18°. On June 21, 2026, civil dawn in Denver comes at 4:59 AM, which is 33 minutes before sunrise.
Try it
Sunrise sunset calculator
Sunrise, sunset, golden hour, and day length on the local clock of any place.
Looking up the local time zone…
Questions people ask
What is civil twilight?
The period when the sun is between 0.833 and 6 degrees below the horizon, before sunrise and after sunset. The sky is usually bright enough for outdoor activity without lights.
Why is there more than 12 hours of daylight on the equinox?
Sunrise and sunset are counted when the sun's upper edge touches the horizon, and refraction lifts the sun's image. Both add a few minutes to each end of the day.
Does elevation change sunrise time?
Yes. A higher viewpoint sees the sun earlier in the morning and later in the evening. Standard tables assume sea level and a flat horizon.
Why is the earliest sunrise not on the longest day?
Solar noon drifts through the year because of Earth's tilted axis and elliptical orbit, so the earliest sunrise comes a few days before the June solstice and the latest sunset a few days after.
Sources and data as of
Data as of: computed with SunCalc for 2026 at the capital coordinates stored on this site.
How every number is computed: methodology. Spotted a wrong figure? Report an error.