Using this calculator
This tool determines the weekday for any date you enter. Simply input a date in YYYY-MM-DD format (for example, 2025-03-15), and the calculator returns the corresponding day: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday. It works for dates in the past, present, and future.
The formula
Day of week = (q + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ − 2J) mod 7
This is Zeller's congruence, a mathematical algorithm that converts any calendar date into its corresponding weekday. The variables represent: q (day of month), m (month adjusted so January = 13, February = 14), K (year mod 100), and J (century, calculated as ⌊year/100⌋).
Worked example
Let's find the day of the week for July 20, 1969—the date of the Apollo 11 moon landing.
Input: 1969-07-20
Step 1: Assign variables
- q = 20 (the day)
- m = 7 (July stays as 7 since it's after February)
- Year = 1969
- K = 69 (1969 mod 100)
- J = 19 (⌊1969/100⌋)
Step 2: Calculate each component
- q = 20
- ⌊13(7+1)/5⌋ = ⌊104/5⌋ = 20
- K = 69
- ⌊K/4⌋ = ⌊69/4⌋ = 17
- ⌊J/4⌋ = ⌊19/4⌋ = 4
- 2J = 38
Step 3: Sum and apply modulo
- Sum = 20 + 20 + 69 + 17 + 4 − 38 = 92
- 92 mod 7 = 1
Step 4: Map to weekday Zeller's congruence returns 0 = Saturday, 1 = Sunday, 2 = Monday, etc.
- Result: 1 = Sunday
July 20, 1969 was indeed a Sunday—confirmed!
Things to watch
A few important points when using this calculator:
Gregorian calendar assumption: This tool assumes the Gregorian calendar, which is the international standard. For dates before October 15, 1582 (when the Gregorian calendar was adopted), results may not match historical records in some countries that used the Julian calendar longer.
Month adjustment: If your date falls in January or February, the calculator internally treats those months as months 13 and 14 of the previous year. This is built into Zeller's congruence and happens automatically—you just enter the date normally.
Year range: The calculator works for any year, but practical limits exist. Dates far in the past (before the calendar system was standardized) or extremely far in the future are mathematically valid but historically meaningless.
Leap years: The algorithm accounts for leap years automatically. You don't need to adjust anything; just enter the date as it appears on the calendar.
Common uses include planning events, finding when a specific date occurred, checking which day your birthday falls on in a given year, or verifying historical dates. It's particularly handy for genealogy research, scheduling, and satisfying curiosity about dates in popular culture or history.