The epact (Latin epactae, from Greek: epaktai hèmerai = added days) has been described 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 varies (usually by 11 days) from year to year, because of the difference between the solar year of 365-366 days and the lunar year of 354-355 days.
Lunar calendar 
Epacts are used to find the date in the lunar calendar from the date in the common solar calendar.
Solar and lunar years 
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.
19-year cycle 
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 (leap 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.
Lilian (Gregorian) epacts 
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:
- a "solar equation", decrementing the epact by 1, whenever the Gregorian calendar drops a leap day (3 times in 400 calendar years), and
- a "lunar equation", incrementing the epact by 1, 8 times in 2500 calendar years (seven times after an interval of 300 years, and the eighth time after an interval of 400 years).
The "solar equation" would adjust for the Gregorian change in the solar calendar, if they were applied at 1 January of the Julian calendar instead of the Gregorian calendar as the reformers implemented it; moreover the corrections to the solar calendar are leap days, whereas there are 30 epact values for a mean lunar month of 29.5 days and a bit: therefore changing the epact by one does not exactly compensate a dropped leap day. 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.
See also 
- Wikisource English translation of the (Latin) 1582 papal bull 'Inter gravissimas' instituting Gregorian calendar reform
- O Pedersen, "The Ecclesiastical Calendar and the Life of the Church", pages 17-74 in G.V. Coyne (ed.), The Gregorian Reform of the Calendar: Proceedings of the Vatican conference to commemorate its 400th anniversary. (Vatican City: Specola Vaticana), 1983, see especially pages 39-40.
- Latin text and French translation of the Second Canon of the Gregorian calendar
- See papers given at a 1983 commemorative conference on the 400th anniversary of the Gregorian reform.