No doubt the concept of a month arose with the repeated cycle of the Moon through its distinctive phases. This is the so-called synodic month (vide infra) of about 29 1/2 days. From excavated tally sticks, researchers have deduced that people counted days in relation to the Moon's phases as early as the paleolithic age. The phenomenon is still the basis of many calendars world-wide.
The motion of the Moon in its orbit is very complicated and therefore its period is not constant. Moreover, many cultures (most notably those using the Hebrew (Jewish) and Islamic calendars) start a month with the first appearence of the thin crescent of the new moon after sunset over the Western horizon. The date and time of this actual observation depends on the exact geographical longitude as well as latitude, atmospheric conditions, the visual acuity of the observers, etc. Therefore the beginning and lengths of months in these calendars can not be accurately predicted.
The actual period of the Moon's orbit as measured in a fixed frame of reference is known as a sidereal month (cf. sidereal year), because it is the time it takes the Moon to return to the same position on the celestial sphere among the fixed stars (Latin: sidus): about 27 1/3 days on average. This type of "month" has appeared among cultures in the Middle East, India, and China in the following way: they divided the sky in 28 lunar stations, characterized by asterisms (groups of stars): one for each day that the Moon follows its track among the stars.
It is customary to specify positions of celestial bodies with respect to the vernal equinox. Because of precession, this point moves back along the ecliptic. Therefore it takes the Moon less time to return to the equinox than to the same point amidst the fixed stars. This slightly shorter period is known as tropical month; cf. the analogous tropical year of the Sun. This type of month is not used much.
Like all orbits, the Moon's orbit is an ellipse rather than a circle. However, the orientation (as well as the shape) of this orbit is not fixed. In particular, the position of the extreme points (the line of the apsides: perigee and apogee), makes a full circle in about 9 years. It takes the Moon longer to return to the same apside because it moved ahead during one revolution. This longer period is called anomalistic month, and has an average length of about 27 1/2 days. The apparent diameter of the Moon varies with this period, and therefore this type of month has some relevance for the the prediction of eclipses (see saros), whose extent, duration, and appearence depend on the exact apparent diameter of the Moon.
The orbit of the Moon lies in a plane that is tilted with respect to the plane of the ecliptic: it has an inclination of about 5 deg. The line of intersection of these planes defines 2 points on the celestial sphere: the ascending and descending node. The plane of the Moon's orbit precesses over a full circle in about 18.6 years, so the nodes move backwards over the ecliptic with the same period. Hence the time it takes the Moon to return to the same node is again shorter than a sidereal month: this is called the draconic month, which has an average length of about 27 1/5 days. It is important for predicting eclipses: these take place when the Sun, Earth and Moon are on a line. Now (as seen from the Earth) the Sun moves along the ecliptic, while the Moon moves along its own orbit that is inclined on the ecliptic. The three bodies are only on a line when the Moon is on the ecliptic, i.e. when it is in one of the nodes. The "draconic" month refers to the mythological dragon that lives in the nodes and regularly eats the Sun or Moon at an eclipse.
The cause of the moon phases is, that from the Earth we see the part of the Moon that is illuminated by the Sun from different angles as the Moon traverses its orbit. So the appearence depends on the position of the Moon with respect to the Sun (as seen from the Earth). Because the Sun appears to move ahead among the stars as the earth completes its orbit, it takes the Moon some extra time to overtake the Sun after completing its sidereal month. This longer period is called synodic month (apparently from Greek "syn hodos": with the way, i.e. the Moon travelling with the Sun), and is considerably longer than the sideral month: about 29.53 days on average. Because of the perturbations of the orbits of the Earth (Sun) and Moon, the actual time between lunations may range from about 29.27 to about 29.83 days.
Here is a list of the average length of the various astronomical lunar months . These are not constant, so I provide a first-order (linear) approximation of the secular change:
sidereal month: 27.321661547 + 0.000000001857*y days tropical month: 27.321582241 + 0.000000001506*y days anomalistic month: 27.554549878 - 0.000000010390*y days draconic month: 27.212220817 + 0.000000003833*y days synodic month: 29.530588853 + 0.000000002162*y days
Note: time expressed in ephemeris time (more precisely TT) with days of 86400 SI seconds. y is years since the epoch (2000), expressed in Julian years of 365.25 days. Note that for calendrical calculations, one would probably use days measured in the time scale of universal time, which follows the somewhat unpredictable rotation of the Earth, and progressively accumulates a difference with ephemeris time called Delta-T.
 Derived from the ELP2000-85; see: M.Chapront-Touzé, J. Chapront (1991): "Lunar Tables and Programs from 4000 B.C. to A.D.8000". Willmann-Bell, Richmond VA; ISBN 0-943396-33-6
Continued fractions of the decimal value for the synodic month quoted above give succesive approximations for the average length of this month in terms of fractions of a day. So in the list below, after the number of days listed in the numerator, an integer number of months as listed in the denominator have been completed:
- 29 days
This is useful for designing purely lunar calendars, where months of 29 and 30 days occur in some pattern that repeats after some number of months. A recently invented pure lunar calendar called the Yerm Calendar (at http://hermetic.magnet.ch/cal_stud/palmen/yerm1.htm) makes use of all of the above approximations.
More importantly, in lunisolar calendars, an integral number of synodic months is fitted into some integral number of years. The average length of the tropical year divided by the average length of the synodic month, i.e. the number of synodic months in a year, is (for epoch J2000):
Continued fractions of this decimal value give optimal approximations for this value. So in the list below, after the number of synodic months listed in the numerator, an integer number of tropical years as listed in the denominator have been completed:
- 235/19 Metonic cycle
The last three have actually been used in calendars.