home  | iceberg coding society  |  colony projects  |  reviews  | 


penguins  in treasure chest


moon phases calculator








To calculate the phase of the moon we used three steps:
First we chose a reference date when a new moon occured. We chose January 6, 2000 as it is commonly used. January 6, 2000 was the first new moon of the year 2000).

Then we calculate the days that are between the day we want to know the moon phase of and the reference date we chose above.

If we have this, we can calculate the "age" of the moon since the last new moon. To calculate this we take the remainder of the division of the calculated days and 29.53058867.

Because the moon's phases repeat in a continuous cycle, a total count of thousands of days doesn't tell us where we are in the current cycle.

We need to take the remainder (using the modulo operation) of the total days divided by 29.53058867. This strips away all the completed past cycles and leaves us with only the fractional remainderβ€”the exact "age" of the current lunar cycle in days. 29.53058867 is the average length of a lunar cycle in days. It is the length of a synodic month (the time it takes the moon to go through all its phases from one new moon to the next, averaged out over long periods to account for the elliptical orbits of both the earth and the moon).

To now get the moon phase we need to map the "age" of the moon to the moon phases. Each phase is assigned a specific time window proportional to how long that visual appearance lasts in the sky!

Well, the 8 phases are a convention. They are used to break down a continuous cycle into manageable parts. There are 4 events or landmarks: new moon, first quarter, full moon and third quarter. They happen at one time. It's new moon when when the moon is not visible from earth because its illuminated side is facing away from us. It's a first quarter moon when the right half of the moon is lit. The full moon occurs when the entire face of the moon is illuminated. If it is the last (or third) quarter moon the left half is lit.

Note: If you view the moon from the southern hemisphere, the left and right halves for the quarter moons appear mirrored.

The other 4 phases are the times between those events. They are waxing crescent, waxing gibbou, waning gibbous and waning crescent

To "wane" means to diminish and "to wax" means to increase. "crescent" and "gibbous" both refer to the shape of the illuminated moon, A crescent moon is a thin curved shape. A "gibbous" looks more football shaped. The shape of a waxing and waning crescent or of a waxing and waning gibbous is the same. But when it's the left side of the moon that's lit then it's waning (again assuming we are on the northern hemisphere).


If you want you can write us at: