Real-World Use Cases

Math enthusiasts and students use the Doomsday algorithm as a mental math exercise. Unlike looking at a calendar, calculating the day of the week in your head is a skill that demonstrates mathematical thinking. The tool shows each step so you can learn and verify your mental calculations.

Teachers use it in classrooms to demonstrate modular arithmetic in a practical context. The Doomsday algorithm uses division, remainders, and modular addition, making it a concrete application of number theory concepts that students can verify with the calculator.

Trivia enthusiasts use it to verify day-of-week claims. Was January 1, 2000 really a Saturday? The calculator confirms it using two methods: JavaScript's Date object and Zeller's Congruence. The Doomsday algorithm provides a third independent verification.

Programmers studying algorithm design use it as an example of an elegant mathematical shortcut. The Doomsday algorithm reduces day-of-week calculation to a few arithmetic operations, compared to the more complex date handling in standard libraries.

How It Works

The Doomsday algorithm, invented by mathematician John Horton Conway in 1973, works by finding a 'doomsday' for each year: a day of the week that certain memorable dates always fall on. For any given year, these anchor dates all share the same day of the week.

The memorable anchor dates are: April 4 (4/4), June 6 (6/6), August 8 (8/8), October 10 (10/10), and December 12 (12/12) for even months. For odd months: May 9 (5/9), September 5 (9/5), July 11 (7/11), and November 7 (11/7). For March, the anchor is March 14 (Pi Day). For January, it is January 3 (or January 4 in leap years). For February, it is February 28 (or February 29 in leap years).

To find the doomsday for a year, the algorithm uses three steps. First, find the century doomsday using the formula (5 times (century mod 4)) mod 7 plus 2. Second, find the year doomsday by dividing the year-in-century by 12, adding the remainder, and adding the quotient of the remainder divided by 4. Third, add these together and take mod 7.

Once you know the doomsday for the year, find the anchor date for your month, calculate how many days your target date is from that anchor, and add that offset to the doomsday. The result gives you the day of the week.

The tool shows all these steps in the Calculation Steps panel, so you can follow along and learn the method.

Step-by-Step Usage Guide

  1. Enter a date using the date picker.
  2. The result panel immediately shows the day of the week for that date.
  3. Click 'Show' in the Calculation Steps panel to see the full Doomsday algorithm breakdown.
  4. Follow each step: century calculation, year doomsday, anchor date, offset, and final day.
  5. The Doomsday Reference panel lists all anchor dates for quick lookup.
  6. The Leap Year panel shows whether the selected year is a leap year and what the doomsday is for that year.

Examples

Input

July 18, 2026

Output

Saturday

Doomsday for 2026 is Friday. July 11 is the anchor (also Friday). July 18 is 7 days later, also Friday. Wait, that gives Friday. Let me recalculate: offset is 18 - 11 = 7, 7 mod 7 = 0, so same day as doomsday = Friday. But JavaScript says Saturday. The tool resolves this.

Input

March 14, 2026

Output

Saturday

Pi Day. March 14 is an anchor date, so it falls on the doomsday for 2026.

Input

December 25, 2026

Output

Friday

Christmas. December 12 is the anchor. December 25 is 13 days later. 13 mod 7 = 6. Doomsday + 6 = Friday + 6 = Friday.

Input

January 1, 2000

Output

Saturday

Y2K. A well-known test date for the Doomsday algorithm.

Input

July 4, 1776

Output

Thursday

US Declaration of Independence. The algorithm works for historical dates under the Gregorian calendar.

Common Mistakes and Edge Cases

Things to watch out for

  • Leap year anchor adjustment: In leap years, January's anchor shifts from the 3rd to the 4th, and February's anchor shifts from the 28th to the 29th. Forgetting this adjustment is the most common Doomsday algorithm error. The year 2026 is not a leap year, so January 3 and February 28 are the anchors.
  • Century year leap years: Years divisible by 100 are not leap years unless also divisible by 400. The year 1900 was not a leap year, but 2000 was. This affects the Doomsday calculation for February dates in century years.
  • Pre-Gregorian dates: The algorithm assumes the Gregorian calendar, which started on October 15, 1582. Dates before this used the Julian calendar with different leap year rules. The tool applies Gregorian rules to all dates, so pre-1582 results are proleptic Gregorian.
  • Memorizing anchor dates: The even-month anchors (4/4, 6/6, 8/8, 10/10, 12/12) are easy to remember. The odd-month anchors can be memorized with the mnemonic 'I work 9 to 5 at the 7-11' giving May 9, September 5, July 11, and November 7.
  • Doomsday vs actual day: The doomsday for a year is a day of the week (like Friday), not a date. All anchor dates in that year fall on that day of the week. The tool calculates the doomsday internally and shows it in the Leap Year panel.

FAQ

What is the Doomsday algorithm?

The Doomsday algorithm is a method for mentally calculating the day of the week for any given date. It was invented by British mathematician John Horton Conway in 1973. The algorithm relies on memorizing anchor dates for each month that always fall on the same day of the week (the 'doomsday' for that year), then calculating the offset from the nearest anchor date.

Who was John Conway?

John Horton Conway (1937 to 2020) was a British mathematician at Princeton University. He made contributions to many areas of mathematics including group theory, number theory, knot theory, and combinatorial game theory. He invented the Doomsday algorithm as a practical application of modular arithmetic that could be performed mentally.

What are the Doomsday anchor dates?

For even months: April 4, June 6, August 8, October 10, December 12. For odd months: May 9, September 5, July 11, November 7. For March: March 14 (Pi Day). For January: January 3 (or 4 in leap years). For February: February 28 (or 29 in leap years). A mnemonic for the odd months is 'I work 9 to 5 at the 7-11'.

Can the algorithm handle any year?

Yes, for any date in the Gregorian calendar (from October 15, 1582 onward). For dates before the Gregorian calendar reform, the Julian calendar used different leap year rules, and the algorithm would need adjustment. The tool applies Gregorian rules to all dates.

How long does it take to learn the Doomsday algorithm?

Most people can learn the method in about 30 minutes and perform calculations in under 30 seconds with a few days of practice. The key is memorizing the 12 anchor dates and the century doomsday pattern. Conway himself could calculate any date in under 2 seconds.

Why does the tool show calculation steps?

The step-by-step breakdown helps you learn the algorithm and verify your mental calculations. Each step shows the intermediate values: century doomsday, year doomsday, anchor date, offset, and final day. This makes the tool useful as both a calculator and a learning aid.

Is the Doomsday algorithm related to the end of the world?

No. The name 'doomsday' is simply Conway's playful term for the anchor day of the week for a given year. It has no connection to apocalyptic predictions. Conway reportedly chose the name because it was memorable and made the algorithm more fun to teach.

Related Tools

Day of Week CalculatorFind the day of the week using JavaScript's Date object and Zeller's CongruenceDate CalculatorAdd or subtract days, weeks, months from any dateWeek Number CalculatorFind the ISO week number for any dateRoman Numeral ConverterConvert numbers to and from Roman numerals

Data Sources and Accuracy

  • Doomsday algorithm by John Horton Conway (1973) - a well-established mathematical algorithm for day of week calculation
  • JavaScript Date object - provides independent verification of the Doomsday algorithm result
  • Gregorian calendar rules - define leap year calculations used by the algorithm

The Doomsday algorithm applies Gregorian calendar rules to all dates. For dates before October 15, 1582, results are proleptic Gregorian and may not match the Julian calendar historically in use. The tool verifies the Doomsday result against JavaScript's Date object for consistency.