Doomsday Algorithm Weekday Calculator

Enter a date as YYYY-MM-DD to find its weekday.

How it is calculated

Enter a date as YYYY-MM-DD (year 1 to 9999). The tool returns the weekday of that date, the weekday of the year's doomsday, and the day-of-year number. The doomsday is a weekday shared by easy anchor dates in the same year (4/4, 6/6, 8/8, 10/10, 12/12, 5/9, 9/5, 7/11, 11/7 and the last day of February). The tool shows it as the weekday of 4 April. By hand, you take the anchor in the target month, then find (day − anchor day) mod 7 and move that many weekdays forward from the doomsday. The tool reaches the same answer directly from the calendar. Leap years follow the Gregorian rule, applied to every year, including those before the calendar was adopted anywhere. Non-existent dates (2023-02-29), year 0 and other layouts return no result.

Worked example

Take 1969-07-20. The doomsday of 1969 is Friday (4 April 1969 was a Friday). In July the anchor is 7/11, also a Friday. From 11 to 20 July is 9 days; 9 mod 7 = 2, so move two weekdays on from Friday: Saturday, then Sunday. The tool agrees: weekday Sunday, year doomsday weekday Friday. Day of year: January 31 + February 28 + March 31 + April 30 + May 31 + June 30 = 181, plus 20 gives day 201.

Try this example →

Common mistakes

  • Mixing up the year's doomsday with the weekday of the date you typed. They are the same only when your date happens to be an anchor day such as 4 April.
  • Using the wrong February anchor by hand: it is the last day of the month, 28 February in common years but 29 February in leap years. 2024-02-29 is a Thursday, the same as 4 April 2024.
  • Typing the date as DD.MM.YYYY or MM/DD/YYYY. The tool reads only year-month-day with hyphens, and rejects impossible dates such as 2023-02-29.
  • Expecting a historical date to match the calendar of its time. Every date is treated as Gregorian, so a day before a country switched from the Julian calendar may differ from the weekday recorded then.
  • Counting the offset in the wrong direction. If the date falls before the anchor, move backward from the doomsday, not forward.

About this calculator

The doomsday algorithm, popularized by mathematician John Conway, is a mental-math method for finding the day of the week for any date in history or the future. It works by memorizing each year's “doomsday” — a fixed weekday that several easy-to-remember dates (like 4/4, 6/6, 8/8, 10/10, and 12/12) always fall on — and then counting forward or backward from the nearest of those anchor dates to reach the target date.

This calculator applies the same logic programmatically: given any date, it derives that year's doomsday weekday, counts the offset to the requested date, and also reports the day-of-year number. It's popular with recreational mathematicians, competitive mental calculators, and calendar enthusiasts who use it as a party trick, as well as anyone who just wants to double-check what weekday a historical date or future deadline falls on without opening a calendar app.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    If you are learning the method, use the tool as an answer key for the year step before the month step. For the 2000s the century anchor is Tuesday; add the last two digits of the year divided by 12 (whole part), the remainder, and the remainder divided by 4 (whole part). For 2026 that is 2 + 2 + 0 = 4, and Tuesday plus four lands on Saturday. Compare with the doomsday line. Which century do you find hardest to anchor?

Popular calculators

All Calculators