The Doomsday Algorithm Explained With a Simple Example


Naming the day of the week for any date, past or future, sounds like a party trick only a computer could pull off. Mathematician John Conway built a mental-math shortcut that does the same thing in a few small steps. The Doomsday algorithm turns a date into a day of the week using memorable anchor dates and one short formula, and this article walks through the entire method with a real worked example: July 4, 1976.

Quick Answer
The Doomsday algorithm finds the day of the week for any date by first finding that year’s “doomsday,” a day of the week that several easy-to-remember dates always share, then counting forward or backward to the target date. Every year has its own doomsday, found by combining a century anchor with a short year calculation. For 1976, the doomsday works out to Sunday. Since July 11 is always a doomsday date, July 11, 1976 was a Sunday, and July 4, 1976, exactly one week earlier, was also a Sunday. An online tool like the Date Calculator gives the same answer instantly, which makes it a fast way to check the hand-calculated result.

What Is the Doomsday Algorithm?

The Doomsday algorithm is a mental-math method for finding the day of the week for any date on the Gregorian calendar. Mathematician John Conway invented and popularized the technique in the 1970s, building on earlier calendar-calculation work by Lewis Carroll and others.

The method rests on one core idea: a fixed day of the week, called the doomsday, recurs on several easy-to-remember dates within the same calendar year. Once that day is known for a given year, counting forward or backward from the nearest memorable date reveals the day of the week for any other date in that same year.

A calendar repeats in a fixed, calculable pattern because the Gregorian system assigns exactly 365 or 366 days to each year, and 365 divided by 7 leaves a remainder of one. That single extra day is what shifts each ordinary year’s doomsday forward, while a leap year’s extra day shifts it forward by two.

What Are the Doomsday Dates You Need to Remember?

Doomsday dates are the calendar dates that always land on that year’s doomsday, no matter which year it is. Most people memorize them using a short list of pairs and patterns.

The Twelve Doomsday Dates, One Per Month
Month Doomsday Date Memory Trick
January 4 (common years), 3 (leap years) Shifts one day earlier in a leap year
February Last day of the month 28 in a common year, 29 in a leap year
March 14 Same date as Pi Day
April 4 Month number equals the day, 4/4
May 9 “Nine to five” (5/9)
June 6 Month number equals the day, 6/6
July 11 “Nine to five at 7-Eleven” (7/11)
August 8 Month number equals the day, 8/8
September 5 “Nine to five” (9/5)
October 10 Month number equals the day, 10/10
November 7 “7-Eleven” (11/7)
December 12 Month number equals the day, 12/12

Every one of these twelve dates falls on the same day of the week within any single year. Picking the doomsday date closest to a target date keeps the final counting step short, usually seven days or fewer.

How Do You Find a Year’s Doomsday?

Find a year’s doomsday by combining two pieces: a fixed anchor day for the century, and a short calculation based on the last two digits of the year.

\[ \text{Doomsday} = \text{Century Anchor} + (a + b + c) \bmod 7 \]
  • Century Anchor = the doomsday for the century’s year zero, a fixed reference day
  • a = the last two digits of the year, divided by 12, dropping any remainder
  • b = what remains after dividing the last two digits by 12
  • c = b divided by 4, dropping any remainder

The century anchor stays fixed for every year inside that hundred-year span, so it only needs to be memorized once per century.

Century Anchors for Recent and Nearby Centuries
Century Anchor Day
1800-1899 Friday
1900-1999 Wednesday
2000-2099 Tuesday
2100-2199 Sunday

Take the year 1976, which falls in the 1900-1999 century, anchored on Wednesday:

  1. Take the last two digits of the year: \( 76 \)
  2. Divide by 12 and drop the remainder: \( 76 \div 12 = 6 \) remainder \( 4 \), so \( a = 6 \)
  3. The remainder from that division becomes b: \( b = 4 \)
  4. Divide b by 4 and drop the remainder: \( 4 \div 4 = 1 \), so \( c = 1 \)
  5. Add the three results together: \( 6 + 4 + 1 = 11 \)
  6. Divide by 7 and keep only the remainder: \( 11 \bmod 7 = 4 \)
  7. Start at the century anchor, Wednesday, and count forward 4 days: Thursday, Friday, Saturday, Sunday
  8. The doomsday for 1976 is \( \text{Sunday} \)

Every doomsday date in 1976, including April 4, June 6, and July 11, falls on a Sunday. That single fact unlocks every other date in the year.

Diagram showing how a century anchor plus a year calculation produces a year’s doomsday A box labeled century anchor, Wednesday for the 1900s, combines with a box labeled year calculation for 1976, which equals 4, to produce a final result: the doomsday for 1976 is Sunday. Finding the Doomsday for 1976 Century Anchor (1900s) Wednesday Year Calculation for 76 6 + 4 + 1 = 11, mod 7 = 4 Doomsday for 1976 Sunday
The century anchor and the year calculation combine to give one year’s doomsday.

How Do You Count From a Doomsday to Any Target Date?

Count from a doomsday to any target date by picking the nearest doomsday date in the same month, then moving forward or backward day by day, or in full seven-day jumps.

Every doomsday date shares the year’s doomsday, so the nearest one becomes a fixed starting point. Moving exactly seven days in either direction always lands on another instance of that same day of the week, since a full week always returns to the same weekday.

  1. Identify the year’s doomsday using the century anchor and year calculation
  2. Find the doomsday date closest to the target date, using the twelve-date list
  3. Count the number of days between that doomsday date and the target date
  4. Move forward or backward that many days from the doomsday, wrapping every seven days back to the same day of the week

Choosing the nearest doomsday date, rather than the first one on the list, keeps the final count small and the arithmetic fast.

Worked Example: What Day of the Week Was July 4, 1976?

