# How often does the moon "set" for us compared to the sun?

I am working on a game, and I have a day/night cycle. Currently I have the sun. Currently every "sun day" is 24 hours, with that being said, how long is every "moon day"? In other words, how much does the moon lag behind the sun. I just need to figure out what the moons speed should be in relativity to the sun. I've done some searches, but wasn't quite sure how to properly word this question.

• the sun and the moon are essentially static... it's the Earth that rotates in 24 hours. The moon falls behind by about 50 minutes every day.
– f.thorpe
Jun 9 '15 at 2:41
• @farrenthorpe The Earth rotates in 23 h 56 m 4.1 s.
– gerrit
Jun 9 '15 at 10:02
• @gerrit yes with respect to the stars, not with respect to the sun. Not sure what your point is here other than to prove you know decimal places?
– f.thorpe
Jun 9 '15 at 12:30
• @farrenthorpe My point is that a solar day does not correspond to a single rotation of the Earth, but that it is a single rotation of the Earth /plus/ a fraction of the Earth rotation around the Sun. This is quite relevant for astronomical questions such as this one, as it causes the length of a solar day to vary during the year, which makes the answer to Jaydens question more involved. I'm not sure if a rotation on an axis is a relative or an absolute quantity.
– gerrit
Jun 9 '15 at 13:13
• Technically this is probably a question for astronomy.se, but we should be able to provide an answer here... The Google terms for the comment conversation above are "solar day" vs "sidereal day". The "moon day", as you put it is a little less straightforward. I'll try to put an answer together when near a PC later. Jun 10 '15 at 5:04

## 1 Answer

As noted in comments, the earth rotates on its axis in about 23hrs 56 minutes. This is known as the sidereal day, that is, the day with respect to background stars. (that's not quite true, but it's good enough unless you're dealing with periods of thousands of years with high accuracy - see the linked wiki article if you care about the detail).

At the same time, the Earth is also orbiting around the Sun in the same direction, and the combination of the Earth's spin and its orbit around the Sun gives us the 24-hour solar day that we are familiar with, and that you have already modelled in your game.

Now consider how the Moon rises and sets, when seen from a position on Earth. The primary cause of this is, again, the Earth's rotation with it's just-less-than-24-hours period. In addition, this time, one must consider the motion of the Moon around the Earth, which is again in the same direction as the Earth's spin. This results in a period of about 24 hr 50 mins for the apparent motion of the Moon across the sky (Source). For your game that may be sufficient info, although if you want to be accurate it is complicated.

Remember to also take account of the phases of the moon - because the whole earth-moon system is also in orbit around the sun, and because the moon is only visible via reflected light, the mere fact that the moon is above the horizon when seen from a given point on earth does not mean that it is visible.

• Nice VSauce episode about the moon terminator: youtube.com/watch?v=Y2gTSjoEExc Jun 10 '15 at 11:10
• Thank-you, that is what I was looking for was the 50 minute delay, I've got my system all working with moon & sun now. And moon phases are working as well, although I can't have lunar eclipses because my game world is not a globe. Jun 12 '15 at 22:10