CalcOpenly
English

Sunrise and sunset calculator

Sunrise and sunset times for any place and date, with solar noon, day length and civil twilight, worked out with NOAA's solar calculator method.

Drafted with AI writing toolsUpdated Checked examples: 5

° N
Decimal degrees; south is negative.
° E
Decimal degrees; west is negative.
= 2026-11-12
Try
Sunrise – sunset
07:13 – 16:15
Sunrise – sunset: 07:13 – 16:15
Sunrise
07:13
Sunset
16:15
Solar noon
11:45
Day length
9 h 2 min 9 s
Civil dawn (sun 6° below horizon)
06:37
Civil dusk
16:52
Daylight
Sun rises and sets
Sun's declination
−17.77°
Equation of time
15.90min
UTC offset used
London, UTC+00:00
Times assume a flat horizon at sea level with standard refraction; hills, buildings and weather can shift them by a few minutes.

On Thu 12 Nov 2026 at 51.5074° N, 0.1278° W the sun rises at 07:13 and sets at 16:15 (London, UTC+00:00), giving 9 h 2 min of daylight.

Sun's elevation on Thu 12 Nov 2026: daylight shaded, civil twilight in grey

-40°-20°0°20°05101520Local time (hours)ElevationHorizonCivil twilight limitSunriseSolar noonSunset
How it's calculated S
  1. Julian day and century

    JD=20769+2440587.5=2,461,356.5,T=JD−245154536525=0.26862423JD = 20769 + 2440587.5 = 2{,}461{,}356.5,\quad T = \frac{JD - 2451545}{36525} = 0.26862423
  2. Sun's position at solar noon

    δ=−17.7704∘,E=15.901 min\delta = -17.7704^\circ,\qquad E = 15.901\ \text{min}

    δ is the declination; E, the equation of time, is apparent solar time minus mean solar time.

  3. Hour angle of sunrise

    cos⁡H=cos⁡90.833∘cos⁡51.5074∘cos⁡−17.770∘−tan⁡51.5074∘tan⁡−17.770∘=0.37850⇒H=67.759∘\cos H = \frac{\cos 90.833^\circ}{\cos 51.5074^\circ \cos -17.770^\circ} - \tan 51.5074^\circ \tan -17.770^\circ = 0.37850 \Rightarrow H = 67.759^\circ

    90.833° allows for refraction (34′) and the sun's radius (16′).

  4. Clock times

    tn=720−4×−0.1278−E=704.61 min UTC,tr=433.23, ts=975.39t_n = 720 - 4 \times -0.1278 - E = 704.61\ \text{min UTC},\quad t_r = 433.23,\ t_s = 975.39

    The subscripts r, s and n denote sunrise, sunset and solar noon. Sunrise and sunset are recomputed once at the first estimate, then shifted by London, UTC+00:00.

About the sunrise and sunset calculator

The calculator follows NOAA's Solar Calculator, which uses Jean Meeus's formulas for the sun's declination and the equation of time on the chosen date. It then solves for the hour angle at which the centre of the sun is 90.833° from the zenith: the extra 0.833° allows 34′ for atmospheric refraction and 16′ for the sun's radius, so sunrise is the moment the top of the disc meets a flat horizon. Civil dawn and dusk use 96°, the sun's centre 6° below the horizon.

Photographers, walkers, sailors and anyone planning around daylight use it. In London on the June solstice 2026 the sun rises at 04:43 and sets at 21:22 BST, 16 h 38 min of daylight; on the December solstice the day lasts 7 h 50 min.

Times assume sea level and a clear, flat horizon. For the London, Singapore and Delhi examples below they match the US Naval Observatory's figures to the minute.

How sunrise and sunset times are calculated

Sunrise and sunset are the moments the top of the Sun's disk meets a flat, sea-level horizon, modeled as the Sun's center 0.833° below it. For Delhi on 15 January 2026 that puts sunrise at 07:15 and sunset at 17:46 IST, 10 h 31 min of daylight.

The 0.833° allows 34′ for atmospheric refraction, which lifts the Sun's image near the horizon, and 16′ for the Sun's radius. Civil dawn and dusk use the Sun's center 6° below the horizon, a zenith angle of 96°, with no refraction allowance.

The formula behind sunrise

The Earth turns 15° an hour, or 1° every 4 minutes. Sunrise comes H degrees of turning before solar noon and sunset H degrees after, where φ is the latitude and δ the Sun's declination:

