notAcalculator logo

Sunrise Sunset Calculator

Sunrise Sunset Calculator

Give us your feedback! Was this useful?

Introduction: When Does the Sun Rise Where You Are?

This calculator computes sunrise, sunset, daylight duration, solar noon, and golden hour for any date and location on Earth. Enter the date, latitude, longitude, and UTC offset, and you get the exact clock times — the same result a printed almanac or a NOAA spreadsheet would give, without the table lookups.

The Earth's tilt is the whole story. The Sun's path across the sky changes every day because our planet orbits with its axis tilted 23.44° from vertical. At the summer solstice your hemisphere leans toward the Sun — days are long and the Sun climbs high at noon. At the winter solstice it leans away — days are short and the Sun stays low. The equator barely notices: it gets about 12 hours of daylight every day of the year[wiki-position-of-sun][wiki-daytime].

The two numbers you need are your latitude (how far north or south of the equator you are) and your longitude (how far east or west, which sets your clock time relative to the Sun's position). Plug both in below, add your time zone, and the calculator handles the astronomy.

How to Use: Finding Sunrise and Sunset Times

Enter four values — that is all the algorithm needs:

  1. Date — pick any day of the year. The default is today.
  2. Latitude (°) — positive north of the equator, negative south. New York is 40.71, Sydney is −33.87, the equator is 0.
  3. Longitude (°) — positive east of Greenwich, negative west. New York is −74.00, London is −0.13, Tokyo is 139.69.
  4. UTC offset (hours) — the time zone's offset from UTC including daylight saving. New York in summer (EDT) is −4, in winter (EST) −5. London in summer (BST) is +1.

Example 1 — New York on the summer solstice. Date June 21, latitude 40.71, longitude −74.00, UTC offset −4 (EDT). Result: sunrise 5:25 AM, sunset 8:30 PM, daylight 15h 05m, solar noon 12:57 PM. This is the longest day of the year in the Northern Hemisphere — over 15 hours of daylight.

Example 2 — London on the winter solstice. Date December 21, latitude 51.5, longitude −0.13, UTC offset 0 (GMT). Result: sunrise 8:04 AM, sunset 3:53 PM, daylight 7h 49m. London sits farther north than New York, so its shortest day is even shorter — under 8 hours of daylight[wiki-daytime].

Example 3 — The equator, any day. Latitude 0, longitude 0, UTC offset 0. Result: sunrise 6:05 AM, sunset 6:11 PM, daylight ~12h year-round. The equinoxes are not special at the equator — every day has roughly 12 hours of daylight because the Sun rises and sets almost vertically[wiki-daytime].

Example 4 — Sydney on the summer solstice. Date December 21, latitude −33.87, longitude 151.21, UTC offset 11 (AEDT). Result: sunrise 5:41 AM, sunset 8:05 PM, daylight 14h 16m. Southern Hemisphere seasons are inverted: December is Sydney's longest day, and it reaches roughly the same daylight New York gets in June — the mirror symmetry is a direct consequence of the axial tilt being fixed in space while the Earth moves around the Sun.

The key insight from these examples is that latitude and season set the day length, while longitude and time zone set the clock. Two cities on the same latitude (New York and Beijing are both near 40°N) get nearly identical daylight on the same date, but their sunrise and sunset clock times differ by the longitude correction plus their time zone offset. That is why the calculator needs all four inputs: the astronomy is universal, but the numbers on your clock are local.

The Formula: How Sunrise and Sunset Are Computed

The calculator implements the standard algorithm used by the NOAA Solar Calculator and the U.S. Naval Observatory, based on Jean Meeus' Astronomical Algorithms[noaa-calcdetails][usno-rise-set].

Step 1 — Day of year. Count the date as an ordinal number N, with January 1 = 1.

Step 2 — Solar declination δ. The Sun's latitude on the celestial sphere, in degrees. It swings between +23.44° (summer solstice) and −23.44° (winter solstice), passing through at the equinoxes[wiki-position-of-sun]:

δ=23.44cos(360365(N+10))\delta = -23.44^{\circ} \cdot \cos\left(\frac{360^{\circ}}{365} (N + 10)\right)
[pveducation-declination]

Step 3 — Hour angle at sunrise/sunset. The hour angle H₀ is how far the Sun is from your meridian (in degrees of Earth rotation) when it crosses the horizon. The "official" sunrise/sunset uses an elevation of −0.833° — that accounts for the mean atmospheric refraction (34′) plus the Sun's radius (16′): the Sun appears to rise about 4 minutes early and set about 4 minutes late because the atmosphere bends its light[usno-rise-set]:

cosH0=sinh0sinϕsinδcosϕcosδ\cos H_0 = \frac{\sin h_0 - \sin \phi \cdot \sin \delta}{\cos \phi \cdot \cos \delta}
[usno-rise-set]

where φ is your latitude, δ is the declination, and h₀ = −0.833°. Earth rotates 15° per hour, so each degree of hour angle is 4 minutes.

Step 4 — Convert to clock time. The Sun crosses your meridian at apparent solar noon. Correcting for the equation of time (the Sun runs up to ~16 minutes fast or slow against the clock because Earth's orbit is elliptical and tilted) and your longitude's distance from the time zone's central meridian (1° = 4 minutes) gives the clock time[usno-eqtime][wiki-equation-of-time]:

solar noon=12:00EoT604(λλmeridian)15+UTC offset\text{solar noon} = 12{:}00 - \frac{\text{EoT}}{60} - \frac{4^{\circ} \cdot (\lambda - \lambda_{\text{meridian}})}{15} + \text{UTC offset}
[wiki-sunrise-equation]

Daylight duration is simply twice the hour angle, converted to hours:

T=215arccos(tanϕtanδ)T = \frac{2}{15} \cdot \arccos\left(-\tan \phi \cdot \tan \delta\right)
[wiki-sunrise-equation]

Golden hour (the light photographers love) is the window when the Sun sits between +6° and −4° above the horizon — soft, warm, low-angle light[noaa-calcdetails].

Reference Table: Daylight Hours at Key Latitudes

The table shows how dramatically daylight varies by latitude across the year. Values are daylight duration (Sun above the horizon) computed with the geometric formula:

LocationLatitudeSummer solsticeEquinoxWinter solstice
North Pole region70°N24h 00m (polar day)12h 00m0h (polar night)
Fairbanks, Alaska65°N21h 07m12h 00m2h 53m
Oslo, Norway60°N18h 29m12h 00m5h 31m
London, UK51.5°N16h 24m12h 00m7h 36m
New York, USA40.7°N14h 55m12h 00m9h 05m
Equator12h 00m12h 00m12h 00m
Buenos Aires34.6°S9h 41m12h 00m14h 19m
Sydney33.9°S9h 45m12h 00m14h 16m
Summer solstice daylight hours by latitude: daylight grows with distance from the equator, and the Northern Hemisphere's summer is the Southern Hemisphere's winter, so the two southern cities show the mirror image.

The pattern is beautiful: daylight at the summer solstice increases the farther you get from the equator, until you cross the Arctic Circle (66.5°N) and the Sun never sets at all. South of the equator the seasons flip — Buenos Aires and Sydney get their longest days in December, when the Northern Hemisphere has its shortest[wiki-daytime].

Practical Tips: Getting the Most From This Calculator

  • Daylight saving is included in the UTC offset. If your time zone uses DST, enter the offset including it (Eastern US: −4 in summer, −5 in winter). Entering the wrong offset shifts every result by exactly an hour.
  • Longitude must match your time zone's meridian for exact clock times. A degree of longitude is 4 minutes — if you're 3° east of the meridian, the Sun rises 12 minutes earlier than your clock suggests.
  • "Official" sunrise includes refraction. The Sun you see above the horizon appears up to ~4 minutes before the geometric sunrise. This calculator uses the official −0.833° definition, matching almanacs and weather apps.
  • Golden hour isn't 60 minutes. At the equator it's roughly 40 minutes; at 40° latitude it stretches past an hour; near the polar circles it can run for hours in summer. The calculator returns the actual window for your location and date.
  • Polar regions are handled. If the day has no sunrise (polar night) or no sunset (polar day), the calculator says so instead of returning nonsense times.
  • The formula is accurate to ~1 minute between ±72° latitude. Beyond that (or at very high altitude), atmospheric effects grow — treat results near the poles as approximate[noaa-calcdetails].
  • Check your hemisphere when reading the reference table. The daylight values in the table are given for the Northern Hemisphere's summer solstice. If you are in the Southern Hemisphere, swap the "summer" and "winter" columns — that is your year, just shifted by six months.

Limitations: What This Model Ignores

  • Atmospheric refraction is not constant. The fixed −0.833° assumes mean conditions. Temperature and pressure change refraction, shifting observed times by up to ~2 minutes; near the poles the error can reach ~10 minutes[usno-rise-set].
  • Observer altitude is ignored. Standing on a mountain delays sunrise and advances sunset (horizon dip ≈ 1.75′ × √height in meters) because you can see "over" the horizon. Sea-level is assumed.
  • Simplified declination. The classic cos-formula is accurate to about 0.5–1°, which is why results match almanacs to ~1 minute but not perfectly. The calculator uses the more precise NOAA series, but still not the full Meeus precision.
  • Polar boundaries are approximate. Near 66.5° latitude, the exact date of polar day/night shifts by a few days with refraction and the solar disc. The formula handles the bulk case, not the boundary weeks.
  • The geometric vs official gap. The reference table's daylight values are geometric (Sun center above horizon); the calculator's times use the official refraction definition, so the day appears about 6 minutes longer than geometry alone. Both conventions are standard — just know which one you're reading[wiki-daytime].

Frequently Asked Questions

What is the longest day of the year?
The summer solstice, around June 21 in the Northern Hemisphere and December 21 in the Southern. It's the day with the most daylight because Earth's axis leans your hemisphere toward the Sun. At 40°N the longest day runs about 15 hours; the equator doesn't have a 'longest day' — it's ~12 hours year-round.
Why does sunrise time change every day?
Two combined effects: the Sun's declination shifts daily as Earth orbits, changing the length of the day, and the equation of time drifts through the year (the Sun runs up to ~16 minutes fast or slow against the clock). That's why the earliest sunset comes before the winter solstice and the latest sunrise after it.
Why is golden hour not exactly an hour?
Golden hour is defined by the Sun's elevation (between +6° and −4° above the horizon), not a fixed clock span. The Sun's path angle varies with latitude and season, so the window ranges from ~40 minutes at the equator to hours near the polar circles in summer.
What is the difference between solar noon and 12:00 PM?
Solar noon is when the Sun crosses your meridian — its highest point of the day. Because of the equation of time and your longitude's offset from your time zone's meridian, it can fall anywhere from about 11:30 AM to 12:30 PM (or more) on your clock. In New York on the summer solstice it's 12:57 PM EDT.
Does daylight saving time affect the calculation?
Only through the UTC offset input. The astronomical computation is identical; DST just shifts which clock hours the Sun's position maps to. Enter the offset including DST (Eastern US: −4 in summer) and the times come out on your clock.
Can I use this for any place on Earth?
Yes — the algorithm is global. Between about ±72° latitude it matches almanacs to ~1 minute. Near the polar circles (66.5°+) polar day/night boundaries are approximate, and at extreme latitudes atmospheric effects grow. It assumes sea level and ignores mountains.
Why does the Sun rise about 4 minutes early?
Atmospheric refraction bends the Sun's light, so you see it above the horizon while it's geometrically below it. The official definition uses −0.833° (34′ refraction + 16′ solar radius), which adds roughly 4 minutes of visible daylight at each end.
What's the shortest day and when is it?
The winter solstice (around December 21 in the north, June 21 in the south). New York gets about 9h 09m of daylight; London about 7h 22m; places above the Arctic Circle get none. Interestingly, the earliest sunset actually falls before the solstice due to the equation of time.

References

  1. [1]NOAA Global Monitoring Laboratory. (2026). Solar Calculation Details.
  2. [2]U.S. Naval Observatory. (2026). Computing Times of Rise, Set, and Twilight.
  3. [3]U.S. Naval Observatory. (2026). The Equation of Time.
  4. [4]Wikipedia. (2026). Sunrise Equation.
  5. [5]Wikipedia. (2026). Equation of Time.
  6. [6]Wikipedia. (2026). Position of the Sun.
  7. [7]Wikipedia. (2026). Daytime.
  8. [8]PVEducation, Arizona State University. (2026). Declination Angle.

Last updated: August 17, 2026

1b

UnByte — Independent Software Engineering

Every calculator references authoritative sources — Editorial policy