Last update: 6/1/96

6/1/96: Please read the note at the top of the Luna's Links page ( in regards to the leap year calculation, which actually currently has some inaccuracies in it...


1) Introduction
2) On Simplicity
3) On Moon Cycles
4) On Points of Reference
5) On Accuracy of Results
6) An Outline of the Process
7) An Example Detailing the Process
8) Some Final Notes

1) Introduction

This page is meant for anybody who is interested in the technical specifics and detailed process of calculating the phase of the moon for a given date in history. Or even if you just have an idle curiosity about how to go about making calculations like these. Of course, the safest and easiest way to go about finding out the moon phase associated with a particular date in history would probably be to consult a complied list of historical moon phase data. Unfortunately, I don't have access to a list of data such as this; if anybody knows where one could obtain something like that, please let me know, and I'll attach the info to these Web pages. Anyway, getting back to the point, this page, regardless of anything else, will be looking at the method of making moon phase calculations.

2) On Simplicity

On the simplest level of looking at things, making a moon phase calculation is really quite, well... simple. All you need is one accurate reference point in time (for which you know the exact phase of the moon), and the exact length of time it takes for the moon to make one full cycle, and you can calculate the moon phase for any date at all, past or future.

Two things? That's all you need? Yes. Well, pretty much. You obviously also need to know about how the calendar works (days per month, leaps years, etc.) in order to be able to figure the length of time from your reference point. But yeah, two things. That's all you need.

3) On Moon Cycles

So let's look at moon cycles. When looking at the orbit of the Moon around the Earth, there are two ways you can look at things. You can use the Sun as your frame of reference (synodic month), or you can use the stars as your frame of reference (sidereal month). Since we're looking at the phases of the moon, and since the phases of the moon are determined by the positions of the Earth and the Moon in relation to the Sun, we're interested in synodic months. The most precise figure for one synodic month (the amount of time from one new moon to the next) I've been able to find is: 29.5306 days. So that's what I'll be using in my calculations.

4) On Points of Reference

Okay, now that we have a figure for the length of one synodic month, all we need is a point of reference from which to base our calculations. Ideally, we would want an exact time on a specific day for which we had knowledge of the exact moon phase data for. (for example, "at (specific time) on (specific day), the moon will be *precisely* full" (or new, or whatever)) Unfortunately, I haven't been able to dig up data as precise as that. The most precise I've been able to find such data is down to the day. While all we *really* need is one point of reference, in order to make things simpler for both manual and computer-aided calculation, we're going to be looking at a slightly larger set of reference point data. Here is the data I used for the BASIC program I wrote: a list of new moons from the year 1995.

     January 1     January 30     March 1      March 31
     April 29      May 29         June 28      July 27
     August 26     September 24   October 24   November 22
     December 22

5) On Accuracy of Results

The accuracy of the results one obtains from any given source data obviously depends upon the accuracy of the source data itself. In this case, I'm pretty sure that the figure for the length of one synodic month is fairly accurate, if not completely so. However, as already stated, the source data for the reference points (1995 new moons) being used is accurate only to the day, and not to the precise time. Thus, the results one obtains from calculations based upon these reference points will have a margin of error of up to one full day (at most). Though in most cases, this is not something which will greatly affect the categorization of a date to a particular moon phase ("new" vs. "crescent", "crescent" vs. "half", etc.), it is, nevertheless, something which should be kept in mind, as cases will occasionally occur where the categorization will become uncertain because of this.

And while on the subject of (in)accuracy, do also keep in mind that, due to such things as round-off processes, any calculations which involve non-integers (which these moon phase calculations definitely do) have potential inaccuracies resulting from number manipulation processes. Again, this is something which should not make too significant a difference (indeed, in all likelihood much less of a difference than the lack of precision in the new moon source data above will make), but is nevertheless something one should be aware of.

Anyway, now that all of that is out of the way, we can now proceed to...

6) An Outline of the Process

Okay, now. So how do we go about doing this, then? Here's a simple outline of the steps we'll be going through.

  - Select a date for which you want to figure the moon phase for.
  - Figure out the time span between that date and your reference point.
     - for the sake of simplicity, find a reference point relatively close
       to the date in question (as far as month and day, not year)
     - take leap days into account, if necessary
  - Convert time span and length of synodic month to same units.
  - Divide time span by length of synodic month, and look at remainder.
  - Convert remainder into units of days.
  - "Invert" days wrt moon phase scale, if necessary (i.e. looking at a date
    previous to the reference point date).

