Doomsday Rule Calculator

Name the weekday of any date in your head.

  • Every step shown
  • Practice mode
  • Friday the 13th
A small rounded clay lighthouse standing beside seven soft clay stepping stones arranged in a circle, in soft daylight.

The guide

A year is 52 weeks and a day, so Conway taught the calendar to repeat itself

The doomsday rule works because a common year leaves one spare day, a leap year leaves two, and 400 Gregorian years fit exactly 20,871 weeks.

  • Saturday 25 December 2027, thirteen days after the 12 December doomsday
  • 146,097 days in 400 Gregorian years, exactly 20,871 weeks
  • 688 in 400 years Friday the 13ths per cycle, more than any other weekday gets
  • 15 October 1582 first Gregorian date, after 4 October where the change began
Read the full guide Fold the guide 7 min · 13 sources

Ask someone what day of the week a date falls on and they reach for a phone. John Conway reached for arithmetic. In 1973 the English mathematician devised a way to name the weekday of any date in a couple of seconds, with no table and no paper, and he trained himself with a computer that quizzed him on random dates each time he logged in. The idea drew on a perpetual calendar method that Lewis Carroll published in 1887.

The method has a gloomy name, the doomsday rule, and a cheerful core. Every year has a handful of easy dates that all land on the same weekday, so you only need to know that one weekday and how far your date sits from the nearest easy one. Everything else in the method is bookkeeping about why those dates behave.

The bookkeeping starts with a fact about the calendar, and the fact is awkward. Seven does not go into 365.

One day too many each year

A common year has 365 days, which is 52 weeks and one day. So a date moves forward one weekday each year: if 4 April is a Tuesday this year, it is a Wednesday next year. A leap year has 366 days, 52 weeks and two days, so dates after the leap day move forward two.

That sounds easy until you try to carry it far. Add up the shifts across a lifetime and you need to know how many leap years went by, and then you need to take the answer modulo seven. The doomsday page on Wikipedia shows the plain version: the year’s shift is the last two digits plus the number of fours in them, taken modulo seven.

Conway wanted something lighter for a head. He noticed that twelve years is a tidy unit. Twelve years add 12 shifts of one plus 3 leap days, which is 15 days, and 15 is one more than two weeks. So a dozen years moves the doomsday on by exactly one weekday.

That gives the recipe the calculator shows line by line. Take the last two digits of the year, count the dozens, add the remainder, add the number of fours in the remainder, and carry the total forward from the century’s anchor day. Four small steps, each one a division by 12 or 4 or a sum under 20.

Dates chosen to share a weekday

Which dates are easy? Conway picked dates that a mind already holds. In the even months, the date is the month number again: 4 April, 6 June, 8 August, 10 October and 12 December. For the odd months, a rhyme about working nine to five at the seven-eleven gives 9 May, 5 September, 11 July and 7 November, and it works whichever way you write the date.

March has 14 March, or the day before 1 March, which is the last day of February. January and February are the awkward pair: the last day of February is always a doomsday, and so is 3 January, except in a leap year, when it is 4 January and February ends on the 29th. The leap day comes after them, so only these two months need the shift.

Here is the example the Wikipedia page itself uses. For 25 December 2027, start with the century. The 2000s belong to century 20, and 20 mod 4 is 0, which gives an anchor of Tuesday. The last two digits are 27: two dozens, a remainder of 3, and no fours in 3. Two plus three is five, and Tuesday plus five days is Sunday. So the doomsday of 2027 is Sunday.

December’s easy date is the 12th, a Sunday. The 25th is thirteen days later, which is one day short of two weeks, so it falls one weekday before Sunday. The answer is Saturday. The calculator reproduces that sentence, and then proves it by a separate count.

Check the shift on a leap year. In 2024 the doomsday is Thursday, and 4 January is the January doomsday. So 1 January 2024 sits three days earlier, on a Monday. Forget the leap shift and use the 3rd, and you would be off by one for the whole of January and February. This is the same difficulty that makes Zeller’s congruence, an algorithm from the nineteenth century, count January and February as the thirteenth and fourteenth months of the previous year.

Four centuries and a leap day

Why does the century anchor cycle through Tuesday, Sunday, Friday and Wednesday? Because centuries are not equal. Three of every four century years are not leap years, so a normal century holds 24 leap days and a leap century holds 25.

