Moon phase estimator
Pick a date to see roughly what the Moon is doing. This is an approximate estimate, intended for planning a night out. It tells you whether the Moon will spoil a dark-sky trip, and how the phase will look. For exact times, use an almanac.
How it works
The script computes the longitudes of the Sun and the Moon from truncated series, keeping the largest terms of the lunar theory given in Jean Meeus’s Astronomical Algorithms. The phase is the angle between the two, and it gives the lit fraction. The times of the coming phases come from stepping that angle forward.
Expect the phase times to be right to within an hour or so. Actual moonrise and moonset depend on where you are, and this tool doesn’t calculate them. As a guide, use the table of phases. For rough planning: around full Moon you will lose all but the brightest stars, and in the week around new Moon you have the darkest nights of the month. A thin crescent does little harm, and no Moon does any harm once it has set.