How Moon phase works
Moon Phase calculates the phase of the moon for any date you choose, together with the illumination percentage, and the dates of the next full moon and new moon, all using local astronomical formulas inside your browser. There is no API call to an external ephemeris service; the calculations use the synodic period of the moon and the Julian date of a known reference new moon to determine the current age and phase. Nothing you enter leaves your device.
The illumination percentage is derived from the moon's phase angle using a standard formula from Jean Meeus's Astronomical Algorithms. The phase name (new moon, waxing crescent, first quarter, waxing gibbous, full moon, waning gibbous, third quarter, waning crescent) is determined by the fraction of the synodic cycle elapsed since the last new moon. For dates in the near future or recent past, the results match published almanac data to within a few hours.