Consolidated Reference

Day-of-Week Calculation Methods

Base-10 Approach
Base-20 Approach
Mental Date Calculation

Introduction

Both methods allow you to calculate the day of the week for any date using mental math. The core principle is the same: break a date into components (Century, Year, Month, Day), look up or calculate a code for each component, add all codes together, and take Mod 7 to get the day of the week.

The key difference is how the YEAR component is handled: the 10s Method uses Base-10 (decades) while the 20s Method uses Base-20. Both produce the Year Code by adding an Anchor Code and a Remainder Code. Once the Year Code is determined, the rest is a cakewalk — calculating the Year Code mentally is the hardest part.

The Master Formula

Day of Week = (Century Code + Year Code + Month Code + Day of Month) MOD 7

The result maps to the Day Code Table below.

Method 1: Zakariya Latif 10s Method (Base-10 / Decade System)

The 10s Method divides the 2-digit year into two parts: an Anchor Year (nearest lower multiple of 10) and a Unit Year (0–9). This method has a special Latif Patch Rule that adjusts codes for odd decades. Adding the Anchor Code (Table 1.1) and the Unit Code (Table 1.2) gives the Year Code, which is then combined with the Century, Month, and Day codes from the Shared Tables.

Steps for the 10s Method

#Step
1Find the Century Code from the Century Code Table
2Find the Anchor Year (nearest lower multiple of 10) and get its code from the 10s Anchor Year Code Table
3Find the Unit Year (last digit 0–9) and get its code — apply the Latif Patch Rule if in an odd decade
4Get the Month Code (adjust for leap year in Jan/Feb by subtracting 1)
5Add the Day of the month
6Sum all codes and take MOD 7 to get the day

Table 1.1 — 10s Anchor Year Codes

Anchor Year (×10)CodeFormulaPattern
000Start
105Prev − 2 = 0−2 = −2 mod 7 = 5−2
204Prev − 1 = 5−1 = 4−1
302Prev − 2 = 4−2 = 2−2
401Prev − 1 = 2−1 = 1−1
506Prev − 2 = 1−2 = −1 mod 7 = 6−2
605Prev − 1 = 6−1 = 5−1
703Prev − 2 = 5−2 = 3−2
802Prev − 1 = 3−1 = 2−1
900Prev − 2 = 2−2 = 0−2

💡 Pattern: subtract 2 and 1 alternately from the previous code. Apply MOD 7 when the result is negative.

⚠️ Latif Patch Rule (critical for the 10s Method) For odd decades (10, 30, 50, 70, 90), add +1 to the Unit Year Code when the Unit Year is 2, 3, 6, or 7.

Table 1.2 — Unit Year Codes (with Latif Patch applied)

Unit YearEven Decades (0,20,40,60,80)Odd Decades (10,30,50,70,90)Patch?Notes
000No
111No
223Yes (+1)Latif Patch: 2+1=3
334Yes (+1)Latif Patch: 3+1=4
455NoLeap year adds +1
566No
601Yes (+1)Latif Patch: 0+1=1
712Yes (+1)Latif Patch: 1+1=2
833NoLeap year adds +1
944No

💡 Unit Year Code formula: (Unit Year + INT(Unit Year / 4)) MOD 7

Method 2: Zakariya Latif 20s Method (Base-20 System)

The 20s Method divides the 2-digit year into an Anchor Year (nearest lower multiple of 20) and a Remainder (0–19). Adding the Anchor Code and the Remainder Code gives the Year Code, which combined with the Century, Month, and Day codes gives the day of the week.

This method is simpler — no patch rule needed! The remainder formula handles leap years automatically.

Steps for the 20s Method

#Step
1Find the Century Code from the Century Code Table
2Find the Anchor Year (nearest lower multiple of 20: 0, 20, 40, 60, 80) and get its code
3Find the Remainder (Year − Anchor Year, range 0–19) and calculate its code using the formula
4Get the Month Code (adjust for leap year in Jan/Feb by subtracting 1)
5Add the Day of the month
6Sum all codes and take MOD 7 to get the day

Table 2.1 — 20s Anchor Year Codes

Anchor Year (×20)CodeFormula: (Previous Code − 3) MOD 7
00Start
204(0 − 3) mod 7 = −3 mod 7 = 4
401(4 − 3) mod 7 = 1
605(1 − 3) mod 7 = −2 mod 7 = 5
802(5 − 3) mod 7 = 2

💡 Pattern: simply subtract 3 from the previous code and apply MOD 7. Only 5 codes to memorize!

Table 2.2 — Remainder-Year Codes (0–19)

RemainderCodeFormula: (R + INT(R/4)) MOD 7
00(0 + 0) mod 7 = 0
11(1 + 0) mod 7 = 1
22(2 + 0) mod 7 = 2
33(3 + 0) mod 7 = 3
45(4 + 1) mod 7 = 5
56(5 + 1) mod 7 = 6
60(6 + 1) mod 7 = 0
71(7 + 1) mod 7 = 1
83(8 + 2) mod 7 = 3
94(9 + 2) mod 7 = 4
105(10 + 2) mod 7 = 5
116(11 + 2) mod 7 = 6
121(12 + 3) mod 7 = 1
132(13 + 3) mod 7 = 2
143(14 + 3) mod 7 = 3
154(15 + 3) mod 7 = 4
166(16 + 4) mod 7 = 6
170(17 + 4) mod 7 = 0
181(18 + 4) mod 7 = 1
192(19 + 4) mod 7 = 2

