Sunrise Sunset Calculator - Solar Times & Twilight Phases

Use this sunrise sunset calculator to determine exact daily sunrise times, sunset times, twilight boundaries, day length, and solar parameters based on global coordinates.

Updated: June 30, 2026 • Free Tool

Sunrise Sunset Calculator

Four-digit Gregorian year (1901-2099).

Use 1 for Jan, 12 for Dec.

Day of the month.

Degrees North (positive) or South (negative).

Degrees East (positive) or West (negative).

Local hours ahead or behind UTC.

Results

Sunrise Time
0
Sunset Time 0
Solar Noon 0
Daylight Duration 0hours
Formatted Duration 0
Civil Twilight Start 0
Civil Twilight End 0
Nautical Twilight Start 0
Nautical Twilight End 0
Astronomical Twilight Start 0
Astronomical Twilight End 0
Solar Declination 0degrees
Equation of Time 0minutes
Daylight Status 0

What Is Sunrise Sunset Calculator?

The sunrise sunset calculator is a practical tool designed to estimate exact daily solar events and twilight transitions based on geographical coordinates and calendar dates. For photographers, astronomers, hikers, and gardeners, knowing when daylight begins and ends is essential for planning daily operations. By calculating the Earth's orientation relative to the Sun, this tool gives you direct visibility into light availability globally, providing high-precision times for astronomical, nautical, and civil boundaries.

  • Outdoor Photography Planning: Landscape photographers use solar times to prepare for the 'golden hour' and 'blue hour' transitions, ensuring they capture optimal natural lighting conditions.
  • Aviation and Marine Navigation: Pilots and sailors consult twilight schedules to comply with safety regulations regarding visible horizons and navigation beacons.
  • Agricultural and Gardening Schedules: Farmers trace daily sun exposure to manage crop schedules, greenhouse lighting, and planting arrangements throughout the seasons.
  • Home Automation and Smart Lighting: System designers integrate daily sunrise and sunset timelines to program outdoor security lights and indoor blinds dynamically.

Solar timing calculation is more than a convenience; it forms the foundation of modern scheduling for astronomical observations and logistics. Because the Earth's axis sits at an angle of roughly 23.44 degrees relative to its orbital plane, the apparent trajectory of the Sun across the sky exhibits substantial variation. The duration of daylight shifts continuously throughout the year, peaking at the summer solstice and reaching its minimum during the winter solstice.

Geographic latitude determines the intensity of these changes. Near the equator, daylight stays close to twelve hours year-round, while regions close to the poles experience periods of total darkness or constant sunlight. Understanding these variations helps professionals manage solar energy systems and anticipate climate conditions using a reliable sunrise sunset calculator.

To determine the overall duration of sun exposure rather than specific times, you can consult our daylight calculator which provides the total sunlight hours for any calendar date.

How Sunrise Sunset Calculator Works

Our calculations use standard formulas developed by the NOAA Global Monitoring Laboratory, which solve for the Sun's position relative to terrestrial coordinates.

cos(ha) = (cos(zenith) - sin(lat) * sin(delta)) / (cos(lat) * cos(delta))
  • ha (Hour Angle): The angular distance of the Sun from the local meridian, measured in degrees.
  • lat (Latitude): The geographical latitude of the observer, where positive values denote the Northern Hemisphere.
  • delta (Solar Declination): The angle between the Sun's rays and the plane of the Earth's equator.
  • zenith: The solar zenith angle, defined as 90.833 degrees for apparent sunrise and sunset to correct for atmospheric refraction.

Calculating the solar declination and equation of time is the first step in finding solar noon, which represents the moment when the Sun reaches its highest zenith. Once solar noon is computed, the hour angle provides the time difference between solar noon and the horizon transitions. To calculate these solar parameters, we use the sunrise sunset calculator math framework.

The zenith angle is key to high-accuracy estimations. While a geometric horizon corresponds to a zenith angle of 90 degrees, NOAA calculations use 90.833 degrees. This correction accounts for atmospheric refraction, which bends light around the Earth's curve, and the Sun's semi-diameter, ensuring times match what observers see.

Worked Example: Summer Solstice in New York City

Date: June 21, Latitude: 40.7128° N, Longitude: 74.0060° W, UTC Offset: -4

Calculate fractional year (gamma) = 2.932 rad. Compute equation of time (eqtime) = -1.68 minutes, and solar declination (delta) = 23.44 degrees. Solve the hour angle (ha) for zenith 90.833 degrees, giving ha = 113.2 degrees. Convert this hour angle to UTC times and apply the UTC offset.

Sunrise: 5:24 AM, Sunset: 8:30 PM, Day Length: 15.10 hours.

The calculations show that the Sun rises early and sets late, reflecting the long summer day length characteristic of mid-latitude locations.

According to Wikipedia Sunrise Equation, the apparent sunrise and sunset are calculated using an astronomical hour angle based on a zenith of 90.833 degrees to account for refraction and solar disk radius.

Because Earth's orbit is slightly elliptical, the orbital speed changes, affecting the equation of time; you can explore similar orbital mechanics using our orbital period calculator.

Key Concepts Explained

Understanding solar terminology helps clarify the mechanics of twilight phases and day length variations.

Solar Declination

The latitude at which the Sun is directly overhead at solar noon. It ranges from +23.44 degrees at the June solstice to -23.44 degrees at the December solstice.

Equation of Time

The discrepancy between solar clock time and mean local time. This difference, which varies by up to 16 minutes throughout the year, arises from the eccentricity of Earth's orbit and its axial tilt.

Atmospheric Refraction

The bending of sunlight as it passes through the Earth's atmosphere. This effect elevates the apparent position of the Sun, causing it to appear above the horizon before it geometrically rises.

