Fact-checked by Grok 2 weeks ago

Doomsday rule

The Doomsday rule, also known as the Doomsday algorithm, is a mnemonic-based method developed by British mathematician in the 1970s to determine the day of the week for any given date in the . It relies on identifying a recurring "doomsday" weekday for each year—shared by specific memorable dates in each month—and uses modulo 7 to compute shifts from century anchor days. This approach allows of weekdays in seconds, making it a practical tool for calendar computations without external references. Conway's method simplifies and popularizes an earlier algorithm published by (Charles Lutwidge Dodgson) in 1887, which used more cumbersome techniques but achieved similar results through division and remainders. The core process begins with century anchor days—such as for the 1900s and for the 2000s—derived from the calendar's 400-year cycle of 146,097 days, equivalent to exactly 20,871 weeks (0 modulo 7). For a given year, the doomsday is found by taking the last two digits y, computing y + \lfloor y/4 \rfloor modulo 7, and adding it to the century anchor, with adjustments for every four years (except century years not divisible by 400). Once the year's doomsday is established, monthly "doomsdays" serve as reference points, such as the last day of (or 29th in ), 4/4 for April, 6/6 for June, 8/8 for August, 10/10 for October, 12/12 for December, 5/9 for May (or 9/5), 9/5 for (or 5/9), 11/7 for (or 7/11), and 7/11 for (or 11/7); even months use their date number, while odd months except and follow the "9/5, 5/9, 11/7, 7/11" rhyme. To find a specific date's weekday, one counts the days from the nearest doomsday reference forward or backward, adjusting modulo 7 from the known weekday (where = 0, = 1, up to = 6). For example, in ( ), 11 falls 17 days before 28 (a doomsday), so 17 mod 7 = 3, shifting back 3 days yields . The rule's elegance lies in its reliance on easy-to-memorize patterns, enabling rapid verification of historical events or future dates, though it requires initial practice to master the anchors and references.

Fundamentals

Concept of doomsday

The doomsday in the context of the Doomsday rule refers to a specific day of the week that occurs on a set of predetermined, easy-to-remember dates within any given year, known as anchor dates. These anchors include the last day of (or in ), as well as the dates 4/4, 6/6, 8/8, 10/10, and 12/12. Additional anchors, such as 5/9, 9/5, 7/11, and 11/7, further facilitate reference points throughout the year. This consistent alignment allows the doomsday to serve as a reliable pivot for the entire . The primary purpose of identifying the doomsday is to streamline the determination of the day of the week for any by first establishing this single reference point for the year, from which other dates can be calculated through simple counting. Since days of the week repeat in a cycle of seven, the offset between a target date and the nearest anchor can be computed modulo 7 to find the corresponding weekday efficiently. This approach reduces complex to mental shortcuts, making it accessible without tools or extensive memorization. The , including the concept of the , was invented by British mathematician in 1973 as a quick technique for mental date calculations, inspired by earlier methods but simplified for practical use. , renowned for contributions like , developed it to enable rapid weekday computations, often demonstrating it in lectures and interviews.

Doomsday anchors

In the Doomsday rule for the , anchor dates serve as fixed reference points within each month that always fall on the year's , facilitating efficient mental to other dates. For the even-numbered months, the standard anchors are April 4, June 6, August 8, October 10, and December 12; these are selected because the day number matches the month number, providing a simple mnemonic for recall. For the odd-numbered months, the anchors deviate from the month-day equality to maintain consistency with the calendar's structure: March 7 (or equivalently the 14th, 21st, or 28th), May 9, July 11, September 5, and 7. Alternative representations include 5/9 for May, 9/5 for September, 7/11 for July, and 11/7 for , emphasizing the interchangeable options for these months. May's anchor on the 9th exemplifies this adjustment for odd months. The anchor for February is the last day of the month— in common years or in —positioning it as a pivotal reference near the year's start. In , functions as a universal check point aligned with the . January's anchors are in common years and in , derived directly from the February anchor to ensure continuity across the year-end transition. These anchors are chosen for their numerical ease and even distribution throughout the year, enabling users to count forward or backward in increments of 7 days to reach any target date with minimal effort, while respecting the 's insertions.

Calculating the Year's Doomsday

Gregorian calendar methods

