Day of the Week Calculator
Find the day of the week for any date using Zeller's congruence. Features a perpetual calendar algorithm explanation and historical context.
Day of Week
Results update instantly as you type
Enter Values
Zeller's Congruence
h = (q + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ − 2J) mod 7
Zeller Result (h)
2 → Monday
Formula Breakdown
q=1, m=13, K=23, J=20 → h = (1 + 36 + 23 + 5 + 5 − 40) mod 7 = 30 mod 7 = 2
First Day of Month
Monday
Days in Month
31
Embed Code
Copy and paste this HTML snippet into any web page to embed this calculator directly.
<iframe src="http://127.0.0.1:54963/embed/math/day-of-week-calculator?ref=embed" title="Day of the Week Calculator" width="100%" style="max-width:600px; border:none; height:500px;" loading="lazy"></iframe>
Direct Link
Share this link to let others open the calculator in their browser.
Day of the Week
Monday
Monday, January 1, 2024
h = (q + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ − 2J) mod 7
Step-by-step for this date:
q=1, m=13, K=23, J=20 → h = (1 + 36 + 23 + 5 + 5 − 40) mod 7 = 30 mod 7 = 2
1
q (day)
13
m (adj. month)
24
K (year mod 100)
20
J (century)
1
h (result)
Historical events for Monday, January 1, 2024 would appear here.
(Fun fact placeholder — connect to a history API for live data)
The Formula
Zeller's Congruence is a mathematical formula that calculates the day of the week for any given date in the Gregorian calendar. It was developed by German mathematician Christian Zeller in the 1880s. The formula uses modular arithmetic and encodes month lengths, leap year rules, and century adjustments into a single expression. The floor function (⌊⌋) represents integer division (rounding down), which is essential for handling the irregular lengths of months and leap year patterns. The modulo 7 operation produces a result in the range 0-6 that maps directly to days of the week.
Variable Definitions
Day of Week Index
The calculated day of the week result (0=Saturday, 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday).
Day of Month
The day of the month (1-31). For example, December 25 uses q = 25.
Adjusted Month
Adjusted month number: March=3, April=4, ..., December=12, January=13, February=14 of the previous year.
Year of the Century
The last two digits of the year (year mod 100). For 2024, K = 24.
Century
The zero-based century (year divided by 100, rounded down). For 2024, J = 20.
How to Use This Calculator
- 1
Enter the month as a number (1-12), the day of the month (1-31), and the year as a positive integer.
- 2
Click calculate to find the day of the week for that date, like "Wednesday" or "Friday."
- 3
View the full day name, formatted date, and the complete Zeller's Congruence calculation broken down step by step.
- 4
See the month calendar grid highlighting the position of the target date within the month.
- 5
Check the "Days in Month" and "First Day of Month" for additional calendar context.
Zeller's Congruence computes the day of the week for any Gregorian calendar date using modular arithmetic.
Understanding the Concept
Zeller's Congruence is a mathematical formula devised by Christian Zeller in 1883 that computes the day of the week for any Gregorian calendar date. It cleverly encodes month lengths, leap year rules, and century adjustments into a single modular arithmetic expression. The reason January and February are treated as months 13 and 14 of the previous year is that this shift places the leap day (February 29) at the end of the calculation cycle, greatly simplifying how the formula handles leap years. Without this adjustment, the formula would need an extra conditional term. The floor functions (represented by ⌊⌋) handle integer division, truncating fractional remainders. When working through the formula manually, each term represents a different calendar correction: the month term accounts for varying month lengths, the year terms account for leap years, and the century term accounts for the Gregorian calendar's century rule (years divisible by 100 are not leap years unless also divisible by 400).
Frequently Asked Questions
Related Calculators
Reviews
No reviews yet. Be the first to share your experience with Day of the Week Calculator.
Write a Review
