How to Calculate Day of Week
Learn the secret formula hidden in calendars to calculate any day of the week mentally!
The Formula
(Year Code + Month Code + Day) ÷ 7
(Year Code + Month Code + Day) ÷ 7 = Remainder → Day of Week
Month Code Table
Each month has a fixed code based on how many days shift from the previous month. January starts at 1 as an exception. February is calculated as 28 days.
Day of Week Codes
The remainder after division determines the day.
How to Calculate Year Code
For 2000s: Add the last two digits of the year, then add the quotient of that number divided by 4, plus the century adjustment value 5.
Example) For 2013: 13 + 3 + 5 = 21, the remainder of 21 ÷ 7 = 0 is the year code
For 1900s add 1 more (use 6), for 2100s subtract 1 (use 4).
Year Code Table (2000s)
* Green = Leap year (shows Jan-Feb / Mar-Dec codes)
Detailed Year Code Calculation
Basic Rules
- • Use year 2000 codes 4 and 5 as the base.
- • Before 2000: use 4. After 2000: use 5.
- • This is because 2000 is a leap year, so we exclude it.
- • Leap years occur every 4 years from 2000.
- • Year codes repeat: 1 2 3 4 5 6 0
Year Code Calculation (After 2000)
Year code increases by 1 each year, and adds another 1 after March in leap years.
Formula: (Years after 2000 + Leap year count + 5) mod 7
Note: If the target year is a leap year and the date is in Jan/Feb, do not count that year's leap year.
2010: 10 + 2 + 5 = 17 ÷ 7 remainder 3 → Year code 3
2020 Feb: 20 + 4 + 5 = 29 ÷ 7 remainder 1 → Year code 1
2020 May: 20 + 5 + 5 = 30 ÷ 7 remainder 2 → Year code 2
2030: 30 + 7 + 5 = 42 ÷ 7 remainder 0 → Year code 0
2040 Jan: 40 + 9 + 5 = 54 ÷ 7 remainder 5 → Year code 5
Year Code Calculation (Before 2000)
Before 2000, subtract 1 for each year.
If remainder is -1, year code is 6. If remainder is -5, year code is 2.
Note: For leap years, Mar-Dec excludes that year's leap count, but Jan-Feb includes it.
Formula: -(Years before 2000 + Leap year count) + 4
1990: -(10 + 2) + 4 = -8 ÷ 7 remainder -1 → Year code 6
1980 Mar: -(20 + 4) + 4 = -20 ÷ 7 remainder -6 → Year code 1
1970: -(30 + 7) + 4 = -33 ÷ 7 remainder -5 → Year code 2
1960 Feb: -(40 + 10) + 4 = -46 ÷ 7 remainder -4 → Year code 3
1960 May: -(40 + 9) + 4 = -45 ÷ 7 remainder -3 → Year code 4
Perpetual Calendar Notes
1900 and 2100 are NOT leap years. In the Gregorian calendar (1582), years divisible by 100 are not leap years, but years divisible by 400 are.
Non-leap years: 1700, 1800, 1900, 2100, 2200, 2300, 2500, 2600, 2700
Leap years: 1200, 1600, 2000, 2400, 2800
Before Oct 15, 1582: Use month codes 4003 5136 2402
Example Calculation
September 14, 2013
Remainder 6 = Saturday
Leap Year Note
For January and February of leap years, subtract 1 from the result.
Tips for Speed
- ★Memorize the month codes first - they never change
- ★Learn year codes for recent years (2020-2030)
- ★Practice with birthdays of family and friends
- ★Use patterns: year codes repeat every 28 years