geoprimsField-grade geospatial math

Sunrise, sunset, and twilight explained

How sunrise and the three twilights are defined, why published times disagree, and what they mean for flying a drone near dawn and dusk.

For drone operators · updated 2026-09-23

Sunrise and sunset are the moments the top edge of the sun meets a flat, clear horizon. By convention that is when the center of the sun is 0.833° below the horizon: half the sun’s width, plus the amount the air bends light near the ground. Twilight is the time before sunrise and after sunset when the sky is still lit. It comes in three stages, civil, nautical, and astronomical, which end when the sun’s center is 6°, 12°, and 18° below the horizon.

Why it matters

For a drone pilot the times set the rules. Under Part 107, flying in the 30 minutes after sunset or before sunrise needs anti-collision lighting, and flying at night also needs the updated training. The sun’s height also decides how a mapping flight comes out: a low sun leaves long shadows and dim light.

How the times are worked out

The US Naval Observatory defines sunrise and sunset as the moment the center of the sun is at a geometric zenith distance of 90.8333°, which is 50 arcminutes below the horizon. That 50 arcminutes is 16 for the sun’s apparent radius and 34 for the average bending of light by the atmosphere at the horizon.

The method has three steps:

  1. Where the sun is. For a date and time, work out the sun’s position against the stars, then its angle north or south of the equator (declination) and its hour angle from your longitude. The sun position tool uses the NREL Solar Position Algorithm for this and shows the NOAA result beside it.
  2. How high it is. From your latitude, the declination, and the hour angle, find the sun’s elevation above the horizon.
  3. When it crosses. Search the day for the moments the elevation passes −0.833° (sunrise and sunset), −6° (civil), −12° (nautical), and −18° (astronomical).
Event Sun’s center What you see
Sunrise, sunset 0.833° below Top of the sun on the horizon
Civil twilight ends 6° below Lights needed for most outdoor work
Nautical twilight ends 12° below The horizon fades from view
Astronomical twilight ends 18° below Starlight outshines the sun’s glow: fully dark

A worked example

Denver on June 21, 2026, the summer solstice, in local daylight time (UTC−6), from the sunrise and twilight tool:

Event Morning Evening
Astronomical twilight 03:30 22:34
Nautical twilight 04:18 21:46
Civil twilight 05:00 21:04
Sunrise, sunset 05:32 20:31

Morning times are when each stage begins, and evening times when it ends. Solar noon is 13:02 and the day is 14 h 59 min long. Civil twilight runs 32 minutes in the morning and 33 in the evening. Solar noon falls after 1 pm because Denver keeps daylight saving time in summer.

Farther north the stages stretch. In Anchorage on the same date, the sun rises at 04:20 and sets at 23:43 local, and it never gets 6° below the horizon, so civil twilight lasts all night.

Why your weather app says something different

Two sources can disagree by a minute or more, and both can be reasonable.

NOAA gives its sunrise and sunset results as good to within a minute between 72° north and south, and within 10 minutes closer to the poles, where the sun crosses the horizon at a shallow angle.

Part 107 and civil twilight

For Part 107, §107.29(c) does not use the 6° definition. Outside Alaska, civil twilight is a fixed period: from 30 minutes before official sunrise to sunrise, and from sunset to 30 minutes after. In Alaska it is the Air Almanac’s civil twilight.

In Denver on June 21 that makes the evening twilight 20:31 to 21:01, while the sun reaches 6° below at 21:04. During Part 107 civil twilight, and at night, the drone needs anti-collision lighting visible for at least 3 statute miles. At night the remote pilot also needs to have passed the knowledge test or training under §107.65 after April 6, 2021. For the manned-aircraft rules, which use other definitions of night, see when is it night in aviation.

Golden hour and mapping light

Golden hour has no official definition. Photographers use it for the time when the sun is low, and a common working limit is 6° above the horizon. Setting the mapping light window to 6° in Denver on June 21 shows the sun above 6° from 06:13 to 19:51, so the evening’s low light runs from 19:51 to sunset at 20:31.

Mapping wants the opposite: a high sun and short shadows. At the default 30° threshold, the same day’s window is 08:23 to 17:40, 9 h 17 min, with the sun peaking at 73.7°. The sun position tool shows the difference. A 10 m object casts a 2.92 m shadow at solar noon, when the sun is 73.7° up, and a 37 m shadow at 19:00, when it is 15.1° up.

Common mistakes

Where the numbers come from

The definitions are the US Naval Observatory’s. The solar position follows the NREL Solar Position Algorithm, cross-checked against NOAA’s equations. The sunrise and twilight tool gives every event in local time and Zulu, and says so when the sun never rises, never sets, or twilight never ends. The Part 107 rule follows the current eCFR text of 14 CFR 107.29.

Try it: Sunrise, sunset, and twilight

The calculator below is the real tool, running its worked example. Change any value; nothing leaves your device.

2026-06-21 05:32local (2026-06-21 1132Z)

Sunrise is 2026-06-21 05:32 local (2026-06-21 1132Z) and sunset is 2026-06-21 20:31 local (2026-06-22 0231Z).

Sunset
Solar noon
Day length
Civil dawn
Civil dusk
Nautical dawn
Provenance
Computed by
time.sun.events 1.0.2, core 0.1.0
Model
Geometric sun from the NREL Solar Position Algorithm; each crossing found by bisection between the day's highest and lowest points, which also decide polar states; sunrise and sunset at −0.833° (minus horizon dip when a height is given); solar noon from the NOAA equation of time
Accuracy
Within 1 minute of USNO on 1,200 events (300 places and dates, 94% to the same minute), including twilights that graze their altitude
Notes
None
Cites
Reda, I., and Andreas, A., National Renewable Energy Laboratory, Solar Position Algorithm for Solar Radiation Applications (NREL/TP-560-34302); NOAA Global Monitoring Laboratory, NOAA Solar Calculator: General Solar Position Calculations; Meeus, J., Willmann-Bell, Astronomical Algorithms

Open the full tool, with your values →

Your values

Showing an example. Change anything.
More options 1

Tools for this

Sources

Every number on this page comes from the tools above, which cite their sources on their own pages under "How we got this." Found a mistake? Use "Report a problem" at the bottom of the page.