💡 The INT(R/4) automatically counts leap years, adding +1 for every 4 years.

Shared Tables: Century, Month & Day Codes

Table 3 — Century Codes

Century (first 2 digits)Code
160
175
183
191
200
215
223
231
240
255
263
271
280
295
303

💡 Codes cycle through 0, 5, 3, 1 repeatedly. Centuries 16, 20, 24, 28 = 0; 17, 21, 25, 29 = 5; and so on.
Formula: (5 × (Century mod 4)) mod 7

Table 4 — Month Codes

MonthRaw CodeAdjustmentFinal CodeLeap-Year Code
Jan0−165 (6−1)
Feb3−121 (2−1)
Mar3−122
Apr6−155
May1−100
Jun4−133
Jul6−155
Aug2−111
Sep5−144
Oct0−166
Nov3−122
Dec5−144

💡 For leap years, subtract 1 from Jan & Feb codes only.
Formula: Raw Code = (Days before month) MOD 7. The Final Code includes the −1 adjustment.

Table 5 — Day Codes (final result mapping)

Day of WeekDay Code
Monday1
Tuesday2
Wednesday3
Thursday4
Friday5
Saturday6
Sunday7 or 0

💡 The final formula gives a number 0–6; match it here to get the day. Day-of-month code example: 15th of any month ⇒ 15 mod 7 ⇒ 1.

Worked Example: What day was January 15, 1995?

Using the 10s Method

StepDescriptionLookup / CalculationCode
1Century Code (19xx)From Century Table: 19 → 11
2Anchor Year (90)From 10s Anchor Table: 90 → 00
3Unit Year (5)From Unit Year Table (odd decade 90): 5 → 66
(No Latif Patch needed — 5 is not 2, 3, 6, 7)
4Month Code (January)From Month Table: Jan → 6 (not a leap year)6
5Day of Month (mod 7)15 → 11
6Sum All Codes1 + 0 + 6 + 6 + 1 = 1414
7Take MOD 714 MOD 7 = 00
ResultDay Code 0 = Sunday — ✓ January 15, 1995 was a SUNDAY

Using the 20s Method

StepDescriptionLookup / CalculationCode
1Century Code (19xx)From Century Table: 19 → 11
2Anchor Year (80)From 20s Anchor Table: 80 → 22
3Remainder (95−80=15)From Remainder Table: 15 → 44
(Formula: (15 + INT(15/4)) mod 7 = (15+3) mod 7 = 4)
4Month Code (January)From Month Table: Jan → 6 (not a leap year)6
5Day of Month (mod 7)15 → 11
6Sum All Codes1 + 2 + 4 + 6 + 1 = 1414
7Take MOD 714 MOD 7 = 00
ResultDay Code 0 = Sunday — ✓ January 15, 1995 was a SUNDAY

✅ Both methods give the same answer! 💡 Keep doing Mod 7 whenever the day of the month or any sum grows larger than 7.

Quick Reference Cheat Sheet

Century Codes: 16/20/24/28 → 0  |  17/21/25/29 → 5  |  18/22/26/30 → 3  |  19/23/27 → 1
Month Codes: Jan→6 Feb→2 Mar→2 Apr→5 May→0 Jun→3 Jul→5 Aug→1 Sep→4 Oct→6 Nov→2 Dec→4 (subtract 1 for Jan/Feb in leap years)
Day Codes: Mon→1 Tue→2 Wed→3 Thu→4 Fri→5 Sat→6 Sun→0/7
10s Method Anchors: 0→0, 10→5, 20→4, 30→2, 40→1, 50→6, 60→5, 70→3, 80→2, 90→0  |  Latif Patch: add +1 for unit years 2, 3, 6, 7 in odd decades
20s Method Anchors: 0→0, 20→4, 40→1, 60→5, 80→2  |  Remainder Formula: (R + INT(R/4)) MOD 7
Leap Year Rule: year divisible by 4 is a leap year, EXCEPT century years must be divisible by 400 (1900 is NOT leap, 2000 IS leap)
Final Formula: (Century Code + Year Code + Month Code + Day) MOD 7 = Day of Week

Important Notes

1.
The raw Month Code offset is calculated as (Days Before Month) MOD 7. The −1 adjustment aligns the result to Mon=1, Tue=2, etc.
2.
You can skip the −1 adjustment in month codes if you subtract 1 from the final result instead.
3.
The Year Code formula (Year + INT(Year/4)) MOD 7 automatically adds +1 for leap years by counting past leap days.
4.
For the 10s Method, remember the Latif Patch applies ONLY to unit years 2, 3, 6, 7 in odd decades (10, 30, 50, 70, 90).
5.
Century codes repeat every 400 years (pattern 0, 5, 3, 1 cycling every 4 centuries).
6.
Both methods produce identical results when applied correctly — choose whichever feels more natural to you.
How the formula handles leap years automatically

Year Code = (Year + INT(Year / 4)) MOD 7. The INT(Year/4) part counts how many leap years have passed. When a leap year occurs, this part increases by 1, automatically adding +1 to the entire year’s calculations.

Since March–December NEED this +1 boost, they’re already correct. The leap day (Feb 29) hasn’t happened yet for dates in those months — hence days before 29 Feb, in Jan and Feb, need the −1 adjustment.

Example, the 2023 → 2024 transition: 2023: INT(23/4) = 5; 2024: INT(24/4) = 6 ← automatically +1!