# How is the time of sunrise and sunset determined?

If I do a quick Google search for amsterdam sunrise, I immediately get the time back: 6:42 AM.

How is this time calculated?

(I mean how it is really calculated, not how Google get it, with is probably from a table. Of course I mean sunrises and sunsets in the future, not from the past. $:)$)

• Do you know about the sunrise equation? Scroll down to the bottom. – HDE 226868 Aug 25 '16 at 20:02
• Thanks, no. From what I read I can calculate $\omega_o = \text{acos}{(-\tan(\phi)\tan(\delta))}$ with in my case $\phi = 50^{\circ}$. How do I get the value of $\delta$ and how do I convert $\omega_o$ to HH:MM (hours and minutes)? Thanks in advance. – Kevin Aug 25 '16 at 20:11
• For $\delta$, see here. You just need to find the solar declination of the day. $\omega_o$ is a spatial coordinate, not a length of time. For the date, you need to do a bunch of intermediate calculations, then find the Julian date. – HDE 226868 Aug 25 '16 at 20:17
• You can use the CSPICE libraries to calculate it exactly, and USNO publishes it for a wide variety of locations, but I think you're asking: what simple equation does this so that websites can use it (or use JavaScript) without having to do super-precise calculations? – user21 Sep 1 '16 at 17:16
• Yes, that's what I meant to ask. 🙂 – Kevin Sep 2 '16 at 11:56