The epact (Latin epactae, from Greek: epaktai hèmerai = added days) was originally defined as the age of the moon in days on January 1, and occurs primarily in connection with tabular methods for determining the date of Easter. It differs (usually by 11 days) from year to year, because of "the number of days by which the common solar year of 365 days surpasses the common lunar year of 354 days".
Epacts are used to find the date in the lunar calendar from the date in the common solar calendar.
A (solar) calendar year has 365 days (366 days in leap years). A lunar year has 12 lunar months which alternate between 30 and 29 days (in leap years, one of the lunar months has a day added).
If a solar and lunar year start on the same day, then after one year, the start of the solar year is 11 days after the start of the lunar year; after two years, it is 22 days after. These excess days are epacts, and are added to the day of the solar year to determine the day of the lunar year.
Whenever the epact reaches or exceeds 30, an extra (embolismic or intercalary) month is inserted into the lunar calendar, and the epact is reduced by 30.
Leap days extend both the solar and lunar year, so they do not affect epact calculations for any other dates.
The tropical year is about 365¼ days, while the synodic month is also slightly longer than 29½ days on average. This gets corrected in the following way. Nineteen tropical years are as long as 235 synodic months (Metonic cycle). A cycle can last 6939 or 6940 full days, depending on whether there are 4 or 5 leap days in this 19-year period.
After 19 years the lunations should fall the same way in the solar years, so the epact should repeat after 19 years. However, 19 × 11 = 209 , and this is not an integer multiple of the full cycle of 30 epact numbers (209 modulo 30 = 29, not 0). So after 19 years the epact must be corrected by +1 in order for the cycle to repeat over 19 years. This is the saltus lunae (jump of the moon). The sequence number of the year in the 19-year cycle is called the Golden Number. The extra 209 days fill 7 embolismic months, for a total of 19×12 + 7 = 235 lunations.
When the Gregorian calendar reform was instituted in 1582, the lunar cycle previously used with the Julian calendar to complete the calculation of Easter dates was adjusted also, in accordance with a (modification of a) scheme devised by Aloysius Lilius. There were two adjustments of the old lunar cycle:
The "solar equation" adjusts exactly for the Gregorian change in the solar calendar. The "lunar equation" adjusts approximately for what had (by 1582) become the experience of many centuries, that the Moon moves a little faster than the expectation of its rate embodied in the old lunar cycle. By 1582 it was noted (e,g, in the text of the bull Inter gravissimas itself) that the new and full moons were occurring "four days and something more" sooner than the old lunar cycle had been indicating.