GoWin Tools
Tools
โ† Day of Week Calculator

Day of Week Calculator ยท 9 min read

The Doomsday Algorithm: Calculate Any Day of the Week in Your Head

John Conway, the mathematician who invented the Game of Life, could determine the day of the week for any date in seconds. His Doomsday Algorithm is learnable by anyone โ€” here is exactly how it works.

Who Invented It and Why

John Horton Conway (1937โ€“2020) was one of the most inventive mathematicians of the 20th century โ€” creator of the Game of Life, surreal numbers, and numerous contributions to group theory and combinatorics. He developed the Doomsday Algorithm as a mental calculation technique, reportedly able to compute any date's day of the week in under two seconds after years of practice. The algorithm is elegant enough for most people to learn in an afternoon and practice to reasonable speed with a few weeks of effort.

The core insight is this: instead of computing the day of the week from scratch for every date, you compute an "anchor day" (the Doomsday) for the year in question, and then use the fact that certain memorable dates always fall on that anchor day. From the anchor, you count forward or backward a small number of days to reach your target date.

Step 1: The Doomsday Dates for Each Month

The Doomsday for any given year is the day of the week on which a specific set of dates falls. These dates are chosen to be memorable โ€” often the last day of February, and several "even" dates in even months:

MonthDoomsday Date(s)Memory Aid
JanuaryJan 3 (non-leap), Jan 4 (leap)3/4 of January
FebruaryFeb 28 (non-leap), Feb 29 (leap)Last day of February
MarchMar 7, 14, 21, 28Every 7th day of March
AprilApr 44/4
MayMay 99-to-5 at 7-Eleven (9/5)
JuneJun 66/6
JulyJul 117-Eleven (7/11)
AugustAug 88/8
SeptemberSep 59-to-5 at 7-Eleven (5/9)
OctoberOct 1010/10
NovemberNov 77-Eleven (11/7)
DecemberDec 1212/12

The memory aid "I work 9-to-5 at 7-Eleven" covers May 9, September 5, July 11, and November 7 โ€” all Doomsday dates. The even months 4, 6, 8, 10, 12 fall on their own number (4/4, 6/6, 8/8, 10/10, 12/12). Once you know the Doomsday for a year, you can find any date's day of the week by counting from the nearest Doomsday date in that month.

Step 2: Century Anchors

The Doomsday for a given century follows a fixed 400-year cycle. The anchor days for the most relevant centuries are:

CenturyAnchor Day
1800sFriday
1900sWednesday
2000sTuesday
2100sSunday

Memory aid for 2000s: "We live in a Tuesday century." For the 1900s (where most historical references land): "Wednesday is the century anchor."

Step 3: The Year Calculation

Within a century, you compute the year's Doomsday from the century anchor using the following steps. Take the last two digits of the year (call it y):

  1. Divide y by 12. Write down the quotient (call it a) and the remainder (call it b).
  2. Divide b by 4. Write down the quotient (call it c). Ignore the remainder.
  3. Add: anchor + a + b + c. Take the result mod 7.

The result gives you the Doomsday for that year, where you count from Sunday = 0, Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6.

Worked Example 1: What day was September 11, 2001?

Step 1: Century anchor for 2000s = Tuesday = 2

Step 2: Year within century: y = 01

  • a = โŒŠ01/12โŒ‹ = 0, remainder b = 1
  • c = โŒŠ1/4โŒ‹ = 0
  • Doomsday = (2 + 0 + 1 + 0) mod 7 = 3 = Wednesday

Step 3: Find the nearest Doomsday in September. The Doomsday for September is the 5th. September 5, 2001 was a Wednesday.

Step 4: Count from September 5 to September 11. September 5 = Wednesday. September 6 = Thursday. September 7 = Friday. September 8 = Saturday. September 9 = Sunday. September 10 = Monday. September 11 = Tuesday.

September 11, 2001 was indeed a Tuesday.

Worked Example 2: What day was July 20, 1969? (Moon landing)

Step 1: Century anchor for 1900s = Wednesday = 3

Step 2: Year within century: y = 69

  • a = โŒŠ69/12โŒ‹ = 5, remainder b = 9
  • c = โŒŠ9/4โŒ‹ = 2
  • Doomsday = (3 + 5 + 9 + 2) mod 7 = 19 mod 7 = 5 = Friday

Step 3: Find the nearest Doomsday in July. The Doomsday for July is the 11th. July 11, 1969 was a Friday.

Step 4: Count from July 11 to July 20. 20 โˆ’ 11 = 9 days later. 9 mod 7 = 2 days after Friday. Friday + 2 = Sunday.

Apollo 11 landed on the Moon on July 20, 1969 โ€” a Sunday. Neil Armstrong's moonwalk began in the early hours of July 21, 1969 (Monday) UTC.

Worked Example 3: What day is Christmas 2030?

Step 1: Century anchor for 2000s = Tuesday = 2

Step 2: Year within century: y = 30

  • a = โŒŠ30/12โŒ‹ = 2, remainder b = 6
  • c = โŒŠ6/4โŒ‹ = 1
  • Doomsday = (2 + 2 + 6 + 1) mod 7 = 11 mod 7 = 4 = Thursday

Step 3: December Doomsday is 12/12. December 12, 2030 is a Thursday.

Step 4: Count from December 12 to December 25. 25 โˆ’ 12 = 13 days. 13 mod 7 = 6 days after Thursday. Thursday + 6 = Wednesday.

Christmas 2030 will be on a Wednesday.

How Fast Can You Get?

Conway himself could answer any date in about 2 seconds. Most people who practice daily for a month can achieve sub-10-second accuracy for dates within the 20th and 21st centuries. The biggest time sink is the year calculation (Step 2 above). Some practitioners memorize the Doomsday for every year in a 28-year range (the calendar repeats on a 28-year cycle in the Gregorian calendar, not crossing a century boundary). Others practice until the year calculation becomes effortless arithmetic. The Doomsday dates for each month, once memorized, are retrievable instantly.

Verify your answers with the Day of Week Calculator โ†’

References

  1. Conway, J. H. (1973). Tomorrow is the Doomsday. Eureka (Cambridge Mathematical Journal), 36, 28โ€“31.
  2. Berlekamp, E. R., Conway, J. H., & Guy, R. K. (1982). Winning Ways for Your Mathematical Plays. Academic Press.
  3. Pickover, C. A. (2009). The Math Book: From Pythagoras to the 57th Dimension. Sterling.