The Moon’s appearance follows a predictable 29.53-day cycle from new moon to full and back. This calculator converts any calendar date into a Julian Day Number, compares it to a known new moon, and reports the lunar age, the named phase, and the percent of the disc that is illuminated.
How it works
The date is first turned into a Julian Day Number (JDN), a continuous count of days used in astronomy. The lunar age is then the JDN distance past a reference new moon, reduced into one synodic month:
age = (JDN − reference_new_moon_JDN) mod 29.53059
frac = age / 29.53059 (0 = new, 0.5 = full)
illum = (1 − cos(2π × frac)) / 2 × 100%
The phase angle 2π × frac sweeps from 0 at new moon to π at full moon. The
cosine model maps that angle to the lit fraction of the disc, which peaks at 100
percent at full moon and falls to roughly 0 at new moon. The named phase comes
from which eighth of the cycle the age falls into.
Example and tips
A date 7.4 days after a new moon sits near the first quarter, about half illuminated and waxing. For deep-sky astrophotography, target the nights within three or four days of new moon, when illumination is below roughly 25 percent. The few days around full moon are best reserved for the Moon itself, bright planets, or simply staying indoors and processing old data.