Environment calculators

Sunrise Sunset Calculator

Updated Aug 28, 2026 By Jehan Wadia
Rate Formulas

Location, Date & Time Zone

Location input method
Example: “Denver, CO”, “Paris, France”, “Reykjavik”. Press Calculate to look it up.
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. If you want to study the sun's height on its own, the Sun Angle Calculator focuses just on that, and the Moon Phase Calculator covers the night side of the sky.

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°. If you need the gap between two sets of coordinates, try the Lat Long Distance Calculator.

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. To swap units, the Meters to Feet Calculator handles the conversion.

Month, Day, and Year: Choose the date you want sun times for. The Date Calculator and Days Until Calculator help if you are planning ahead.

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". To compare clocks in two places, see the Time Zone Calculator.

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. The Time Zone Difference Calculator is handy when you travel across zones.

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. The Km To Miles Calculator covers other distance swaps.

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 is the moment the top edge of the sun first shows above the horizon. Sunset is the moment that same edge slips 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 is tilted about 23.4 degrees as it orbits the sun. 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. Use the Time Duration Calculator if you want to measure those gaps in hours and minutes.

Solar Noon and the Equation of Time

Solar noon is when the sun is highest in the sky for the day. 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. 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. Air high above you keeps catching sunlight. Astronomers split this glow into three stages, based on how far the sun sits below the horizon:

  • Civil twilight (0° to −6°): bright enough to read outside or drive without headlights.
  • Nautical twilight (−6° to −12°): the horizon at sea is still faintly visible, and bright stars show.
  • Astronomical twilight (−12° to −18°): almost fully dark. Past −18°, the sky is true night.

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. This bending lifts the sun's image by about half a degree, so you actually see sunrise a couple of minutes before the sun is truly up — and sunset a couple of minutes after it is truly 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). 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. To check the trig by hand, the Trig Calculator and Tan Inverse Calculator both help, and the Angle Calculator is useful for converting between degrees and radians.

Why People Use Sunrise and Sunset Times

Farmers plan planting and harvest, often alongside a Plant Spacing Calculator or Fertilizer Calculator. Photographers chase golden hour. Hikers and boaters need to know when light runs out. Solar panel owners track daylight hours and pair this data with a Solar Panel Calculator or the broader Solar Calculator 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 with the Sleep Calculator.


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. Sites use different rules for elevation, air bending, and the exact spot inside a city. Our tool also uses your elevation, which many sites skip. A one to three minute gap is nothing to worry about.

How accurate are the times?

About ±1 minute for most places. Above 72° north or below 72° south, the sun moves along the horizon very slowly, so times are good to about ±10 minutes. The tool prints an accuracy note under the results table.

Why does the table say an event does not occur?

The sun never reached that height that day. This happens a lot in far north or far south places. For example, in winter the sun may never get to −6°, so there is no civil dawn. The tool then tells you the last and next time it happens.

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 about half a degree. 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.

Do I have to press Calculate every time?

No. Changing the date, time zone, or DST runs the math again on its own. You need Calculate mainly after typing a new city name, since that has to be looked up first.

Does the city search need an internet connection?

Yes. City Search asks an online map service for the coordinates. 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. At 100 m the sun rises about a minute earlier. At 1,600 m, like Denver, it is roughly four minutes earlier. On a high peak it can be several more minutes.

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.

What does Live Mode do?

It jumps to today and tracks the sun right now, updating every second. The sun altitude, azimuth, light phase, and shadow length all move in real time. Press the button again to stop and freeze the values.

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, near 147 million km, and farthest in early July, near 152 million km. 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.

What do the letters on the timeline mean?

Each color block is a light phase: N night, A astronomical twilight, Nt nautical twilight, C civil twilight, G golden hour, and D daylight. The legend below the bar lists them all.