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.

Jan
1
Feb
4
Mar
4
Apr
0
May
2
Jun
5
Jul
0
Aug
3
Sep
6
Oct
1
Nov
4
Dec
6

Day of Week Codes

The remainder after division determines the day.

Sun
0
Mon
1
Tue
2
Wed
3
Thu
4
Fri
5
Sat
6

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)

2000 *
4/5
2001
6
2002
0
2003
1
2004 *
2/3
2005
4
2006
5
2007
6
2008 *
0/1
2009
2
2010
3
2011
4
2012 *
5/6
2013
0
2014
1
2015
2
2016 *
3/4
2017
5
2018
6
2019
0
2020 *
1/2
2021
3
2022
4
2023
5
2024 *
6/0
2025
1
2026
2
2027
3
Jan-Feb / Mar-Dec

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

1Year code for 2013 = 0
2Month code for September = 6
3Day = 14
40 + 6 + 14 = 20
520 ÷ 7 = 2 remainder 6

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

이 페이지는 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.