A hundred years is 36,524 or 36,525 days, so a normal century adds five weekdays to the doomsday and a leap century adds six. Count it as moving backward and the figures are two and one. Over four centuries the doomsday moves back 2 + 2 + 2 + 1, which is seven, and seven is a whole week. The pattern therefore returns to where it began.

NASA’s calendar notes give the same fact from the other side: 400 years hold 146,097 days, and 146,097 divides by seven exactly, giving 20,871 weeks. The Gregorian page on Wikipedia adds that of those 400 years, 97 are leap years, which is why the mean year is 365.2425 days. This is the reason the anchors repeat: the weekday of a date in 1900 and in 2300 is the same, and 2000 and 2400 share a doomsday.

The same cycle explains a piece of folklore. Because the pattern is fixed over 400 years, the 13th of the month lands on each weekday a fixed number of times. Across the 4,800 months of a cycle, the count is 688 on a Friday, against 687 on a Sunday or a Wednesday, and 685 or 684 for the rest. So 688 in 400 years is the most any weekday gets. The 13th is very slightly more likely to be a Friday than any other weekday.

The 13th falls on a Friday whenever a month starts on a Sunday. Every year has at least one such month and none has more than three. In 2026, for instance, the months are February, March and November. The doomsday of 2026 explains the first: 28 February is a Saturday, and 13 February is fifteen days earlier, which is two weeks and a day, so it is a Friday.

Before the calendar existed

None of this is a statement about what people saw on their wall calendars before the autumn of 1582. Pope Gregory XIII issued the bull Inter gravissimas on 24 February 1582. It removed ten days from the calendar so that the spring equinox would fall near 21 March, and it changed the leap rule so that century years count only if divisible by 400.

In the places that acted at once, Thursday 4 October 1582 was followed by Friday 15 October 1582. The date 15 October 1582 is therefore the first day of the Gregorian calendar, and the days from 5 to 14 October never happened there. Other countries took far longer. Great Britain and its colonies adopted the calendar in 1752 and Sweden in 1753, and Greece was the last European country to change, in 1923.

So what does the weekday of an earlier date mean? The calculator gives the proleptic Gregorian answer: the Gregorian rules extended backward as though they had always been in force. The Python documentation uses the same idea for its date type, which assumes the Gregorian calendar always applied and covers years 1 to 9999. ISO 8601 allows the proleptic calendar for earlier dates only when the parties agree.

That choice has a cost. A letter dated 4 October 1582 in the Julian calendar and the proleptic Gregorian label for the same day name different dates. The weekday itself did not change at the reform, since Thursday 4 October was followed by Friday 15 October, but the label you computed belongs to a calendar that the writer did not use. The page states this on every early date instead of pretending otherwise, and it does not convert between the two calendars.

A final caution applies to software checks. The JavaScript function Date.UTC reads years from 0 to 99 as the years 1900 to 1999, so a test for ancient dates built on it can fail without any error. This page sets the year another way in its check, runs the whole span from year 1 to year 9999 in a background worker, and compares the rule against a count that adds one day at a time. In that run, the weekday by the rule matched the count on every day tested.

The rule itself is old arithmetic with a clever choice of landmarks. A year is 52 weeks and a day, a leap year makes it two, a dozen years makes it one more, and 400 years make it none. Learn the anchors, pick the nearest easy date, and the calendar stops being a table you look up and becomes a sum you can do while walking.

Sources

Every source consulted for this guide. Links checked November 10, 2026.

  1. Doomsday rule Wikipedia (CC BY-SA)
  2. John Horton Conway Wikipedia (CC BY-SA)
  3. Determination of the day of the week Wikipedia (CC BY-SA)
  4. Zeller's congruence Wikipedia (CC BY-SA)
  5. Gregorian calendar Wikipedia (CC BY-SA)
  6. Leap year Wikipedia (CC BY-SA)
  7. Inter gravissimas Wikipedia (CC BY-SA)
  8. Proleptic Gregorian calendar Wikipedia (CC BY-SA)
  9. Friday the 13th Wikipedia (CC BY-SA)
  10. Calendars and their History NASA Goddard Space Flight Center eclipse site, reprinted from the Explanatory Supplement to the Astronomical Almanac (L. E. Doggett)
  11. datetime - Basic date and time types Python Software Foundation, Python documentation (PSF License)
  12. Date.UTC() - JavaScript MDN Web Docs (CC BY-SA)
  13. Web Workers API MDN Web Docs (CC BY-SA)