Twilight Zones

The periods of partial illumination before sunrise and after sunset. Twilight is classified into civil (0 to 6 degrees below horizon), nautical (6 to 12 degrees), and astronomical (12 to 18 degrees).

Each twilight phase serves distinct professional and recreational needs. Civil twilight provides enough light for outdoor activities without artificial illumination. Nautical twilight marks when the horizon becomes indistinct, but bright stars are visible for maritime navigation. Astronomical twilight defines the boundary where the sky is dark enough for deep-space astronomy, which can all be calculated with our sunrise sunset calculator.

Knowing the boundaries of these phases is valuable for astronomers planning stargazing sessions, military planners coordinating operations, and city engineers managing public lighting grids.

The apparent movement of the sun from a terrestrial perspective relates to orbital alignments, which can be further investigated with our synodic period calculator.

How to Use This Calculator

Follow these steps to compute solar timings and twilight phases for any location on Earth.

  1. 1 Select the Target Date: Enter the year, month, and day for which you want to calculate solar transitions.
  2. 2 Enter Geographical Coordinates: Input the latitude and longitude in decimal degrees. Use positive values for North/East and negative for South/West.
  3. 3 Set the UTC Offset: Provide the local time zone offset, adjusting for daylight saving time if it is active on your selected date.
  4. 4 Calculate and Analyze Results: Submit the form to view sunrise, sunset, solar noon, and the start/end times for each twilight phase.

If you are planning an early morning hike in Denver, Colorado (Latitude 39.7392° N, Longitude -104.9903° W) on October 15, you enter these coordinates along with UTC offset -6. The calculator shows sunrise at 7:12 AM, but civil twilight starts at 6:44 AM, indicating that you will have usable trail visibility starting at 6:44 AM.

Benefits of Using This Calculator

Using an astronomical calculator provides clear advantages for planning, science, and daily scheduling.

  • Accurate Local Timing: Get timings customized to your exact coordinates rather than general city approximations, which can be off by several minutes.
  • Twilight Coverage: Access schedules for civil, nautical, and astronomical twilight to plan activities that rely on specific levels of darkness.
  • No Registration Required: Get results immediately without signing up, downloading applications, or sharing personal location data.
  • Educational Insights: Learn how declination, Earth's orbital eccentricity, and time zones shape local daylight patterns.

Having precise light schedules helps you organize outdoor tasks, coordinate travel schedules, and configure solar panels for maximum efficiency. It also supports research, educational projects, and environmental planning by making solar data accessible via a sunrise sunset calculator.

For professional fields, these values help ensure compliance with aviation guidelines, maritime laws, and safety regulations that rely on twilight definitions.

Factors That Affect Your Results

Several atmospheric and orbital variables can introduce minor variations between calculated predictions and observed times.

Local Elevation

Being at a high elevation, such as a mountaintop, expands your horizon, causing the Sun to appear earlier and set later than predicted for sea level.

Atmospheric Conditions

Changes in temperature, pressure, and humidity alter how light bends through the air, shifting actual sunrise and sunset times by up to a minute.

Topographical Obstacles

Nearby mountains, buildings, or dense forests block the horizon, delaying apparent sunrise and accelerating sunset.

  • High Latitude Extremes: Above the polar circles, the Sun may remain entirely above or below the horizon, causing standard transit equations to return no results for sunrise or sunset.
  • Refraction Variations: Standard formulas assume average atmospheric density, but extreme weather can cause minor shifts in observed times.

While standard equations are reliable for daily use, extreme weather and geographic features can cause observed times to deviate from predicted values. For example, high-latitude regions near solstices experience rapid shifts in day length, making the sunrise sunset calculator a key planning tool.

Users should treat these results as estimates. For safety-critical systems or official navigation records, consult official resources like the US Naval Observatory.

According to Wikipedia Twilight Guide, civil twilight begins or ends when the center of the sun is geometrically 6 degrees below the horizon, nautical twilight at 12 degrees, and astronomical twilight at 18 degrees.

While gravity affects time on a minute relativistic level, users looking for high-precision time differences on cosmic scales should check our time dilation calculator.

A graphical sunrise sunset calculator showing the horizon, coordinates, and solar transit times
A graphical sunrise sunset calculator showing the horizon, coordinates, and solar transit times

Frequently Asked Questions

Q: How is sunrise and sunset calculated?

A: Calculations use astronomical algorithms to determine the Sun's declination and the Equation of Time. Solving the hour angle for a zenith of 90.833 degrees gives the time difference from solar noon, which is then adjusted for longitude and UTC offset to find local clock times.

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

A: Civil twilight ends when the Sun is 6 degrees below the horizon, indicating when artificial lights are needed. Nautical twilight ends at 12 degrees, when the horizon becomes indistinct. Astronomical twilight ends at 18 degrees, representing complete darkness for stargazing.

Q: Why does the exact time of sunrise and sunset change daily?

A: The daily shift is caused by Earth's 23.44-degree axial tilt and elliptical orbit. As Earth orbits the Sun, the angle of sunlight shifts, causing the Sun's declination and local transit times to change throughout the year.

Q: How does atmospheric refraction affect sunrise and sunset times?

A: The atmosphere acts like a lens, bending sunlight around the Earth's curve. This refraction makes the Sun appear on the horizon about 34 arcminutes higher than its geometric position, making sunrise earlier and sunset later.

Q: Why does daylight duration vary by latitude?

A: Earth's tilt means different latitudes receive varying sun exposure. Near the equator, day length stays close to 12 hours. At higher latitudes, the tilt causes longer summer days and shorter winter days, leading to midnight sun or polar night.