The Chinese calendar is a combination of the lunar and solar systems. However, it is primarily lunar. The length of a lunar month is the length of time between two new moons. This cycle averages 29.53 days, but can vary by several hours at any given time of the year. A Chinese year normally consists of 12 months with each month corresponding to one lunar cycle. Each month starts on the day of the new moon. Since the cycle is not an even number of days, months in the lunar calendar vary between 29 and 30 days and a normal year can be 353, 354, or 355 days.
The Chinese calendar is also partially solar because seven times in a 19 year cycle, an extra leap month (runyue) is added to bring it back into line with the longer solar year. The modern Chinese lunar calendar, which seems to have been developed sometime in the third century BC, still designates some months as long (30 days) and some as short (29). The Chinese solar calendar does not correspond to the Gregorian calendar. The Chinese solar calendar is based on the movement of the sun over 24 named points 15 degrees apart on the 360-degree solar ellipsis. Each of them falls within a day or two of the same date in the Gregorian calendar each year.
To explain the basis for determining when leap months are added, one must first understand the Chinese system of solar terms. Twenty four dates, made up of 12 principle terms and 12 sectional terms, divide the solar year into 24 periods that are based on the earth's position around the sun. These include the equinoxes and the solstices. According to the Chinese calendar, the winter solstice must occur in the eleventh month of the year. A lunar month in which a principle term does not occur becomes a leap (or intercalary) month and is assigned the number of the month that preceded it, but it is still designated as a leap month. If this happens to occur twice in one year, only the first month in which it occurs is a leap month. The Chinese New Year starts on the second new moon after the winter solstice.
Chinese years, months, and days are also assigned a name based upon the Chinese system of heavenly stems and earthly branches. In this cyclical system, each year, month, and day is associated with one of the 10 heavenly stems and 12 earthly branches. Each successive time period has a new stem and branch, until it has gone through the stems six times and the branches five times, to give 60 unique combinations. In the case of years and dates, this gives a continuous cycle for thousands of years. This is similar for months, but in the case of a leap month, it is assigned its previous month's branch/stem combination with the leap designation added. This is why the combination is so easily calculated for years and days, but requires tables or complicated astronomical calculations to find months.