Environment calculators

Sunrise Sunset Calculator

Updated Oct 7, 2026 By Infinity Calculator

Location, Date & Time Zone

Location input method
Example: “Denver, CO”, “Paris, France”, “Reykjavik”. Press Calculate to look it up.
Place data adapted from GeoNames (CC BY 4.0).
Raises the horizon and slightly advances sunrise.
Resolved location
Showing results for: Denver, Colorado, United States

Date


Time Zone & Daylight Saving

Accepts values such as −7 or +5.5. Editing this overrides auto-detection.
DST status
Checking…

Solar Results

Primary Solar Event Times
Solar event times for the selected location and date.
Solar Event Local Time UTC Sun Altitude

Total Daylight
—
sunrise → sunset
Civil Twilight (AM+PM)
—
sun 0° to −6°
Nautical Twilight (AM+PM)
—
sun −6° to −12°
Astronomical Twilight (AM+PM)
—
sun −12° to −18°
Golden Hour & Blue Hour Windows
Morning Blue Hour
—
Morning Golden Hour
—
Evening Golden Hour
—
Evening Blue Hour
—
24-Hour Light Phase Timeline
Sun Position at Scrubbed Time
Sun Altitude
—
Sun Azimuth
—
Distance to Sun
—
Light Phase Now
—
Sunrise & Sunset Clock Faces
—
Apparent sunrise (local time)
—
Apparent sunset (local time)
Sun Altitude Through the Selected Day
Step-by-Step Solution
Advanced Astronomical Data
Values computed for the scrubbed instant.
QuantityValue

Advanced Tools

Shadow Length Calculator
Shadow length at the scrubbed time
Shadow Length (flat, level ground)
—
Reverse Sun Position Lookup
Find dates & times when the sun hits a target altitude and azimuth
Year at a Glance
Every day of the selected year: sunrise, solar noon, sunset, day length & change
Daily solar summary. Local times include the selected UTC offset and DST setting.
DateSunriseSolar NoonSunsetDay LengthChange vs Prior Day
Equinoxes & Solstices
Exact instants for the selected year
Instants of the four cardinal solar events, computed for the selected year.
EventLocal Date & TimeUTC Date & TimeMeaning
Daylight Length Across the Year

Introduction

This Sunrise Sunset Calculator shows you when the sun comes up and goes down for any place on Earth, on any date. Type in a city, use your GPS, or enter your own latitude and longitude. Pick a date, and you get sunrise, sunset, and solar noon times right away.

You also get more than just two times. The tool shows civil, nautical, and astronomical twilight, plus golden hour and blue hour windows for photos. A color timeline maps out the whole 24-hour day, and a slider lets you check the sun's height and direction at any minute.

Other tools let you find shadow length, look up the exact dates of equinoxes and solstices, and view a full year of sunrise and sunset times in one table. Your elevation and time zone are part of the math, so the times match what you really see outside.

How to use our Sunrise Sunset Calculator

Enter your location, the date, and your time zone. The calculator shows sunrise, sunset, solar noon, twilight times, golden hour, day length, sun position, and a full year of daily sun times.

Location input method: Pick how you want to set your spot: City Search, GPS Auto-Detect, or Manual Coordinates.

City, address or place name: Type a city like "Denver, CO" or "Paris, France". Add a state or country if the name is common.

Detect My Location: Click this button to use your device GPS. Your browser will ask you to allow it first.

Latitude: Type the degrees, minutes, and seconds, then pick N or S. Values run from −90° to +90°.

Longitude: Type the degrees, minutes, and seconds, then pick E or W. Values run from −180° to +180°.

Elevation above sea level: Enter your height above the sea in metres or feet. Higher ground makes sunrise a bit earlier and sunset a bit later.

Month, Day, and Year: Choose the date you want sun times for.

Sync to Today: Click to jump the date back to today.

Date slider: Drag it to move through the year one day at a time. Use the − and + buttons to step back or forward one day.

Time zone identifier: This fills in on its own from your location, like "America/Denver".

UTC offset: The hours your zone sits ahead of or behind UTC, such as −7 or +5.5. Change it only if the auto value is wrong.

Daylight Saving Time: Pick "Yes" to add one hour, or "No" for standard time.

Calculate, Reset and Live Mode: Press Calculate to run the math. Reset puts everything back to the start. Live Mode tracks the sun right now and updates every second.

Sun position scrubber: Slide it to any local time to see the sun's altitude, azimuth, distance, and light phase at that moment.

Distance unit: Show the distance to the sun in kilometres, miles, or AU.

Object height and units: Enter how tall an object is, then pick the units for the object and its shadow. The tool gives the shadow length at the scrubbed time.

Reverse sun position lookup: Enter a target sun altitude, a target azimuth, a search period, and a tolerance. Press Search to list the dates and times when the sun hits that spot in the sky.