The primary method for calculating the doomsday weekday in the , as devised by John Conway, involves determining a century anchor, computing a year code from the last two digits of the year, and then adjusting for the status when applying to specific dates. This approach simplifies the underlying of the calendar's 400-year cycle into memorable steps suitable for mental computation. Century anchors provide the base doomsday for the "00" year of each century, represented numerically where Sunday = 0, = 1, = 2, = 3, = 4, = 5, = 6. The anchors repeat every 400 years due to the leap year rules. A common table of anchors, derived from Conway's , is as follows:
Century RangeAnchor Day (Numeric Code)
1600–16992 ()
1700–17990 ()
1800–18995 ()
1900–19993 ()
2000–20992 ()
2100–21990 ()
To compute the doomsday for a year in century CC and last two digits YY (e.g., 1950 has CC=19, YY=50), first add the century anchor code to the year code, where the year code is calculated as \lfloor YY / 12 \rfloor + (YY \mod 12) + \lfloor (YY \mod 12) / 4 \rfloor, then take the result modulo 7. For example, for 1950, the century anchor is 3; YY=50 gives \lfloor 50/12 \rfloor = 4, $50 \mod 12 = 2, \lfloor 2/4 \rfloor = 0, so year code = 4 + 2 + 0 = 6; total = 3 + 6 = 9 ≡ 2 (Tuesday) modulo 7. This yields the doomsday weekday for dates from through . For and in (divisible by 4, except century years not divisible by 400), the effective doomsday shifts forward by 1 day (or equivalently, use the memorable dates /11/18/25 or as proxies instead of the non-leap 3/10/17/24/31 or 28). No adjustment is needed for the base yearly doomsday calculation itself, but it ensures consistency across the year. For instance, in the leap year 2000 ( 2), the base doomsday is , but and dates reference equivalents. An alternative mental shortcut, known as the "odd + 11" method, streamlines the year code computation for quicker recall, particularly useful for contemporary years like those in the 1900s or 2000s. Start with YY; if odd, add 11 to get A (ensuring evenness). Divide A by 2 to get B; if B is odd, add 11 to get C. Then, compute D = 7 - (C mod 7) if C mod 7 ≠ 0, else 0. The year code is D modulo 7, added to the century anchor and taken modulo 7. For 2015 (YY=15, odd, 2000s anchor=2): A=15+11=26, B=13 (odd), C=13+11=24, 24 mod 7=3, D=7-3=4; total=2+4=6 ≡ 6 (Saturday) modulo 7, but adjusted per leap (2015 non-leap). This method leverages multiples of 11 (≡4 mod 7) to approximate the floor divisions efficiently.

Julian calendar adaptation

The Doomsday rule adapts straightforwardly to the , which lacks the Gregorian system's century-based exceptions, resulting in a simpler but less astronomically precise structure. In the , occur every four years without exception, meaning an additional day is added consistently for such years when calculating doomsdays for dates after . This uniform rule simplifies the leap year adjustment to adding 1 to the doomsday calculation for post-February dates in divisible-by-4 years, avoiding the Gregorian's variable century corrections. The core formula for determining the year's doomsday in the mirrors the Gregorian approach but omits century corrections, yielding doomsday = (YY + ⌊YY/4⌋ + (6 * CC mod 7)) mod 7, where YY represents the two-digit year and CC the century number. Century anchors are adjusted accordingly, shifting by 3 days from their equivalents due to the inclusion of every century year as a , which accumulates extra days over time (Julian has 3 more leap days per 400 years). For instance, the anchor for the in Julian reckoning falls on (2), compared to (3) in . This adaptation proves particularly useful for historical dates before the in 1582 or in regions that delayed adoption, such as until February 1918 and until February 1923. When converting between calendars, the day offset varies—starting at 10 days post-1582 and increasing to 13 days by the —but doomsdays must be computed independently using the respective calendar's rules to accurately determine the weekday.

Applying the Rule to Specific Dates

Memorable date mnemonics

The Doomsday rule employs specific memorable dates, known as doomsdays, for each month of the year to facilitate quick recall of the weekday anchor for any given year. For the even-numbered months from April to December, these dates follow a simple pattern where the month number equals the day number: April 4 (4/4), June 6 (6/6), August 8 (8/8), October 10 (10/10), and December 12 (12/12). This n/n format provides an intuitive mnemonic for these months. For the odd-numbered months, excluding , , and , the doomsdays are (9/5), (5/9), (7/11), and (11/7). These can be remembered using the phrase "I work from 9 to 5 at the 7-11," which evokes a standard workday schedule at a chain, linking the numbers to the respective month-day pairs. January and February have doomsdays adjusted for leap years. In a common year, January 3 and the last day of February (February 28, or "March 0") are doomsdays; in a , these shift to January 4 and February 29. For March, common memorable dates include or (Pi Day), aligning with the February end reference. Other culturally notable dates like (Independence Day) or (Halloween) can also function as doomsdays when they fall on the appropriate weekday, enhancing practical recall.

Step-by-step day-of-week determination

To determine the day of the week for a specific using the Doomsday rule, begin with the weekday of the year's , which has been previously calculated. Identify an anchor for the target month, such as one of the memorable dates like 4/4 for or 9/5 for . Compute the offset as the difference in days between the target and the anchor , taken modulo 7; add this offset to the weekday (or subtract if negative, adjusting modulo 7) to obtain the target 's weekday. For a target date D/M (day D of month M) where the anchor is A/M, the offset is given by (D - A) \mod 7. If the target date precedes the anchor, subtract the and add 7 if necessary to keep the result positive. Adjustments may be needed for month transitions, such as when the target date is in a different week relative to the anchor, but the 7 operation ensures the correct weekday shift. These anchors are selected to be close to common dates, minimizing calculation effort. January and February require special handling due to leap year effects. Although the year's doomsday calculation treats these months as the 13th and 14th of the prior year to account for the leap day shift, the anchors for specific dates use (non-leap) or 4 (leap), and February 28 (non-leap) or 29 (leap). For dates in these months, select the appropriate anchor based on the year's leap status and apply the offset as usual. In , always falls on the weekday, serving as a direct reference without offset. Century years follow standard rules for leap status (divisible by 400), which influences the anchors for and but does not alter the offset process once the year's is established.

Mathematical Foundations

Why the rule works

The Doomsday rule relies on the fundamental periodicity of the week, which cycles every 7 days, allowing all date calculations to be performed using modulo 7. In the , a has 365 days, equivalent to 52 weeks and 1 extra day (365 ≡ 1 mod 7), advancing the by 1 day of the week from the previous year. A has 366 days (≡ 2 mod 7), advancing it by 2 days. These annual advances accumulate over years, and the rule computes the doomsday—the weekday shared by specific "anchor" dates—by determining the total such advances modulo 7 from a reference . The formula for the derives from counting the total number of days elapsed since a fixed reference (such as the year or ) modulo 7, which directly yields the weekday offset. This total incorporates both regular days and leap day adjustments, with the leap year rules (every 4 years, except century years not divisible by 400) ensuring alignment with the solar year. Over a 400-year cycle, the calendar contains 400 × 365 + 97 leap days = 146,097 days, which is exactly divisible by 7 (146,097 ≡ 0 mod 7), confirming the cycle's repetition without weekday drift. All computations in the rule operate modulo 7 to simplify tracking these offsets. The century terms in the formula account for the three skipped leap years every 400 years (in century years like 1700, 1800, and 1900), which would otherwise overcount leap days by 3 (≡ 3 mod 7), shifting the anchor accordingly. For instance, the anchor for the 1900s is Tuesday, reflecting the cumulative effect of prior skipped leaps from an earlier epoch. A key component is the year code within a century, approximated as YY + \left\lfloor \frac{YY}{4} \right\rfloor \mod 7, where YY is the last two digits of the year. This expression estimates the days from the century's start to the year's start modulo 7: the YY term captures the regular day advances (since 365 ≡ 1 mod 7), while \left\lfloor \frac{YY}{4} \right\rfloor counts the leap days contributed by years divisible by 4 within the century (ignoring century-specific skips, which are handled separately). To see why, note that the total days are $365 \times YY + \left\lfloor \frac{YY}{4} \right\rfloor \equiv YY + \left\lfloor \frac{YY}{4} \right\rfloor \mod 7, providing an exact modular representation for non-century years. Conway's mental variant (using divisions by 12 and adjustments) is equivalent modulo 7, facilitating computation without a calculator.

400-year cycle and subcycles

The calendar's doomsday pattern repeats precisely every 400 years, encompassing 146,097 days, which equals exactly 20,871 weeks with no remainder. This exact alignment of days to weeks ensures that the anchor days and overall weekly structure recur identically after 400 years, forming a complete cycle for doomsday calculations. Within this 400-year framework, the century anchor days follow a predictable progression, advancing by specific intervals due to the cumulative adjustments.
Century BlockAnchor Day
1600–1699
1700–1799
1800–1899
1900–1999
For example, the block from 2000 to 2399 begins with a anchor, mirroring 1600–1699, and the pattern continues cyclically thereafter. A key subcycle within the 400-year period is the 28-year repetition, where doomsdays often align due to 28 years containing an integer number of weeks aligned with —10,220 base days plus 7 extra leap days in the system, totaling 10,227 days or 1,461 weeks exactly. In the , this 28-year cycle is uninterrupted and exact, as every fourth year is a without century exceptions, allowing seamless repetition of the across centuries. However, in the , the 28-year subcycle is generally reliable within a single century but interrupted at century years not divisible by 400 (such as 1700, 1800, or 1900), which are not despite being divisible by 4; this omission shifts the by an extra day compared to the expected pattern, breaking the chain until the next aligned 28-year segment. These exceptions ensure the overall 400-year synchronization but require adjustments in cross-century computations.

Correspondence to dominical letters

The dominical letter system, derived from ancient Roman calendar practices and adopted by early Christian chronologers, labels the days of the year with repeating letters A through G to identify Sundays for liturgical purposes. In this scheme, is always assigned letter A, letter B, and so on through as G, after which the cycle repeats; the dominical letter for the year is the specific letter that corresponds to the first Sunday. Historically, dominical letters facilitated the alignment of movable feasts like in prayer books and perpetual calendars by allowing quick identification of Sundays without full day-of-week computations, a practice essential for regulating the church year before modern algorithms. The letter shifts backward by one position each (e.g., from A to G) and by two positions in leap years due to the extra day in , which advances all subsequent Sundays by one day relative to the dates. The Doomsday rule, developed by mathematician , connects directly to this system by using the year's doomsday—the weekday shared by key "anchor" dates—as a single reference point to derive the dominical letter via fixed modular offsets. For instance, in common years of the (where the century anchor is ), a doomsday falling on corresponds to dominical letter F, reflecting the alignment of dates with Sundays. Pre-Conway methods relied on tracking multiple letters across the year, whereas the Doomsday approach streamlines this to one weekday determination for all Sundays. The precise mapping between the doomsday weekday and dominical letter follows a standard correspondence, accounting for the structure of January 1–7:
Doomsday WeekdayCommon Year LetterLeap Year Letters
CDC
BCB
TuesdayABA
WednesdayGAG
FGF
EFE
DED
This table arises because the doomsday weekday relates to the position of within the initial seven-day cycle, with an offset of +3 mod 7 for common years (where maps to C, the third letter after A) and adjusted pairs for leap years to handle the February shift.

Alternative formulas

One notable alternative to Conway's mnemonic-based Doomsday rule is the formula proposed by Hirofumi Nakai for directly computing the weekday of the year's Doomsday, designed for straightforward mental arithmetic using only remainders 4 and multiplications by small constants. This approach avoids the need to memorize century anchors or year codes, instead relying on simple divisions and adjustments within the . Nakai's formula calculates the Doomsday weekday g(n) for a year n = 100c + y, where c is the century number and y is the year within the century (00 to 99), as follows: g(n) = \left[ 5(c_2 + y_2 - 1) + 10y \right] \mod 7 Here, c_2 = c \mod 4 and y_2 = y \mod 4, with weekdays numbered 0 for through 6 for . The formula implicitly accounts for through the century and year adjustments, and once the is found, the weekday for any date is determined by adding the offset from that date to the month's (e.g., or 14). For example, to find the Doomsday for 1984 (c = 19, y = 84): c_2 = 19 \mod 4 = 3, y_2 = 84 \mod 4 = 0, so g(1984) = [5(3 + 0 - 1) + 10 \times 84] \mod 7 = [10 + 840] \mod 7 = 850 \mod 7 = 3, corresponding to Wednesday (a leap year, where falls on the 4th of even months after ). This calculation involves basic multiplication and operations, taking seconds mentally. Unlike Conway's method, which emphasizes memorable dates and modular additions, Nakai's is more algebraic and direct for the annual anchor, though it still requires knowing month offsets for full dates; it sacrifices mnemonic flair for reduced memorization of codes. Other variants include earlier formulas, such as Lewis Carroll's 1887 method, which computes the weekday via summed items for century (e.g., $2 \times ((3 - (c \mod 4)) \mod 4)), year (dozens plus remainder plus leaps), month (cumulative days), and day, modulo 7—suitable for mental use but more step-heavy. Spreadsheet implementations often adapt these into single-cell formulas, like Excel's =MOD(DAY + MONTH_OFFSET + YEAR_CODE + CENTURY_CODE, 7), for automated without mental effort. These alternatives are particularly useful for programming perpetual calendars or double-checking mental results, where precision trumps mnemonic speed, though they may feel less intuitive for pure head computation compared to Conway's approach.

Practical Examples

Modern example

To illustrate the Doomsday rule in a modern context, consider the date of the Moon landing: July 20, 1969. This example demonstrates the step-by-step process for determining the day of the week without century transitions or leap-year complications beyond the standard formula. First, identify the century anchor for the 1900s, which is Wednesday in the Gregorian calendar. Next, for the year 1969, take the last two digits (69) and compute the year offset: divide 69 by 12 to get a quotient of 5 and a remainder of 9; then divide the remainder by 4 and take the floor to get 2. Add these values: 5 + 9 + 2 = 16, and reduce modulo 7 to obtain 2. Add this offset to the century anchor: Wednesday plus 2 days equals Friday, so the doomsday for 1969 is Friday. With the doomsday established as Friday, locate the doomsday anchor for July, which is the 11th (a standard mnemonic for the month). July 11, 1969, thus falls on a Friday. To find July 20, calculate the offset: 20 - 11 = 9 days, and 9 modulo 7 equals 2. Adding 2 days to Friday yields Sunday. This confirms that July 20, 1969, was a Sunday, aligning with historical records of the event.

Historical or cross-century example

To illustrate the Doomsday rule's application to a historical date in the Gregorian calendar, consider July 4, 1776, the day the Continental Congress adopted the Declaration of Independence in Philadelphia. The British American colonies, following Britain's adoption of the Gregorian calendar in 1752, used this system by 1776. For the 1700s century (1700–1799), the anchor day is Sunday. The two-digit year is 76; 76 modulo 7 equals 6, and the floor of 76 divided by 4 equals 19, which modulo 7 equals 5. Adding these to the century anchor gives 0 (Sunday) + 6 + 5 = 11, and 11 modulo 7 equals 4, corresponding to Thursday as the doomsday for 1776 (a leap year, with the calculation applicable post-February). In July, the doomsday falls on the 11th; July 4 is exactly 7 days earlier (11 - 4 = 7, or 0 modulo 7), so it shares the doomsday weekday of Thursday. This example highlights century code handling, as the 1700s anchor of differs from later centuries due to the cycle's 400-year structure, where non-leap century years like 1700 shift the anchor backward by 2 days from the prior century's (1600–1699, anchored ). For a cross-century transition, examine the shift from to , spanning the 1800s (anchor ) and 1900s (anchor ) centuries—both non-leap years. For , the two-digit year 99 7 equals 1, and (99/4) = 24, 7 equals 3; adding to the anchor gives 5 () + 1 + 3 = 9, 7 equals 2 ( ). For , the two-digit year 00 gives 0 + 0 = 0, so the is the century anchor (3 7). This one-day advance in reflects the century boundary's effect, as 365 days 7 equals 1, without a leap day adjustment. Such shifts underscore the rule's utility across centuries in the era.

