Easter version 1.0


[Valid HTML 4.0]
[Best viewed with any browser]
[Linux now]

Principal >
[ Instructions ] [ How does it work? ] [ Stand-alone version] [ References ] [ License ]

Here you can see the Easter program. Please report any bug or failure you might find.

You need a Java-enabled browser to see this applet


Just type the year in the text box and press the Ok button. Results will be displayed below. First label shows Golden Number and Epact, second one shows Paschal Full Moon, and the last one gives Easter date (all in day-month format).

How does it work?

Fundaments on calculating Easter

(This section based on
Calendar FAQ)

Jesus was crucified just before the Jewish Passover. This celebration starts in the middle (14th or 15th day) of the Jewish month of Nisan (in Spring). Jewish months always start with a new moon, so the Passover must be inmediately after a full moon.

Knowing these facts, Easter was decided to be officialy first Sunday after the first full moon after Vernal Equinox.

Regarding to this, the following considerations must be made:

  1. The equinox the Church uses to calculate Easter is always the 21st of March. We know the actual equinox may be one or two days before or after that date, but 21st of March is the official equinox.
  2. The official full moon could not agree with the actual full moon. They can differ in one or two days.

The full moon preceding Easter is called Paschal Full Moon. It is calculated using two tools: Golden Number and Epact.

The Golden Number describes the relationship between the year number and moon's phase succesions during that year. Each year has a Golden Number, and they are repeated every 19 years.

The Epact measures the age of the moon at a particular date (the age being the instant in the full to new moon period). If you know Golden Number of a particular year, then you can calculate Epact.


Easter is calculated by means of Golden Number, Epact and some tables, as explained in the following algorithm:
G = year % 19
if Julian Calendar
  I = (19*G + 15) % 30
  J = (year + year/4 + I) % 7
end if
if Gregorian Calendar
  C = year/100
  H = (C - C/4 - (8*C+13)/25 + 19*G + 15) % 30
  I = H - (H/28)*(1 - (H/28)*(29/(H + 1))*((21 - G)/11))
  J = (year + year/4 + I + 2 - C + C/4) % 7
end if
L = I - J
EasterMonth = 3 + (L + 40)/44
EasterDay = L + 28 - 31*(EasterMonth/4)
This algorithm was obtained from Calendar FAQ, where it is attributed to Oudin (1940), as noted in "Explanatory Supplement to the Astronomical Almanac", P. Kenneth Seidelmann, editor.

In D. E. Knuth's "The Art of Computer Programming", Vol. I, another algorithm for calculating Easter is presented. This one is due to Aloysius Lilius and Cristopher Clavius (end of 16th Century). It only works for post-1582 years, and is a reduced version of the algorithm presented above. Knuth affirms that the first algorithm for Easter calculation was the Canon Paschalis by Victorius of Aquitania (AD 475). In fact, all medieval mathematics was mainly about Easter calculation.


All years are assumed to be in four-digit form, thus year 99 is NOT 1999. This program is Y2K compliant, of course.

The Gregorian reformation is assumed to have ocurred in October 1582. That is, days between 5 and 13 October 1582 didn't never exist. Nowadays, virtually all countries have adopted Gregorian Calendar.

Note that this program calculates Easter as the Catholic Church does. This date is different from the Greek or Orthodox Easter. Maybe a method for calculating Greek easter will be added in the future.

Easter is calculated with present day (Gregorian) method, even for pre-1582 years. This is not really a bug, but a feature, since Easter was designed for future prevision, and not for past analysis.

Palm Sunday is, of course, seven days before Easter. In a future version, the program might give directly Palm Sunday date, if user chooses so.

Source code

The source code (12 kb) is available (in gzipped format) under the terms of the GNU General Public License. Please be sure you understand and agree with such terms before using the code.

It is recommended to take a look at the C source code of the stand-alone version of Easter. It is more complete and the algorithms are more robust and tested.

Stand-alone version

You can use a compiled version of the program in your computer if you want to calculate Easter while you're offline.

The C version of Easter has different output options. It can display Easter date, of course. But it also can display Ash Wednesday, Palm Sunday, Lent, and even a complete calendar with all these.

Download easter-2.2.2.tar.gz (117 Kb) and then compile it in your computer. You will need a C compiler along with a libc library that supports the getopt function. The program should compile out of the box in virtually any Unix system (I have trid it in Linux and Solaris).

The Linux version of Easter can be downloaded from any Metalab (formerly SunSITE) Linux mirror, in the apps/religion subdirectory.

If you prefer a precompiled version, there is a Debian package of Easter 2.2.0. It is packaged for Debian 2.2 (potato), with libc 2.1.2, in a i386 architecture.

I would like to hear of DOS/Win users of Easter (it may be difficult for them to get Easter running, but if I find there are some, I'll try to make it easier).


  • Claus Tondering, Calendar FAQ.
  • Elwood Downey, XEphem.
  • Peter Duffet-Smith, Practical Astronomy with your calculator, Cambridge University Press, 1988.
  • D.E. Knuth, The calculation of Easter, in Communications of the Association for Computing Machinery, Vol. 5, 1962, pp. 209-210, ACM Press.
  • T.H. O'Beirne, Puzzles and Paradoxes, chap. 10, London, Oxford University Press, 1965.
  • D.E. Knuth, The Art of Computing Programming, chap. 1, Addison-Wesley, 1997.


Copyright (C) 1998, 1999 Antonio Luque Estepa
aluque en zipi.us.es

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You will receive a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

(c) 2002 Antonio Luque Estepa
Fecha de última modificación: 2006-07-24 11:48:51 MET