Jump to month: Pick a month to highlight and scroll to those days in the year table.

Sunrise and Sunset: What They Mean

Sunrise and sunset are the moments when the upper edge of the sun's disk is on the horizon, assuming average air and a level horizon.1 At sunrise it is just appearing, and at sunset it is just slipping out of sight. Earth spins once about every 24 hours, so the sun looks like it moves across the sky. It does not really move. We do.

Why Sunrise Times Change

Earth's axis is tilted 23.44 degrees to its orbit around the sun.2 That tilt is why days get longer in spring and shorter in fall. Near the equator, day length stays close to 12 hours all year. The farther you live from the equator, the bigger the swing between summer and winter days.

Your longitude also matters. Two towns in the same time zone can see the sun rise many minutes apart because one sits farther east.

Solar Noon and the Equation of Time

Solar noon is the moment the sun's center crosses your meridian, the north-south line in the sky, and at low and middle latitudes it is when the sun is highest for the day.1 It is often not at 12:00 on your clock. Earth's orbit is a slight oval and its axis is tilted, so the sun runs a little fast or slow compared to clock time. That gap is called the equation of time, and it can reach about 16 minutes.4 Astronomers date these events with Julian numbers, which the Julian Date Calculator works out for you.

Twilight: The Light Before and After

The sky does not go dark the second the sun sets. Twilight is the time before sunrise and after sunset when sunlight scattered by Earth's upper atmosphere still gives real light.1 Astronomers split it into three stages, based on how far the center of the sun sits below the horizon:

  • Civil twilight (sun down to 6° below the horizon): outside civil twilight, artificial light is normally needed for ordinary outdoor activities.1
  • Nautical twilight (6° to 12° below): the horizon is still visible, even on a moonless night, so mariners can take star sights.1
  • Astronomical twilight (12° to 18° below): beyond 18°, scattered sunlight is fainter than starlight and other natural light.1

Golden Hour and Blue Hour

Photographers love these two windows. Golden hour runs from about the horizon up to 6° sun altitude, when light is warm, soft, and low. Blue hour is during civil twilight, when the sky turns a deep, even blue. Both are short near the equator and much longer near the poles.

Refraction and Elevation

Earth's air bends light like a lens. At the horizon, this bending lifts the sun's image by an average of 34 arcminutes, a little more than half a degree.1 Sunrise and sunset are computed with the sun's center 50 arcminutes below the horizon: 34 for refraction plus 16 for the sun's apparent radius.1 So you see sunrise a few minutes before the sun is geometrically up, and sunset a few minutes after it is down. How strongly the air bends light depends on its thickness, which the Air Density Calculator explains. Standing higher also helps. On a mountain or tall building, you see farther over the curve of Earth, so the sun rises a bit earlier and sets a bit later.

Midnight Sun and Polar Night

Above about 66.5° north or below 66.5° south, the sun can stay up for a full day in summer (midnight sun) or never rise in winter (polar night). Those lines sit at 90° minus Earth's tilt. Places like Alaska, northern Norway, and Antarctica see this every year.

Shadows Tell You the Sun's Height

A shadow is shortest at solar noon and stretches out near sunrise and sunset. If you know an object's height and the sun's altitude, the shadow length is simply the height divided by the tangent of that angle. Low sun, long shadow.

Why People Use Sunrise and Sunset Times

Farmers plan planting and harvest. Photographers chase golden hour. Hikers and boaters need to know when light runs out. Solar panel owners track daylight hours to size a system. Many faiths set prayer times by the sun. Gardeners count daylight to pick the right plants, and early risers can line up a wake-up time.


Formulas used

Julian Day at 0h UT
JD_0 = \left\lfloor 365.25(Y+4716) \right\rfloor + \left\lfloor 30.6001(M+1) \right\rfloor + D + B - 1524.5
Julian centuries since J2000.0
T = \frac{JD - 2451545.0}{36525}
Solar declination
\delta = \arcsin\left(\sin\varepsilon \, \sin\lambda\right)
Equation of time (minutes)
E = 4\left[y\sin 2L_0 - 2e\sin M + 4ey\sin M\cos 2L_0 - \tfrac{1}{2}y^2\sin 4L_0 - \tfrac{5}{4}e^2\sin 2M\right],\quad y = \tan^2\!\left(\tfrac{\varepsilon}{2}\right)
Horizon altitude corrected for refraction and elevation
h_0 = -0.833^\circ - \frac{2.076\sqrt{h_{\text{elev}}}}{60}
Sunrise/sunset hour angle
\cos H_0 = \frac{\sin h_0 - \sin\varphi \, \sin\delta}{\cos\varphi \, \cos\delta}
Event time in UTC minutes (rising uses +H_0, setting uses -H_0)
t_{\text{UTC}} = 720 - 4\left(\lambda \pm H_0\right) - E
Sun altitude and azimuth at a given instant
\sin h = \sin\varphi \sin\delta + \cos\varphi \cos\delta \cos H, \qquad \cos A = \frac{\sin\varphi \cos z - \sin\delta}{\cos\varphi \sin z}