And that's it. After that, you just consult a chart relating "days into the synodic cycle" to "moon phase" (don't worry... that's included herein as well).

The BASIC program I wrote actually does things a little differently, but all it's really doing is slightly changing the order of things. Instead of looking at the full time span from the reference point to the date in question, it looks first at a whole number of years, makes a calculation based upon that, and then adds on the proper number of days to get from the day equivalent to the reference point in the year in question, to the actual day in question.

If that sounded a little confusing, let's consider the following date: July 20, 1969. Instead of looking at the complete span of time between June 28, 1995 (the new moon immediately preceding July 20, 1995) and July 20, 1969, the BASIC program first looks at the span of time between June 28, 1995 and June 28, 1969... and then after making that calculation, adds the proper number of days to get it from June 28, 1969 to July 20, 1969... which in this case is 22 days. I did things this way in the BASIC program because, at the time, it seemed like an easier way of handling the calculations. In retrospect, it's probably just as simple to do the calculation all at once... but as the result should still be the same... (shrug)

Anyway, let's look at a specific example now, now that we know more or less what we're going to be doing...

7) An Example Detailing the Process

Well, since we've already brought up July 20, 1969, why don't we use that date as an example. So... looking through the list of 1995 new moons, we find that June 28, 1995 is the new moon immediately preceding the equivalent 1995 date. So we'll be using that as our reference point.

So now we want to figure out what the time span between June 28, 1995 and July 20, 1969 is. Well, it's basically going to be 26 years (1995 - 1969 = 26) minus however many days there are between June 28 and July 20 (remember, in going from 1995 to 1969, we're going backwards in time, so we subtract, rather than add this number)... which is 22 days.

Okay, so there are 365 days in a year. So... (26 years * 365 days/year = 9490 days). 9490 days... minus 22 = 9468 days.

But wait! We forgot leap days! Between 1995 and 1969 are... 6 leap years (26 years / 4 years/leap year = 6.5). (1992, 1988, 1984, 1980, 1976, 1972.) If the year in question were a leap year, we'd have to see whether to take that leap day into account, which we would have to only if the date in question were in January or February. But since 1969 isn't a leap year, all we do is count up the number of leap years to obtain the number of leap days... which is 6. So we add 6 to our total of days.

9468 + 6 = 9474 days. There are 9,474 days between the new moon on June 28, 1995, and the day in question, July 20, 1969. So now we simply divide that number of days into the length of the synodic month, in days, and this will give us the number of synodic months between these two dates.

9474 days / 29.5306 days/synodic month = 320.8197598... (or 320 R 24.208 = 320 synodic months & 24.208 days)

The remainder is actually the only thing we're interested in. 24.208 days = 0.8197598 synodic months (the same decimal value as you see above, in "320.8197598"), btw. You can convert between them by dividing and multiplying, respectively, by 29.5306.

Anyway, the remainder of days tells us the number of days into the synodic cycle we've gone... but since we're going backwards in time in these calculations (from 1995 to 1969), this is the number of days from the *top* of the cycle, rather than from the bottom. To convert to the number of days from the bottom of the cycle, we simply subtract this value from a full cycle (29.5306 days).

29.5306 - 24.208 = 5.3226 days.

5.3226 days from the bottom of the cycle... or 5.3226 days into the synodic month. And that's our answer. Now we consult the following chart:

    0     3.69    7.38   11.07  14.77   18.46   22.15   25.84  29.53
   new  crescent  half  gibbous  full  gibbous  half  crescent  new
        (waxing) (wax.)  (wax.)       (waning) (wan.)  (wan.)

...which places our date in question (July 20, 1969) somewhere between a waxing crescent and a waxing half moon, a little closer to the crescent than the half. And there you have it. We're done.

8) Some Final Notes

Recalling the earlier notes about the (im)precision of the reference point data, it should strike you in this example we just went through, that the date in question (July 20, 1969) is rather close to the "dividing line" between the waxing crescent and waxing half moons. In fact, it is only about 0.21 days from that line. So since the reference point data used has a potential margin of error of up to 1 full day, without more precise reference point data, it's not definitively possible to say which moon phase it is in fact closer to. So for now, the best we can do is say that it lies somewhere in between...

So anyway, if anybody has any leads to obtaining either more precise reference point data, or collections of historical moon phase data, please send word to me, so that I can update these Web pages appropriately. Thanks.

auspice.bas - BASIC program (by Richard Uyeyama) that calculates the moon phase for a given date. V1.0, 5/15/96. Read the header comments.

(Back to Luna's Links)
(Back to the main homepage)

Richard Uyeyama / (