Understanding the Lunar Cycle
The Moon completes one orbit of Earth in a synodic month of approximately 29.53059 days — the time from one new moon to the next. The eight primary phases are: New Moon, Waxing Crescent, First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Third Quarter, and Waning Crescent. A lunation (single synodic month) averages 29 days, 12 hours, 44 minutes, and 2.9 seconds. This differs from the sidereal month (27.32 days — the Moon's orbital period relative to distant stars) because Earth is simultaneously orbiting the Sun.
The Moon's phase can be calculated from the Julian Date: the reference new moon on 6 January 2000 at 18:14 UTC had JD = 2451550.1. Dividing elapsed days by the synodic period and taking the fractional part gives the phase fraction (0.0 = new, 0.5 = full). Lunar months were the basis of early calendars — the Hebrew, Islamic, and Chinese calendars are all lunisolar or purely lunar.