Skip to main content
🌅date-time

Sunrise and Sunset Calculator: How to Find Golden Hour

Learn how sunrise and sunset times are calculated, understand golden hour and twilight phases, and discover tips for photographers and outdoor enthusiasts.

7 min readBy CalcOnce Editorial TeamUpdated February 28, 2026

Whether you are a photographer chasing the perfect golden hour shot, a hiker planning a sunrise summit, or simply curious about when the sun rises and sets at your location, understanding how sunrise and sunset times work can help you make the most of daylight. Our sunrise and sunset calculator uses the same algorithms employed by the National Oceanic and Atmospheric Administration (NOAA) to give you accurate times for any date and location on Earth.

The timing of sunrise and sunset affects everything from photography and outdoor activities to agriculture and energy production. In this comprehensive guide, we will explore the science behind these daily events, explain the magical lighting periods photographers prize, and provide practical tips for using this knowledge in your daily life.

How Sunrise and Sunset Times Are Calculated

Calculating precise sunrise and sunset times involves complex astronomical mathematics. The NOAA Solar Calculator, which our sunrise sunset calculator is based on, uses equations developed from centuries of astronomical observation.

The Zenith Angle

The key to understanding sunrise and sunset is the zenith angle. Sunrise and sunset do not occur when the center of the sun crosses the horizon (which would be a 90-degree zenith angle). Instead, the standard definition uses a zenith angle of 90.833 degrees. This accounts for two factors:

  • Apparent solar radius (0.833 degrees): Sunrise is defined as when the upper edge of the sun first appears above the horizon, not when the center crosses it. The sun has an apparent diameter of about 0.5 degrees, so we add half of that.
  • Atmospheric refraction (approximately 0.567 degrees): Earth's atmosphere bends sunlight, making the sun appear slightly higher than it actually is. At the horizon, this refraction is about 34 arcminutes (0.567 degrees).

These combined effects mean you can see the sun when it is geometrically still below the horizon.

The Calculation Process

The NOAA algorithm follows these general steps:

  1. Calculate the Julian Date for the given calendar date
  2. Determine the sun's ecliptic longitude and right ascension
  3. Calculate the sun's declination (its angle relative to Earth's equator)
  4. Compute the hour angle at sunrise/sunset based on latitude and declination
  5. Convert from UTC to local time, accounting for time zones and daylight saving time

All trigonometric functions must use radians, not degrees, and the calculations must account for the observer's exact longitude to determine the precise moment of sunrise and sunset.

What Affects Sunrise and Sunset Times

Several factors determine when the sun rises and sets at any given location:

Latitude

Latitude has the most dramatic effect on day length and sunrise/sunset times. Near the equator, day length stays relatively constant year-round at about 12 hours. At higher latitudes, seasonal variation becomes extreme:

  • Equator (0 degrees): Day length varies only about 10 minutes throughout the year
  • New York City (40.7 degrees N): Day length ranges from about 9 hours 15 minutes in December to 15 hours 5 minutes in June
  • Anchorage, Alaska (61.2 degrees N): Day length ranges from 5 hours 28 minutes to 19 hours 21 minutes
  • Above the Arctic Circle (66.5 degrees N): Experience 24-hour daylight in summer and 24-hour darkness in winter

Season

Earth's 23.5-degree axial tilt causes the seasons and their associated changes in day length. During the summer solstice (around June 21 in the Northern Hemisphere), the North Pole tilts toward the sun, creating longer days. During the winter solstice (around December 21), the opposite occurs.

The equinoxes (around March 20 and September 22) mark the times when day and night are approximately equal length everywhere on Earth.

Elevation

Higher elevations see the sun slightly earlier at sunrise and later at sunset because the horizon is effectively lower. For every 1,000 feet of elevation gain, sunrise occurs about 1 minute earlier and sunset about 1 minute later. This is why mountain summits are popular destinations for sunrise viewing.

Local Geography

Mountains, hills, and buildings can block the sun, causing "effective" sunrise and sunset times that differ from the calculated astronomical times. A valley surrounded by mountains might not see direct sunlight until well after the calculated sunrise time.

Understanding Golden Hour and Blue Hour for Photography

Photographers treasure the periods just after sunrise and before sunset for their exceptional lighting quality. Understanding these magical hours can dramatically improve your photography.

Golden Hour

Golden hour occurs roughly during the first hour after sunrise and the last hour before sunset, though the exact duration depends on latitude and season. During this time:

  • Warm color temperature: Sunlight passes through more atmosphere at low angles, scattering blue wavelengths and creating warm golden-orange tones
  • Soft shadows: The low sun angle creates long, soft shadows with gentle transitions
  • Directional lighting: Light coming from the side creates depth and dimension in subjects
  • Reduced contrast: The diffused light reduces harsh highlights and dark shadows

At 40 degrees latitude, golden hour lasts approximately 45 to 60 minutes. Near the equator, it may be as short as 20 to 30 minutes. At high latitudes during summer, golden hour can extend for several hours.

Blue Hour

Blue hour is the period of twilight before sunrise and after sunset when the sky takes on a predominantly blue color. This occurs when the sun is between 4 and 8 degrees below the horizon. During blue hour:

  • The sky displays deep blue to purple hues
  • City lights and artificial lighting become visible
  • The balance between ambient light and artificial light creates unique photographic opportunities
  • Long exposures can capture both the blue sky and illuminated buildings or streets

Blue hour typically lasts 20 to 40 minutes, depending on latitude and season.

Civil, Nautical, and Astronomical Twilight Explained

Twilight is the period between day and night when the sun is below the horizon but its light still illuminates the sky. Astronomers define three distinct phases:

Civil Twilight

Civil twilight occurs when the sun is between 0 and 6 degrees below the horizon. During this phase:

  • There is enough light for most outdoor activities without artificial lighting
  • The horizon is clearly visible
  • Only the brightest stars and planets are visible
  • Vehicle headlights are typically required by law

Nautical Twilight

Nautical twilight occurs when the sun is between 6 and 12 degrees below the horizon. The name comes from its historical importance to sailors:

  • The horizon is still visible at sea for navigation
  • Many stars become visible for celestial navigation
  • General outdoor activities become difficult without artificial light
  • The sky displays deep blue colors transitioning to darkness

Astronomical Twilight

Astronomical twilight occurs when the sun is between 12 and 18 degrees below the horizon:

  • The sky is nearly dark to the naked eye
  • Most astronomical observations can begin
  • Some faint atmospheric illumination may still affect sensitive instruments
  • True night begins when the sun drops below 18 degrees

How Daylight Changes Throughout the Year

Understanding seasonal daylight patterns helps with everything from vacation planning to managing seasonal affective disorder.

The Solstices

The summer solstice (around June 21 in the Northern Hemisphere) marks the longest day of the year. In New York City, this means roughly 15 hours of daylight. The winter solstice (around December 21) brings the shortest day, with only about 9 hours and 15 minutes of daylight.

The Equinoxes

During the spring and fall equinoxes, day and night are approximately equal in length everywhere on Earth (about 12 hours each). These occur around March 20 and September 22.

Rate of Change

Day length changes most rapidly around the equinoxes and most slowly around the solstices. In mid-latitudes, you might gain or lose 2 to 3 minutes of daylight per day in March and September, but only seconds per day in June and December.

Example Sunrise and Sunset Times for Major US Cities

Here are sample sunrise and sunset times for major US cities across different seasons (times shown in local time):

Winter Solstice (December 21, 2026)

City Sunrise Sunset Day Length
New York, NY 7:17 AM 4:32 PM 9h 15m
Los Angeles, CA 6:55 AM 4:49 PM 9h 54m
Chicago, IL 7:14 AM 4:23 PM 9h 9m
Seattle, WA 7:55 AM 4:20 PM 8h 25m
Miami, FL 7:02 AM 5:34 PM 10h 32m

Summer Solstice (June 21, 2026)

City Sunrise Sunset Day Length
New York, NY 5:25 AM 8:31 PM 15h 6m
Los Angeles, CA 5:42 AM 8:08 PM 14h 26m
Chicago, IL 5:16 AM 8:30 PM 15h 14m
Seattle, WA 5:11 AM 9:11 PM 16h 0m
Miami, FL 6:30 AM 8:15 PM 13h 45m

Tips for Photographers and Outdoor Enthusiasts

Making the most of sunrise and sunset requires planning. Here are practical tips for various activities:

For Photographers

  • Arrive early: Set up 30 to 45 minutes before sunrise or 60 minutes before sunset to scout locations and capture pre-dawn or pre-dusk colors
  • Check the weather: Partly cloudy skies often produce the most dramatic sunrise and sunset colors
  • Know your direction: Use apps or compass to determine exactly where the sun will rise or set relative to your composition
  • Stay after sunset: Some of the best colors appear 15 to 30 minutes after the sun drops below the horizon
  • Use a tripod: Low light conditions during golden hour and blue hour require longer exposures

