Day of the Week Calculator
Calculate what day of the week a particular date falls on. This calculator can determine the weekday for any date in the past or future, using the Gregorian calendar.
Weekday Information
Day | Color | Day Number |
---|---|---|
Sunday | Red | 0 |
Monday | Blue | 1 |
Tuesday | Green | 2 |
Wednesday | Orange | 3 |
Thursday | Purple | 4 |
Friday | Gray-Blue | 5 |
Saturday | Indigo | 6 |
About the Day of the Week Calculator
This calculator determines what day of the week a particular date falls on. It uses the Gregorian calendar, which is the calendar system used in most of the world today.
How the Calculation Works
The calculation is based on Zeller's Congruence algorithm, which is an algorithm to calculate the day of the week for any Julian or Gregorian calendar date. The formula is:
h = (q + floor((13*(m+1))/5) + K + floor(K/4) + floor(J/4) + 5*J) mod 7
Where:
- h is the day of the week (0 = Saturday, 1 = Sunday, 2 = Monday, ..., 6 = Friday)
- q is the day of the month
- m is the month (3 = March, 4 = April, ..., 14 = February)
- K is the year of the century (year mod 100)
- J is the zero-based century (floor(year / 100))
Gregorian Calendar
The Gregorian calendar, introduced in 1582, gradually replaced the Julian calendar to correct for the drift in the date of Easter. The calculator works for dates from October 15, 1582 onward (when the Gregorian calendar was first adopted).
Interesting Facts
- The Gregorian calendar repeats every 400 years (which is exactly 20871 weeks).
- February has 28 days in common years and 29 days in leap years.
- In the Gregorian calendar, years divisible by 100 are not leap years, unless they are also divisible by 400.
- September 1752 was the shortest month in British history (only 19 days) due to the calendar change.