July 4, 1976, the two-hundredth anniversary of the United States Declaration of Independence, is a well-known date worth checking by hand.

  1. The doomsday for 1976, found above, is Sunday
  2. The nearest doomsday date in July is July 11, from the “9-to-5 at 7-Eleven” pattern (7/11)
  3. July 11, 1976 falls on that year’s doomsday: Sunday
  4. Count backward from July 11 to July 4: that gap is exactly 7 days
  5. Seven days is one full week, so July 4 lands on the same day of the week as July 11
  6. July 4, 1976 was a \( \text{Sunday} \)

Checking the historical record confirms the same answer: the United States Bicentennial celebration on July 4, 1976 fell on a Sunday. The Doomsday algorithm reaches that answer using nothing more than the century anchor, one small addition, and a seven-day count.

Timeline showing the count from July 11, 1976 back to July 4, 1976 A timeline with July 11, 1976, marked Sunday and labeled doomsday, connects backward across seven days to July 4, 1976, also marked Sunday, showing both dates share the same day of the week. Counting Back Seven Days July 11, 1976 (doomsday) Sunday 7 days back July 4, 1976 Sunday A full seven-day gap always keeps the same day of the week
July 11 and July 4, 1976 sit exactly one week apart, so both fall on a Sunday.

Should You Just Use an Online Date Calculator Instead?

The Doomsday algorithm is built for mental math, so it shines when no device is on hand or when the goal is understanding the pattern behind the calendar. A wrong step anywhere in the century anchor, the year calculation, or the final count changes the answer, so checking the result matters.

The Date Calculator gives the same day-of-week answer instantly, without any manual arithmetic. Typing in a date such as July 4, 1976 confirms a hand-calculated Sunday in seconds, which makes the tool a fast, reliable check on the mental-math method covered in this article.

Readers who want the shortest path to a birth-date day of the week, rather than the full mechanics of the algorithm, can see that practical lookup approach in the sibling article on finding the day of the week you were born.

What Mistakes Do People Make With the Doomsday Algorithm?

The most common mistake is forgetting that January and February shift by one date in a leap year. February’s doomsday moves from the 28th to the 29th, and January’s moves from the 4th to the 3rd, so skipping that check throws off any date early in a leap year.

A second mistake is picking a doomsday date that is far from the target date instead of the nearest one. Counting 25 days by hand invites errors that counting 3 or 4 days avoids entirely.

A third mistake is mixing up the direction of the count, moving forward when the target date falls before the chosen doomsday date, or the reverse. Drawing a short timeline, even a mental one, prevents that mix-up.

  • Forgetting the leap-year shift for January and February doomsday dates.
  • Choosing a doomsday date far from the target instead of the nearest one.
  • Miscounting the direction between the doomsday date and the target date.
  • Using the wrong century anchor for a year near a century boundary.

A fourth mistake happens at century boundaries. A year like 2001 uses the 2000s anchor, Tuesday, while a year like 1999 still uses the 1900s anchor, Wednesday, and confusing the two produces a doomsday that is off by exactly one day.

The Doomsday Algorithm, Applied to July 4, 1976
Step Calculation Result
Century anchor 1900-1999 Wednesday
Year calculation 6 + 4 + 1 = 11, mod 7 4
Year’s doomsday Wednesday + 4 days Sunday
Nearest doomsday date July 11 (7/11) Sunday
Target date July 4, 7 days earlier Sunday

Want an instant answer without doing the arithmetic by hand? Enter any date into the Date Calculator to get the day of the week immediately, useful for double-checking a Doomsday algorithm result.

FAQs About the Doomsday Algorithm

Do You Need to Be a Math Genius to Use the Doomsday Algorithm?

No. The method only needs memorizing twelve easy dates, one century anchor, and a short calculation with addition and division. Most people can learn to find any recent day of the week within a few minutes of practice.

How Is the Doomsday Algorithm Different From Using an Online Date Calculator?

The Doomsday algorithm is a manual method meant for mental math, while the Date Calculator computes the same result instantly in software. The algorithm is useful for learning the pattern; the tool is useful for a fast, guaranteed-correct check.

Does the Doomsday Algorithm Work for Leap Years?

Yes, with one adjustment. In a leap year, February’s doomsday date moves to the 29th instead of the 28th, and January’s doomsday date moves to the 3rd instead of the 4th, because the extra day shifts everything after it.

What Is the Most Common Mistake When Using the Doomsday Algorithm?

Forgetting the leap-year shift for January and February is the most frequent error. A second frequent error is counting in the wrong direction between the chosen doomsday date and the target date.

How Do You Find the Doomsday for a Year Outside the 1900s or 2000s?

Use that century’s own anchor day instead of Wednesday or Tuesday. The 1800s anchor is Friday and the 2100s anchor is Sunday, and the same year calculation of dividing the last two digits by 12 still applies after that.

What Day of the Week Was January 1, 2000?

January 1, 2000 was a Saturday. The 2000s anchor is Tuesday, the year calculation for 00 adds nothing, so the doomsday for 2000 is Tuesday, and January 4 is that year’s leap-adjusted doomsday date, making January 1, three days earlier, a Saturday.

Why Is It Called the Doomsday Algorithm?

John Conway chose the name because the repeating day of the week works like a fixed marker running through the entire year, similar to how the word “doomsday” once referred to a fixed day of reckoning. The name has no other connection to the dates it calculates.

Sources

Reference Sources Used in This Article

This article is for general math education only. Exact calculator behavior varies by brand and model, so check your device’s manual for specifics. Reviewed for accuracy by Prof. Dr. Khalil Mudassar, PhD. Last updated September 23, 2026.




Author

shakeel-Muzaffar
Founder & Editor-in-Chief at  ~ Web ~  More Posts

Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.

Leave a Comment