For Hikers and Outdoor Adventurers

  • Plan for twilight: Account for civil twilight when planning evening activities and allow buffer time to return before dark
  • Summit timing: For sunrise summits, calculate the time needed to reach the top and add 30 minutes for buffer
  • Seasonal adjustments: Remember that day length changes significantly throughout the year, especially at higher latitudes
  • Bring light: Always carry a headlamp even for day hikes, as unexpected delays can leave you on the trail after dark

For Gardeners and Farmers

  • Plant positioning: Understand how sun angles change throughout the year to optimize garden placement
  • Frost protection: The coldest temperatures typically occur just before sunrise
  • Watering timing: Early morning watering (around sunrise) reduces evaporation and fungal issues

Frequently Asked Questions

What is golden hour and when does it occur?

Golden hour is the period of warm, soft sunlight that occurs roughly during the first hour after sunrise and the last hour before sunset. The exact duration varies by latitude and season, ranging from about 20 minutes near the equator to several hours at high latitudes during summer. During golden hour, sunlight passes through more atmosphere, scattering blue wavelengths and creating the characteristic warm, golden tones that photographers prize.

Why does the sun rise and set at different times throughout the year?

Earth's axis is tilted 23.5 degrees relative to its orbital plane around the sun. This tilt causes different parts of Earth to receive varying amounts of direct sunlight throughout the year. During summer in your hemisphere, your location tilts toward the sun, resulting in longer days and earlier sunrises/later sunsets. During winter, your location tilts away from the sun, causing shorter days. The equinoxes mark the times when neither hemisphere tilts toward the sun, resulting in roughly equal day and night lengths.

How accurate are online sunrise and sunset calculators?

Quality sunrise and sunset calculators that use NOAA algorithms, like our sunrise sunset calculator, are accurate to within 1 to 2 minutes for most locations. The standard calculations assume a flat horizon at sea level. Your actual observed sunrise and sunset may vary if you are at a significant elevation, have mountains or buildings blocking the horizon, or experience unusual atmospheric conditions. The calculations also assume standard atmospheric refraction, which can vary with temperature and humidity.

What is the difference between civil, nautical, and astronomical twilight?

These twilight phases are defined by how far the sun is below the horizon. Civil twilight (sun 0 to 6 degrees below horizon) provides enough light for outdoor activities. Nautical twilight (6 to 12 degrees below) allows sailors to see both the horizon and navigational stars. Astronomical twilight (12 to 18 degrees below) is when the sky becomes dark enough for most astronomical observations. True night begins when the sun is more than 18 degrees below the horizon.

Why are sunrise and sunset not exactly 12 hours apart on the equinoxes?

Even on the equinoxes, day and night are not precisely equal due to two factors. First, sunrise is defined as when the top edge of the sun first appears, and sunset as when the last edge disappears, which adds a few minutes to daylight. Second, atmospheric refraction bends sunlight, making the sun visible even when it is geometrically below the horizon. These effects add about 6 to 8 minutes of extra daylight on the equinoxes compared to a perfect 12-hour day.

How does elevation affect sunrise and sunset times?

Higher elevations experience earlier sunrises and later sunsets because the effective horizon is lower. For every 1,000 feet (305 meters) of elevation gain, sunrise occurs approximately 1 minute earlier and sunset approximately 1 minute later. This is why mountain peaks and tall buildings offer extended views of the sun compared to sea-level locations. Our calculator uses sea-level calculations as a baseline, which is standard practice for most applications.

Can I see the sun after it has technically set?

Yes, atmospheric refraction allows you to see the sun even when it is geometrically below the horizon. At sunrise and sunset, this effect is strongest, bending sunlight by about 0.57 degrees (34 arcminutes). This is why the sun appears slightly flattened at the horizon. It also means you can see the sun for several minutes after it has mathematically set, and several minutes before it mathematically rises.

Plan Your Perfect Sunrise or Sunset

Get accurate sunrise, sunset, and golden hour times for any location and date.

Try our Sunrise & Sunset Calculator

Share this guide

CalcOnce Editorial Team

The CalcOnce team creates comprehensive guides and free calculators to help you make better decisions. Our content is researched thoroughly and updated regularly to ensure accuracy.

Related Guides