How moon phase calculator works
The Moon shows phases because it orbits Earth every 29.530588853 days (the mean synodic month) while reflecting sunlight, so the lit fraction we see grows from new (0%) to full (100%) and back. This calculator anchors that cycle to the reference new moon of January 6, 2000 (Julian day 2451550.1) and counts how many synodic months have elapsed since.
The remainder of that count — the phase fraction from 0 to 1 — gives everything at once: the phase name (each eighth of the cycle is named after the principal phase it centers on), the illuminated fraction (1 − cos 2πf) ÷ 2, the moon's age in days, and how long until the next new and full moon. Dates before 2000 work too — the arithmetic simply runs backward through earlier cycles.
Because the Moon's orbit is elliptical, real lunations run about ±0.6 day around the 29.53-day mean, so a date-only estimate can be off by roughly half a day near a phase boundary — plenty for calendars, stargazing plans and curiosity, not for eclipse timing. All math runs in your browser.