cos H = cos 90.833° ÷ (cos φ × cos δ) − tan φ × tan δ

Solar noon, in minutes after midnight UTC, is 720 − 4λ − E, where λ is the longitude (east positive) and E the equation of time. Sunrise is solar noon minus 4H minutes and sunset solar noon plus 4H.

If cos H comes out above 1, the Sun does not rise that day (polar night); below −1, it does not set (midnight sun).

Sunrise worked by hand: Delhi, 15 January 2026

  1. NOAA's formulas, after Jean Meeus, give the Sun's declination δ = −21.11° and the equation of time E = −9.33 minutes for that date.
  2. With φ = 28.6139°: cos H = cos 90.833° ÷ (cos 28.6139° × cos −21.11°) − tan 28.6139° × tan −21.11° = 0.1928, so H = 78.88°, or 315.5 minutes of clock time.
  3. Solar noon is 720 − 4 × 77.209 − (−9.33) = 420.5 minutes after midnight UTC, about 12:30:30 IST.
  4. Sunrise is 420.5 − 315.5 = 105.0 minutes, 01:45 UTC or 07:15 IST. Sunset is 420.5 + 315.5 = 736.0 minutes, 12:16 UTC or 17:46 IST.

NOAA's procedure then repeats step 2 with the Sun's position at the estimated time, which moves these results by seconds. Day length is the time between the unrounded sunrise and sunset.

Sunrise and sunset examples

Place and dateDisplay offsetSunriseSunsetCivil twilight
London, 21 June 2026UTC+104:4321:2203:55–22:09
Singapore, 20 March 2026UTC+807:0919:1506:48–19:36
Delhi, 15 January 2026UTC+5:3007:1517:4606:50–18:12
Tromsø, 21 June 2026UTC+2No rise eventNo set eventSun stays above the limit
Tromsø, 21 December 2026UTC+1No rise eventNo set event09:31–13:53

The first three rows agree to the minute with the US Naval Observatory's daily data service.

In the Tromsø rows cos H falls outside −1 to 1, so there is no sunrise or sunset. The Sun stays up all day in June, and in December it stays below the horizon but comes close enough for civil twilight.

Why the earliest sunrise is not on the longest day

Sunrise and sunset sit almost symmetrically around solar noon, and solar noon drifts with the equation of time. In London in December 2026 it moves from 11:50 to 12:03 GMT, about half a minute a day near the solstice.

Day length then changes by only seconds a day, so the whole day slides later. London's earliest sunset, 15:51, comes on 12 and 13 December, the shortest day is 21 December, and the latest sunrise, 08:06, waits until 30 and 31 December.

June mirrors this: the earliest sunrise falls on 17 June and the latest sunset on 25 June, either side of the 21 June solstice.

Mistakes that shift the times

  • Flipping the longitude sign. West is negative. New York entered as 74.006° instead of −74.006° moves the point to Central Asia, and on a New York clock its sunrise lands at 19:33 the evening before.
  • Flipping the latitude sign. South is negative. At −40.7128° the same June date gives a winter day of 9 h 15 min instead of New York's 15 h 5 min.
  • Keeping a fixed UTC offset through daylight saving. London at UTC+0 on 21 June 2026 shows 03:43 and 20:22, an hour early, because British Summer Time is UTC+1.
  • Expecting the sunrise you see over hills or buildings. High ground to the east delays the visible sunrise, while a high viewpoint sees the Sun earlier than the sea-level time.

How accurate the times are

NOAA's calculation details rate the sunrise and sunset results to within a minute between 72° N and 72° S, and within 10 minutes beyond. Observed times can differ further, because refraction changes with temperature and pressure.

Errors grow toward the poles because the Sun crosses the horizon at a shallow angle there, and the times change fast. In Tromsø, sunrise moves from 09:45 on 18 November 2026 to 11:20 on 27 November, and from 28 November the Sun does not rise at all.

Coordinates and time zones

  • Decimal degrees with north and east positive: London is 51.5074, −0.1278. Convert degrees, minutes and seconds with the angle/DMS converter first.
  • A named time zone applies that zone's offset at solar noon on the date, daylight saving included. A UTC offset stays fixed and accepts fractions, such as 5.5 for UTC+5:30.
  • Times are rounded to the nearest minute; day length comes from the unrounded times.
  • The exact poles, ±90°, have no defined hour angle, so use 89.99° instead.

To compare clock times between cities, use the time zone converter. The moon phase calculator gives the Moon's phase for the same date.

Worked examples

London on the June solstice

Latitude
51.5074 ° N
Longitude
-0.1278 ° E
Date
2026-06-21
Show times in
Time zone
Time zone
London
Sunrise – sunset
04:43 – 21:22
Sunrise
04:43
Sunset
21:22
Solar noon
13:02
Civil dawn (sun 6° below horizon)
03:55
Civil dusk
22:09
Day length
16 h 38 min 30 s

Checked against: NOAA Solar Calculator main.js run in Node: rise 04:43:05, set 21:21:35, day 998.49 min; civil twilight from the same code at 96°; USNO API: rise 04:43, set 21:22, transit 13:02, civil twilight 03:55–22:09

Singapore at the March equinox, fixed offset

Latitude
1.3521 ° N
Longitude
103.8198 ° E
Date
2026-03-20
Show times in
UTC offset
UTC offset
8 hours
Sunrise
07:09
Sunset
19:15
Solar noon
13:12
Civil dawn (sun 6° below horizon)
06:48
Civil dusk
19:36

Checked against: NOAA Solar Calculator main.js: rise 07:09:00, set 19:15:29; USNO API: rise 07:09, set 19:15, transit 13:12, civil twilight 06:48–19:36

Midnight sun in Tromsø

Latitude
69.6492 ° N
Longitude
18.9553 ° E
Date
2026-06-21
Show times in
Time zone
Time zone
Oslo
Daylight
Midnight sun
Day length
1 d
Sunrise – sunset
Sun up all day

Checked against: NOAA main.js finds no sunrise or sunset on this date; USNO API: “Object continuously above the horizon”

Polar night in Tromsø, with civil twilight

Latitude
69.6492 ° N
Longitude
18.9553 ° E
Date
2026-12-21
Show times in
Time zone
Time zone
Oslo
Daylight
Polar night
Day length
0 s
Civil dawn (sun 6° below horizon)
09:31
Civil dusk
13:53

Checked against: USNO API: “Object continuously below the horizon”, civil twilight 09:31–13:53 (UTC+1); NOAA main.js at 96° gives 09:31:13 and 13:53:13

Questions

Why is the day longer than 12 hours at the equinox?

Because sunrise and sunset are timed at the top edge of the sun, and refraction lifts the sun's image by about 34′ near the horizon. Together they add several minutes of daylight at both ends. On 20 March 2026 the day lasts 12 h 6 min in Singapore and 12 h 10 min in London. In London, day and night are closest to equal on 17 March, three days before the equinox.

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

They are defined by how far the sun's centre is below the horizon: civil twilight ends at 6°, nautical at 12° and astronomical at 18°. In London on 21 June 2026 civil dusk comes at 22:09, 47 minutes after sunset. Around midsummer the sun gets no lower than about 15° below London's horizon, so astronomical twilight lasts all night.

What is solar noon, and why isn't it at 12:00?

Solar noon is the moment the sun crosses the meridian and stands highest in the sky. Clock time differs from it for three reasons: your longitude within the time zone, daylight saving time, and the equation of time, which varies from about −14 minutes in February to about +16 minutes in early November. In London in June solar noon is at about 13:02 BST.

Where do the midnight sun and polar night happen?

North of the Arctic Circle, at about 66.6° N, and south of the Antarctic Circle. In Tromsø, at 69.6° N, the sun stays above the horizon for weeks around the June solstice and does not rise from late November to mid-January. Even on 21 December, civil twilight there lasts from 09:31 to 13:53, so the polar night is not completely dark.

About this calculator

cos⁡H=cos⁡90.833∘cos⁡φcos⁡δ−tan⁡φtan⁡δ,tr/s=720−4(λ±H)−E min (UTC)\cos H = \frac{\cos 90.833^\circ}{\cos\varphi\cos\delta} - \tan\varphi\tan\delta,\qquad t_{r/s} = 720 - 4(\lambda \pm H) - E\ \text{min (UTC)}

Sources

  1. NOAA Global Monitoring Laboratory — Solar Calculator (and its main.js / spreadsheet)
  2. NOAA — Solar Calculation Details
  3. J. Meeus, Astronomical Algorithms, 2nd ed. (1998), ch. 25 and 28
  4. US Naval Observatory — Sun and Moon rise/set data (cross-check)

Checked against references

This calculator includes 5 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.