I would like to know the time it takes to go from sunset to dark based on GPS location.

In addition, ideally I would also like to have a formula that determines the percentage of sunlight at each minute past sunset. For example, after 15 minutes, there is only 50% sunlight left.

  • 3
    $\begingroup$ You will have to define "actual darkness", which may depend on the weather. $\endgroup$
    – gerrit
    Jun 21, 2017 at 13:34
  • 3
    $\begingroup$ The table in en.wikipedia.org/wiki/Lux#Illuminance might help. The illumination drops from 400 lux (lumen/m^2) at sunset to 3.4 lux by the end of civil twilight. $\endgroup$
    – user21
    Jun 21, 2017 at 15:17
  • $\begingroup$ There is an Excel VBA written by Greg Pelletier that can calculate Astronomical and Civil Dusk. It is pretty darned accurate. $\endgroup$
    – BillDOe
    Jun 21, 2017 at 19:26
  • $\begingroup$ While not an answer, if you just want to find out when it's really "dark dark" i.e. no sunlight at all to the human eye, that's called "astronomical dusk" or "end of astronomical twilight" or simply "night". Two websites that give this info are timeanddate.com/sun/usa/new-york and suncalc.net/#/39.2313,-77.4688,2/2022.03.18/19:17 $\endgroup$ Mar 18, 2022 at 23:38

1 Answer 1


One may define three forms of twilight on Earth. Although the actual amount of light depends on weather, topography, and land cover, they are defined as:

  • Civil twilight: Solar angle > -6°
  • Nautical twilight: Solar angle > -12°
  • Astronomical twilight: Solar angle > -18°

Human eyes see logarithmically so % of sunlight left is not a very useful measure, unless you are interested in incoming shortwave radiation for solar panel or other energy calculations.

To answer your question, you need to calculate at what time the Sun will be at those elevations below the horizon; this is calculated in a similar fashion to sunrise and sunset times. However, on top of that you also need to consider atmospheric refraction. See position of the Sun and sunrise equation. The formulae are quite complicated, but you may be able to simplify them if you're only interested in the duration, not the absolute times.

The time after sunset at which those occur are a function of latitude and time of year. On this carpet plot from Wikipedia you can read the length of different forms of twilight at 70°N (north of the Arctic circle):

carpet plot, 70°N

  • $\begingroup$ Stop with all the upvotes please, this answer is not complete! :-) $\endgroup$
    – gerrit
    Jun 21, 2017 at 22:36
  • $\begingroup$ A Google search: astronomical twilight time app $\endgroup$
    – Mazura
    Jun 21, 2017 at 23:13
  • $\begingroup$ Is the solar angle equivalent to the sun declination? $\endgroup$ Jun 29, 2017 at 7:17
  • $\begingroup$ Also, this is the solar elevation angle, not the solar zenith angle right? $\endgroup$ Jun 29, 2017 at 7:27
  • $\begingroup$ Yes. Subtract it from 90 to get the solar zenith angle. $\endgroup$
    – gerrit
    Jun 29, 2017 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .