Conway's Doomsday Algorithm
The Doomsday algorithm, devised by the mathematician John Horton Conway, finds the weekday of any date by mental arithmetic. This page explains everything you need, and lets you practise it.
The idea
In every year, a set of easy-to-remember dates all fall on the same weekday, the year's doomsday: 4 April, 6 June, 8 August, 10 October and 12 December, among others (see the table below). In 2025 they are all Fridays, in 2026 all Saturdays. Once you know a year's doomsday, any date is a short count away from the nearest of these dates, and dates 7, 14, 21 or 28 days apart share their weekday.
Weekdays are numbered from Sunday = 0 to Saturday = 6, and all arithmetic is mod 7. A year is a leap year if it is divisible by 4, except for years divisible by 100 but not by 400: 1900 is not a leap year, 2000 is.
The steps
Write the year as 100C + y with 0 ≤ y ≤ 99, so 1995 has C = 19 and y = 95.
- Century anchor. The doomsday of year 100C (see the table) isA=(5 (Cmod4) + 2)mod7.From one century to the next, the 100 years and their 24 leap days shift it by 100 + 24 = 124 ≡ 5, or by 6 when the new century begins with a leap year like 2000. 400 years are exactly 20,871 weeks, so the anchors repeat with period 4 in C.
- Year. Since 365 ≡ 1, each year shifts the doomsday by one weekday and a leap year by two, so the y years since 100C shift it by y + ⌊y/4⌋. To keep the numbers small, split y into dozens:a=⌊y12⌋,b=ymod12,c=⌊b4⌋.Each dozen contributes 12 + 3 = 15 ≡ 1, hencey + ⌊y4⌋≡a + b + c(mod 7).
- The year's doomsday isD=(A + a + b + c)mod7.
- Month. With d the day of the date and d0 the day of the month's doomsday from the table (in January and February depending on whether it is a leap year), the weekday isw=(D + d − d0)mod7.
Weekday numbers
| 0 | Sunday “Noneday” |
| 1 | Monday “Oneday” |
| 2 | Tuesday “Twosday” |
| 3 | Wednesday “Treblesday” |
| 4 | Thursday “Foursday” |
| 5 | Friday “Fiveday” |
| 6 | Saturday “Six-a-day” |
Conway's own mnemonic is in quotes.
Century anchors
| 1800–1899 | Friday (5) |
| 1900–1999 | Wednesday (3) |
| 2000–2099 | Tuesday (2) |
| 2100–2199 | Sunday (0) |
Repeats every 400 years: the 2200s are like the 1800s, the 2300s like the 1900s.
Month doomsdays
| Jan | 3 Jan · leap year: 4 Jan |
| Feb | 28 Feb · leap year: 29 Feb |
| Mar | 14 Mar |
| Apr | 4 Apr |
| May | 9 May |
| Jun | 6 Jun |
| Jul | 11 Jul |
| Aug | 8 Aug |
| Sep | 5 Sep |
| Oct | 10 Oct |
| Nov | 7 Nov |
| Dec | 12 Dec |
Even months: 4 Apr, 6 Jun, 8 Aug, 10 Oct, 12 Dec (day = month). “I work 9-to-5 at 7-Eleven”: 9 May and 5 Sep, 11 Jul and 7 Nov. 14 Mar is Pi Day (3/14). January: the 3rd, or the 4th in leap years. February: its last day.
With practice, these steps can be performed very quickly in your head. Use Practice mode to work through examples with the tables and full explanation visible, then switch to Game mode to test yourself against the clock. In either mode you can press a weekday's number, 0–6, on your keyboard to answer instantly. Some dates are historical, and you'll see what happened on them.