Zeller's Congruence Calculator
Enter a date to compute its weekday with Zeller's formula.
Result
How it is calculated
The date is read as YYYY-MM-DD and must be a real calendar date typed with a four-digit year, two-digit month and day. Let q be the day, m the month and Y the year. January and February are counted as months 13 and 14 of the previous year. With K = Y mod 100 and J = Y div 100, h = (q + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J) mod 7. Here h = 0 means Saturday, 1 Sunday, 2 Monday and so on to 6 Friday, and the tool translates that into the weekday name. The Gregorian rules are always used, even for dates before the calendar was adopted, so there is no Julian mode and the results for old dates are for the proleptic Gregorian calendar, not for what a local record may show.
Worked example
Take 1969-07-20. Here q = 20, m = 7 (no shift needed), Y = 1969, so K = 69 and J = 19. Terms: ⌊13 × 8 ÷ 5⌋ = 20, ⌊69 ÷ 4⌋ = 17, ⌊19 ÷ 4⌋ = 4, 5 × 19 = 95. Sum: 20 + 20 + 69 + 17 + 4 + 95 = 225. Then 225 mod 7 = 1, since 7 × 32 = 224. An h of 1 stands for Sunday, so 20 July 1969 was a Sunday.
Common mistakes
- Reading h as the ISO weekday number: in the formula 0 is Saturday and 1 is Sunday, so h = 2 is Monday and not Tuesday.
- Forgetting that January and February belong to the previous year in the formula; for 1 January 2000 it uses year 1999 and month 13, which is why the results differ from a naive calculation.
- Typing the date as DD-MM-YYYY or MM/DD/YYYY: only
YYYY-MM-DDis accepted, and impossible dates like 2023-02-30 give no result. - Using the answer for dates in countries that still used the Julian calendar: the tool applies Gregorian rules, so those dates can be off by several days from local records.
- Entering a one-digit month or day such as 2026-7-16; it needs 2026-07-16.
About this calculator
Zeller's congruence is a formula devised by German mathematician Christian Zeller in the 19th century that computes the day of the week for any Gregorian calendar date using only arithmetic on the day, month and year. The calculation treats January and February as months 13 and 14 of the previous year, then combines the day, an adjusted month term, and terms for the year and century to produce a raw value called h, which is then taken modulo 7 to give a number representing a specific weekday (in this calculator 0 is Saturday, 1 is Sunday, 2 is Monday and so on up to 6 for Friday).
Because it needs no lookup tables or calendar libraries, Zeller's congruence has long been used to teach modular arithmetic, to verify that a historical date fell on the weekday a document claims, and to implement day-of-week logic in embedded or resource-constrained systems where importing a full calendar library isn't practical.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments