The formula
Solar declination δ and equation of time from the NOAA solar position algorithm
Hour angle for a sun altitude h: cos H = (sin h − sin φ × sin δ) ÷ (cos φ × cos δ)
Sunrise/sunset use h = −0.833° (refraction plus the sun's radius)
Solar noon (UTC minutes) = 720 − 4 × longitude − equation of time
Golden hour: sun between −4° and +6°; blue hour: −6° to −4°; civil twilight ends at −6°
Worked example
- New York (40.71° N, 74.01° W) on 21 June, UTC−4 (EDT):
- Sunrise is about 05:25 and sunset about 20:31, a day of roughly 15 h 6 min.
- Solar noon is about 12:58, with the sun 72.7° above the horizon.
- The evening golden hour runs from about 19:49 to 20:51, followed by the blue hour until about 21:04.
How sunrise and sunset are calculated
Sunrise and sunset depend on your latitude and longitude, the date and the time zone. The calculator uses the solar position equations published by the US National Oceanic and Atmospheric Administration (NOAA), which find the sun's declination, its angle north or south of the celestial equator, and the equation of time, the difference between clock time and solar time caused by the Earth's tilted, elliptical orbit. Sunrise is defined as the moment the top of the sun appears on a flat horizon, when its centre is 0.833° below it, allowing for atmospheric refraction and the sun's apparent size.
Time zones and daylight saving
Enter your UTC offset for the date you're checking. New York is UTC−5 in winter and UTC−4 during daylight saving time; London is UTC+0 in winter and UTC+1 in summer; India is UTC+5:30 all year. The calculator doesn't apply daylight saving automatically, so set the offset for the season. Longitude also matters within a time zone: places at the western edge of a zone have later sunrises and sunsets than places at the eastern edge, sometimes by more than half an hour.
Golden hour and blue hour
Photographers prize the golden hour, shortly after sunrise and before sunset, when sunlight passes through more of the atmosphere and becomes warm, soft and directional, with long shadows. The blue hour follows sunset and precedes sunrise, when the sun is just below the horizon and the sky takes on a deep blue colour, ideal for cityscapes with lights. Definitions vary; the calculator uses a sun altitude of −4° to +6° for golden hour and −6° to −4° for blue hour. Near the equator these periods are short, and at high latitudes in summer they can last for hours.
Twilight and day length
Civil twilight lasts until the sun is 6° below the horizon, roughly when you need artificial light for outdoor activities, and many regulations, such as aviation and vehicle lighting rules, refer to it. Nautical and astronomical twilight end at 12° and 18°. Day length varies hugely with latitude and season. At the equator it's about 12 hours all year, while London ranges from about 7 h 50 min in December to 16 h 38 min in June. Above the Arctic Circle the sun doesn't set around the June solstice, and the calculator reports midnight sun or polar night when that happens.
Solar noon
Solar noon is when the sun crosses your meridian and is highest in the sky. It's rarely at exactly 12:00 on the clock, because of your position within the time zone, daylight saving and the equation of time, which shifts solar noon by up to about 16 minutes through the year. The sun's height at solar noon determines the strength of sunlight and the length of shadows, which matters for solar panels and gardening. Our solar tilt angle calculator uses the same geometry to angle panels.
Planning with sun times
Sun times help photographers plan shoots, hikers and runners time outdoor trips, farmers and gardeners plan work, and drivers anticipate dawn and dusk. For travel, combine them with our jet lag calculator, which uses light exposure to shift your body clock, and the time zone converter. To find coordinates and the distance between places, use the GPS distance calculator. For time-lapse shots of sunsets, the time-lapse calculator sets the interval.