Determination of the day of the week facts for kids
The day of the week for any date can be figured out using different algorithms. You can also use special perpetual calendars, which are like cheat sheets that tell you the day without any math.
A common reason to do this is to find out what day of the week someone was born, or when an important event happened.
Contents
How it Works
When we calculate the day of the week, we often use numbers for each day. For example, ISO 8601 says Monday is 1, Tuesday is 2, and so on, up to Sunday as 7.
Sometimes, Sunday is counted as 0, or 7. This uses something called arithmetic modulo 7. It just means you find the remainder after dividing by 7. So, if you have 7 days, the remainder is 0. If you have 8 days, the remainder is 1 (because 8 divided by 7 is 1 with a remainder of 1).
Here's how days can be numbered:
Standard | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday | How it's used |
---|---|---|---|---|---|---|---|---|
ISO 8601 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Used in some computer programs. |
0 | 1 | 2 | 3 | 4 | 5 | 6 | ||
2 | 3 | 4 | 5 | 6 | 7 | 1 | Used in some older computer systems. |
The main idea behind most methods is to start with a date you already know (like January 1, 1800, which was a Wednesday). Then, you count the number of days between that known date and the date you want to find. Finally, you use "modulo 7" to figure out the new day of the week.
One common way is to find a starting value for the century, then adjust for the month, add the number of leap years, and add the day of the month. After adding all these numbers, you divide by 7 and the remainder tells you the day of the week.
Some methods add everything up first and then divide by 7. Others divide by 7 at each step. Both ways work! Adding everything first is easier for computers. Dividing at each step is better for doing it in your head.
Corresponding Days
Every seventh day in a month has the same name. For example, if the 1st is a Monday, then the 8th, 15th, 22nd, and 29th will also be Mondays.
Day of the month |
---|
00 07 14 21 28 |
01 08 15 22 29 |
02 09 16 23 30 |
03 10 17 24 31 |
04 11 18 25 |
05 12 19 26 |
06 13 20 27 |
Corresponding Months
"Corresponding months" are months that start on the same day of the week. For example, September and December always start on the same day. This is because there are exactly 13 full weeks between September 1 and December 1.
Months can only correspond if the number of days between their first days can be divided by 7. For instance, February in a common year (28 days) corresponds to March because 28 is divisible by 7 (exactly four weeks).
In a leap year, January and February correspond to different months than in a common year. This is because February has 29 days in a leap year, which shifts the start day for all later months.
- January corresponds to October in common years.
- January corresponds to April and July in leap years.
- February corresponds to March and November in common years.
- February corresponds to August in leap years.
- March always corresponds to November.
- April always corresponds to July.
- September always corresponds to December.
- May and June never correspond to any other month.
This table shows which months correspond by giving them the same number:
Common years | Leap years | All years | Month Number |
---|---|---|---|
Jan | Oct | 0 | |
May | 1 | ||
Feb | Aug | 2 | |
Feb | Mar Nov | 3 | |
Jun | 4 | ||
Sept Dec | 5 | ||
Jan | Apr July | 6 |
Corresponding Years
There are seven possible days a year can start on. Leap years change things after February 29. This means there are 14 different ways a year's calendar can look.
- For example, 2021 was a common year starting on a Friday. Its calendar was like 2010's.
- 2024 is a leap year starting on a Monday. Its calendar is like 1996's.
Every leap year's calendar repeats every 28 years. Common years repeat every 6 years and twice every 11 years. For example, the last leap year starting on a Wednesday was 2020, and the next will be 2048.
This table shows how years correspond:
Year of the century mod 28 |
Year Number |
---|---|
00 06 12 17 23 | 0 |
01 07 12 18 24 | 1 |
02 08 13 19 24 | 2 |
03 08 14 20 25 | 3 |
04 09 15 20 26 | 4 |
04 10 16 21 27 | 5 |
05 11 16 22 00 | 6 |
Notes:
- Black means all the months of a Common Year.
- Red means the first 2 months of a Leap Year.
- Blue means the last 10 months of a Leap Year.
Corresponding Centuries
Centuries also have a pattern for which day of the week they start on.
Julian century mod 700 |
Gregorian century mod 400 |
Day |
---|---|---|
400: 1100 1800 ... | 300: 1500 1900 ... | Sun |
300: 1000 1700 ... | Mon | |
200 0900 1600 ... | 200: 1800 2200 ... | Tue |
100 0800 1500 ... | Wed | |
700: 1400 2100 ... | 100: 1700 2100 ... | Thu |
600: 1300 2000 ... | Fri | |
500: 1200 1900 ... | 000: 1600 2000 ... | Sat |
"Year 000" in regular history means the year 1 BC (the year before AD 1). In astronomical year numbering, year 0 is between 1 BC and AD 1.
Mathematical Ways to Calculate the Day of the Week
These methods use math formulas to find the day of the week.
Rata Die
The simplest method is called Rata Die. It works by adding up the total number of days that have passed since a known starting date. For example, if January 1, AD 1 was a Monday, you count how many days have passed since then.
Then, you take that total number of days and find its remainder when divided by 7. This remainder tells you the day of the week. For example, if the remainder is 0, it might be Sunday; if it's 1, it's Monday, and so on.
This method is good for computers but not easy for people to do in their heads. For example, August 13, 2009, was 733,632 days from January 1, AD 1. If you divide 733,632 by 7, the remainder is 4, which means it was a Thursday.
Gauss's Algorithm
Carl Friedrich Gauss, a famous mathematician, came up with a way to find the day of the week for January 1 of any year. He never published it himself, but it was found in his notes later.
His method works for the Gregorian calendar. He numbered weekdays from 0 (Sunday) to 6 (Saturday).
The general idea is:
- First, find the day of the week for January 1 of the year.
- Then, add a special number for the month (from a lookup table).
- Finally, add the day of the month.
- Take the total and find its remainder when divided by 7.
Here's the table of month numbers (offsets) for Gauss's method:
Months | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Common years | 0 | 3 | 3 | 6 | 1 | 4 | 6 | 2 | 5 | 0 | 3 | 5 |
Leap years | 4 | 0 | 2 | 5 | 0 | 3 | 6 | 1 | 4 | 6 |
Zeller's Algorithm
Zeller's congruence is another mathematical way to find the day of the week. In this method, the months are numbered differently: March is 3, April is 4, all the way to February, which is 14.
Also, the year is thought of as starting in March. So, if you want to find the day for January or February, you treat it as part of the *previous* year. For example, January 1995 would be month 13 of the year 1994.
Here's the table of month offsets for Zeller's algorithm:
Months | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Jan | Feb |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Offset | 10 | 13 | 15 | 18 | 20 | 23 | 26 | 28 | 31 | 33 | 36 | 39 |
Wang's Algorithm
Wang's algorithm is another method for the Gregorian calendar. It uses a special "null-days function" (month offset) that changes depending on the month.
Here's the table for Wang's algorithm:
Month | Offset |
---|---|
1 | 1 |
3 | 5 |
5 | 7 |
7 | 9 |
9 | 3 |
11 | 12 |
2 | 12 |
4 | 2 |
6 | 4 |
8 | 6 |
10 | 8 |
12 | 10 |
Other Algorithms
Schwerdtfeger's Method
Schwerdtfeger's method is a mix of tables and calculations. It splits the year into the century part and the two-digit year part. The way you do it depends on the month.
Here's the table for the month value:
Month | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | 0 | 3 | 2 | 5 | 0 | 3 | 5 | 1 | 4 | 6 | 2 | 4 |
And here's the table for the century value, depending on the calendar: For the Gregorian calendar:
Century mod 4 | 0 | 1 | 2 | 3 |
---|---|---|---|---|
Value | 0 | 5 | 3 | 1 |
For the Julian calendar:
Century mod 7 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|---|
Value | 5 | 4 | 3 | 2 | 1 | 0 | 6 |
Lewis Carroll's Method
Charles Lutwidge Dodgson, also known as Lewis Carroll (who wrote "Alice in Wonderland"), created his own puzzle-like method. It uses similar month numbers to other methods. He also gave specific steps for finding century adjustments.
His method works for both "Old Style" (Julian calendar) and "New Style" (Gregorian calendar) dates. However, his example for February 23, 1676, only works if the Julian calendar year starts on January 1, not March 25, which was common in "Old Style" times.
See also
- Doomsday rule
- Julian day
- Mental Calculation World Cup (This competition has a calendar calculation contest!)
- Perpetual calendar
- Buddhist calendar