Calculating the Date of Easter

This page was first written in 1996. A revised version of it can be found at almanac.oremus.org/easter/computus.

The tables which appear here and, in more detail, in the Book of Common Prayer can be used to determine the date of Easter. Underlying these tables is a relatively simple algorithm which is described here. This description assumes a limited mathematical knowledge, particularly of integer division and remainders, or modulo arithmetic. The algorithm applies to any year since the introduction of the Gregorian Calendar, which in Britain was in September 1752.

We refer to the year number as y, and use it to calculate the Golden number, g:

g = y mod 19 + 1
Next we calculate the date of the Paschal full moon, that is, the full moon which Easter is the Sunday after. This is done in several stages. First we calculate two values called the solar correction, s, and the lunar correction, l.
s = (y - 1600) div 100 - (y - 1600) div 400
l = (((y - 1400) div 100) × 8) div 25
Next we calculate an uncorrected date for the Paschal full moon, p'; then we apply a minor correction to get the exact date, p, as the number of days after 21st March.
p' = (3 - 11g + s - l) mod 30
if (p' == 29) or (p' == 28 and g > 11) then
   p = p' - 1
else
   p = p'
Now we need to determine the date of the following Sunday. First we calculate the 'Dominical number', d:
d = (y + (y div 4) - (y div 100) + (y div 400)) mod 7
Note that this is the number from which the Dominical letter is determined, and we calculate d', which is the date on which the first Sunday of the year falls:
d' = (8 - d) mod 7
We already have p, the date of the Paschal full moon in days after 21st March. Next we determine p'' the first date in the year which falls on the same day of the week as the Paschal full moon. First we determine the 'day number' of p with respect to 1st January. This is 31 + 28 + 21 + p = 80 + p. (Note that we can disregard possible occurences of 29th February, because the calculation of d has already taken this into account, and we shall see that these two values will cancel each other out.) p'' is then given by the formula:
p'' = (80 + p) mod 7
= (3 + p) mod 7
The difference between d' (the first Sunday in the year) and p'' (the day of the week when the Paschal full moon falls) gives us the number of days that must be added to p to get the date of the following Sunday, which is Easter Day. There is one further subtlety. This number must lie in the range 1-7, rather than 0-6, since Easter is not allowed to fall on the same day as the Paschal full moon. We first determine x', the difference between d' and p'':
x' = d' - p''
= (8 - d) mod 7 - (3 + p) mod 7
= (8 - d - (3 + p)) mod 7
= (5 - d - p)) mod 7
To force this to lie in the range 1-7, we calculate x
x = (x' - 1) mod 7 + 1
= (4 - d - p)) mod 7 + 1

We can now calculate e, the number of days Easter falls after 21st March:

e = p + x
or
e = p + 1 + (4 - d - p) mod 7
In other words Easter Day is:
if e < 11 then
   (e + 21) March
else
   (e - 10) April

This code is implemented as an on-line Easter date calculator at:
http://www.ely.anglican.org/cgi-bin/easter
together with a corresponding C code fragment at
http://www.ely.anglican.org/etc/easter2.c
which implements the appropriate algorithm for the Julian as well as the Gregorian Calendar.
title page | Introduction