References

  1. [1]
    The Doomsday Algorithm - Calculating the Weekday of any given Date
    Use the Weekday Calculator to find out the weekday for any date. Topics: Fun, Dates, Weekdays. Dooms Day Algorithm. The Doomsday Rule; The Doomsday Algorithm.
  2. [2]
    Doomsday Algorithm - Maple Help
    ### Summary of the Doomsday Algorithm
  3. [3]
    [PDF] Analysis of the Doomsday Algorithm By Edward Winters
    Mar 19, 2020 · This algorithm was first invented by Carroll but then Conway simplified it when he came up with the Doomsday rule. The Doomsday rule establishes ...
  4. [4]
    What Day Is Doomsday? How to Mentally Calculate the Day of the ...
    Oct 18, 2011 · Conway, being a world-class mathematician, did come up with a much simpler algorithm in 1973. He called his algorithm the "doomsday rule." The ...
  5. [5]
    The Doomsday Rule - CSE Personal Home Pages
    The Doomsday rule is a method devised by John Conway for computing the day of the week of any given date.
  6. [6]
    None
    ### Doomsday Anchors for Months in the Gregorian Calendar (Conway's Rule)
  7. [7]
    [PDF] John H. Conway Bibliography - Math (Princeton)
    Tomorrow is the Day After Doomsday, Eureka 36, 28-31, 1973. 119. Invariants for Quadratic Forms, J. Number Theory 5, 390-404, 1973. 120. A Construction for ...
  8. [8]
    [PDF] Methods for Accelerating Conway's Doomsday Algorithm (part 1)
    Jun 19, 2010 · The Doomsday algorithm (or Doomsday rule) is an algorithm for calculating the day of the week for any given calendar date.Missing: publication | Show results with:publication
  9. [9]
    What is the day of the week?
    Practice: On what day of the week were you born? Calculate it using the Doomsday rule and check it on a calendar or (if you already know it) with your memory.
  10. [10]
    Julian/Gregorian Calendars - The University of Nottingham
    1917. Russia, 1917. Yugoslavia, 1919. Romania, 1919. Greece, 1923. In Great Britain, the new calendar was adopted in September 1752. In order to deal with the ...
  11. [11]
    Countries` Calendar Reform - Webexhibits
    For example, when Soviet Russia undertook its calendar reform in February 1918, they moved from the Julian calendar to the Gregorian. This move resulted in ...
  12. [12]
    The Doomsday Rule - Time and Date
    Some dates fall on the same weekday every year. Use this knowledge to calculate the weekday of any given date in your head.
  13. [13]
    The Calendar
    Note that the Gregorian calendar has a period of 400 years: this period contains 303 regular years and 97 leap years, to a total of 146097 days, or precisely ...The Gregorian calendar · The Gregorian ISO 8601... · The Gregorian lunar calendar
  14. [14]
    The Gregorian calendar - Claus Tøndering
    In the Gregorian calendar, the tropical year is approximated as 36597/400 days = 365.2425 days. Thus it takes approximately 3300 years for the tropical year ...
  15. [15]
    [PDF] Physics Recreations: The Doomsday Algorithm
    Oct 21, 2011 · The doomsday algorithm is a clever method for determining the day of week for any calendar date, which you can do entirely in your head.
  16. [16]
  17. [17]
    CATHOLIC ENCYCLOPEDIA: Dominical Letter - New Advent
    The Dominical Letter of any year is defined to be that letter of the cycle A, B, C, D, E, F, G, which corresponds to the day upon which the first Sunday (and ...
  18. [18]
  19. [19]
    To Find the Day of the Week for any Given Date - Nature
    Having hit upon the following method of mentally computing the day of the week for any given date, I send it you in the hope that it may interest some of your ...<|control11|><|separator|>
  20. [20]
    July 20, 1969: One Giant Leap For Mankind - NASA
    Jul 17, 2009 · At 10:56 p.m. EDT Armstrong is ready to plant the first human foot on another world. With more than half a billion people watching on television ...
  21. [21]
    [PDF] Methods for Accelerating Conway's Doomsday Algorithm (part 2)
    The Doomsday algorithm is an algorithm for determining the day of the week for any calendar date. It is simple enough that, with practice, it can be done ...
  22. [22]
    What Happened on July 20, 1969 - On This Day
    What Happened on July 20, 1969. >> Calendar. Home · By Year · 1969 · July; 20. Jun ... Week: Sunday How Long Ago? 56 years, 3 months and 19 days. Leap Year: No.