Moon Phase Widget
Add a Moon phase widget to your website. It draws the Moon as it looks tonight, or on any date you pick, and gives the illuminated percentage, the Moon's age and the dates of the next full and new moon.
Live preview
Exactly what your visitors will seeUnder the widget on your page: Powered by A2Z Tools
Embed code
<iframe src="https://a2z.tools/embed/w/moon-phase" title="Moon Phase by A2Z Tools" width="100%" height="680" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>
A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.
<div data-a2z-widget="moon-phase" data-height="680"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
Works with
How it works
The widget uses the same astronomy engine as the A2Z Moon Phase Calculator. Full and new moon times come from Jean Meeus's Astronomical Algorithms (chapter 49), which includes the periodic corrections; in our tests it agrees with US Naval Observatory phase times to within three minutes. The illuminated fraction comes from the Moon-Sun phase angle (chapter 48). The drawing shows the lit part as a half disc plus an elliptical terminator; south of the equator the Moon appears mirrored, so there is a hemisphere switch. For today the widget uses the current moment, and for other dates it uses 12:00 in the visitor's time zone.
Method
- Phase instants: Meeus ch. 49 mean phase JDE = 2451550.09766 + 29.530588861 k + ..., plus periodic and planetary corrections
- Illuminated fraction k = (1 + cos i) / 2, with the phase angle i from Meeus ch. 48
- Terrestrial Time to UT with Delta-T (Espenak-Meeus polynomials)
- Age = time since the previous new moon; names within about half a day of an exact phase use that phase's name
Limitations
- No moonrise, moonset, Moon altitude or distance; those need the observer's location.
- The drawing is schematic: the terminator is an ellipse and libration, earthshine and the Moon's tilt in the sky are not shown.
- Phase names and dates are astronomical; religious calendars that start a month on the first sighting of the crescent can differ by a day or two.
- Dates outside the years 1600-2400 are refused.
Where publishers use it
- Astronomy clubs and stargazing blogs planning dark-sky nights
- Fishing, gardening and outdoor sites where readers follow the lunar cycle
- Photography sites planning moonrise and full-moon shoots
- Festival calendars tied to the new or full moon
Questions
How accurate are the full and new moon times?
Our tests compare them with the US Naval Observatory's published phase times for dates from 1990 to 2060, and every one agrees within three minutes. The widget accepts years 1600 to 2400; far from the present, the uncertainty in Delta T (Earth's irregular rotation) makes the clock times less certain.
Why does the Moon look reversed in Australia?
Seen from the southern hemisphere the Moon is upside down compared with the northern view, so the lit side appears on the opposite side. Choose "Southern hemisphere" to draw it that way.
Is the phase different in different countries?
No. The phase is the same everywhere at a given moment; only the local date and time of each event change with the time zone.
Does it show moonrise and moonset?
No. Those depend on your exact location; the widget covers the phase, illumination and phase dates.
Sources
- Astronomical Algorithms, 2nd ed., chapters 48-49 - Jean Meeus, Willmann-Bell (1998) . Phase instants (ch. 49) and illuminated fraction (ch. 48); print book
- Dates of Primary Phases of the Moon - US Naval Observatory, Astronomical Applications Dept. . Reference times the widget is tested against
- Polynomial Expressions for Delta T - NASA GSFC (Espenak and Meeus) . Terrestrial Time to Universal Time
Cite or recommend this tool
If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.
A2Z Tools Moon Phase https://a2z.tools/moon-phase-calculator
<a href="https://a2z.tools/moon-phase-calculator">A2Z Tools Moon Phase</a>
[A2Z Tools Moon Phase](https://a2z.tools/moon-phase-calculator)
Moon Phase by A2Z Tools - https://a2z.tools/moon-phase-calculator
Related widgets
-
Sunrise, sunset, solar noon, day length and twilight for any place and date.
-
A keyboard-friendly month calendar with today highlighted and your own marked dates.
-
Fajr, Sunrise, Dhuhr, Asr, Maghrib and Isha for any place, with the major calculation methods.
-
Live days, hours, minutes and seconds to a date you set, with an "event has started" message.
-
Exact age in years, months and days, totals in months, weeks and days, and the next birthday.
-
Convert a date and time between any two time zones, with daylight-saving gaps and overlaps explained.