Frequently asked questions

Why is my sunrise time a few minutes off from another website?

Small gaps are normal. Actual rise and set times depend on how much the air bends light at the horizon, so even under ideal conditions computed times may be off by a minute or more.1 Sites also use different rules for elevation and the exact spot inside a city. The standard equations for sunrise and sunset are theoretically accurate to within a minute between 72° north and 72° south, and within 10 minutes beyond that.3 Our tool also uses your elevation, which many sites skip. A one to three minute gap is nothing to worry about.

What is the difference between apparent and geometric altitude?

Geometric is where the sun really is. Apparent is where you see it, after air bends the light upward, by an average of 34 arcminutes at the horizon.1 Sunrise and sunset use the apparent value, because that matches what your eyes see.

What does azimuth mean?

Azimuth is the sun's compass direction. 0° is north, 90° is east, 180° is south, and 270° is west. The tool also shows the compass name, like SW, so you know which way to face or point a camera.

Does the city search need an internet connection?

Yes. City Search loads its list of places over the internet when you press Calculate. If you are offline, switch to Manual Coordinates and type in your latitude and longitude instead. The rest of the math runs in your browser.

The city search cannot find my town. What now?

Add a state or country, like "Springfield, Illinois, USA". If it still fails, look up your coordinates on a map and use Manual Coordinates mode. You can also use GPS Auto-Detect if you are there now.

How much does elevation change sunrise?

Not much at low heights, but it adds up. In this calculator, 100 m of elevation makes sunrise about a minute earlier, and 1,600 m, like Denver, about seven minutes earlier in late September, assuming a level, distant horizon. Local topography and the observer's height can change rise and set times even more than refraction does.1

Should I set Daylight Saving Time to Yes or No?

The tool sets this for you from your time zone and date. Only change it if you know your area does something different. Picking "Yes" adds one hour to every local time shown.

Why did my UTC offset stop updating?

Once you type in the offset box, you take over from auto-detect. To go back to automatic, press Reset or Sync to Today, or pick your location again.

Can I check dates in the past or future?

Yes. The year list covers 30 years back and 30 years ahead. Times stay very accurate across that whole range. Just remember old daylight saving rules may not match today's rules.

Does cloudy weather change these times?

No. The math is based on where the sun sits in the sky, not on clouds. Clouds only change how much light you see. Thick cloud can make dusk feel earlier, but the printed times stay the same.

What is the reverse sun position lookup for?

It finds when the sun will be at a spot you pick. Photographers use it to plan a shot with the sun behind a building. Solar panel owners use it to test shade. Enter a target altitude and azimuth, then press Search.

What does the Change vs Prior Day column mean?

It shows how many minutes of daylight you gained or lost since the day before. Near the equinoxes the change is largest, often two to three minutes a day. Near the solstices it drops to almost zero.

Why is the shadow length blank sometimes?

Because the sun is below the horizon at the scrubbed time, so there is no sun shadow. Move the scrubber to a daytime hour. Also note the shadow math assumes flat, level ground.

What is the equation of time in the advanced data?

It is the gap between sun time and clock time, in minutes. Earth's orbit is a slight oval and its axis is tilted, so the sun runs a bit fast or slow. The gap swings roughly +16 to −14 minutes over a year.

What is ΔT?

ΔT is the small difference between smooth time used by astronomers and clock time from Earth's spin. Earth's spin is not perfectly steady. Today ΔT is about 70 seconds. It matters most for equinox and solstice instants.

Why does the distance to the sun keep changing?

Earth's orbit is an oval, not a circle. We are closest in early January, at perihelion, about 147.095 million km away, and farthest in early July, at aphelion, about 152.1 million km away.2 You can show the value in kilometres, miles, or AU.

Can I use these times for prayer or fasting schedules?

You can use sunrise, sunset, and twilight times as a guide. Different faiths and local authorities use their own sun angles and rules, so always check with your own community for the official times.


Sources

  1. Rise, Set, and Twilight Definitions. U.S. Naval Observatory, Astronomical Applications Department. Rise, Set; Transit; Twilight; Technical Definitions and Computational Details. Accessed September 29, 2026.
  2. Earth Fact Sheet. NASA Goddard Space Flight Center, National Space Science Data Center. Orbital parameters. Accessed September 29, 2026.
  3. Solar Calculation Details. NOAA Global Monitoring Laboratory. General; Atmospheric Refraction Effects. Accessed September 29, 2026.
  4. The Equation of Time. U.S. Naval Observatory. Apparent and Mean Solar Time. Accessed October 7, 2026.