The day of the week calculator above takes any calendar date and returns the weekday it falls on, from the signing of a historical document to a contract date twenty years from now. It does not rely on the browser's date object, which can shift a day across time zones. It uses Zeller's congruence, a closed-form arithmetic formula that produces the same answer everywhere, and it shows you the intermediate value so you can follow the working rather than trust a black box.
Arb Digital publishes this alongside the rest of our date toolkit because knowing the weekday is often the actual question behind a date lookup: whether a deadline lands on a weekend, whether a launch date is a Monday, whether an anniversary is worth planning around. This page explains the method in enough detail that you can do it in your head.
What This Day of the Week Calculator Does
Enter a day, month and year and the tool names the weekday. Alongside it you get the day-of-year number (1 to 365 or 366), the ISO 8601 week number, whether the year is a leap year, and the raw h value produced by Zeller's congruence — the number the formula actually returns before it is mapped to a weekday name. Exposing that value is the point of the page: it lets you check your own hand calculation against the tool step by step.
Invalid dates are rejected rather than absorbed. Typing 31 April or 29 February in a non-leap year returns an error instead of quietly rolling the date to 1 May or 1 March, which is what most naive date parsers do and a frequent source of silent data corruption in forms.
How to Use It
- Enter the day of the month as a number from 1 to 31.
- Pick the month from the dropdown, which avoids the day/month ordering ambiguity that makes 03/04 mean two different dates on either side of the Atlantic.
- Enter the four-digit year. Any year from 1583 onward is handled correctly under the Gregorian calendar.
- Press "Find the day" to see the weekday, the day-of-year number, the ISO week, and the formula's intermediate value.
- Press "Use today" to load the current date if you just want a quick check of where you are in the year.
The Formula: Zeller's Congruence
Zeller's congruence for the Gregorian calendar is a single expression: h = (q + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J) mod 7, where q is the day of the month, m is the month with March counted as 3 through to February as 14, K is the year within the century, and J is the century (the year divided by 100, rounded down). The result h maps to weekdays starting from Saturday: 0 is Saturday, 1 Sunday, 2 Monday, and so on to 6 for Friday.
The one trap is the month shift. January and February are treated as months 13 and 14 of the previous year. This is not a quirk — it is the trick that makes the whole formula work, because it moves the leap day to the end of the year where it stops disturbing the month-length pattern. Get this wrong and every January and February answer is off.
Work an example. Take 4 July 1776. Here q = 4, m = 7, the year stays 1776, so K = 76 and J = 17. The month term is ⌊13 × 8 ÷ 5⌋ = ⌊20.8⌋ = 20. Now sum: 4 + 20 + 76 + ⌊76/4⌋ (19) + ⌊17/4⌋ (4) + 5 × 17 (85) = 208. And 208 mod 7 = 5, because 7 × 29 = 203. Counting from Saturday, 5 is Thursday. The American Declaration of Independence was dated a Thursday, which the calculator confirms with the default values loaded on this page.
Why the ⌊13(m+1)/5⌋ Term Exists
That term looks arbitrary and is the most interesting part of the formula. Month lengths from March onward follow a repeating pattern: 31, 30, 31, 30, 31, then 31, 30, 31, 30, 31. Averaged out, the months in that stretch are about 30.6 days long. The expression 13(m+1)/5 equals 2.6(m+1), and taking the floor of it accumulates the correct number of whole days shifted by each preceding month, without needing a lookup table of month lengths.
In other words, the term is a compressed calendar. It reproduces the cumulative day offsets of a whole year of irregular month lengths in one multiplication and one division. Once January and February have been pushed to the end of the previous year by the m = 13, 14 substitution, the remaining months fall into a clean enough rhythm for a linear approximation to be exact rather than approximate.
The Doomsday Method for Mental Arithmetic
Zeller's congruence is precise but awkward to run in your head. John Conway's Doomsday algorithm is the practical alternative. It rests on the observation that several dates always fall on the same weekday within any given year: 4/4, 6/6, 8/8, 10/10, 12/12, the last day of February, and — with the memory hooks "9 to 5 at the 7-Eleven" — 9/5, 5/9, 7/11 and 11/7. That shared weekday is the year's "doomsday".
To use it, find the doomsday for the year, find the nearest anchor date to the one you want, and count the difference in days modulo 7. For 2026, the doomsday is Saturday. So 4 April 2026 is a Saturday, 6 June is a Saturday, and 12 December is a Saturday. Want 25 December? 12 December is a Saturday, so 19 December is too, and so is 26 December — which makes 25 December a Friday. No formula, just counting sevens.
Doomsday advances by one weekday each common year and by two across a leap year, so once you memorise a single anchor you can walk to any nearby year. It is the method to learn if you want to answer weekday questions without a device. Zeller is the method to implement if you are writing code.
ISO Week Numbers Are Not Simple Week Counting
The week number shown in the results follows ISO 8601, which defines week 1 as the week containing the first Thursday of the year, with weeks running Monday to Sunday. That definition has consequences that catch people out. Early January dates can belong to week 52 or 53 of the previous year, and late December dates can belong to week 1 of the next year. A few years contain 53 ISO weeks rather than 52.
This matters for reporting. A dashboard that groups sales by ISO week and a spreadsheet that groups by "the nth block of seven days since 1 January" will disagree at every year boundary, and the discrepancy is invisible until someone reconciles two reports. The week number calculator covers ISO week numbering in full if that is your main question.
Calendars Repeat, and That Is Occasionally Useful
Because there are seven possible starting weekdays and two year lengths, there are only fourteen distinct calendar layouts. Any given year's calendar will recur, typically after 6, 11 or 28 years depending on where the leap years fall. That is why an old paper calendar sometimes becomes usable again, and why a "day of week" answer for a distant year is fully determined rather than an approximation.
The pattern is not perfectly regular, though, because of the century exception in the leap year rule. The 28-year cycle holds only within a stretch containing no skipped leap year. Across 1900 or 2100 the pattern breaks. If you need to know whether a specific year is a leap year, the leap year calculator applies the full rule including that exception.
Where the Weekday Actually Changes a Decision
Deadlines are the obvious case. A contract that specifies a date falling on a Sunday usually shifts under the contract's own terms, and the shift may be forward to Monday or back to Friday depending on the wording. Knowing the weekday before you agree the date avoids the argument later. For counting how many working days sit between two dates rather than raw calendar days, use the business days calculator.
Scheduling is the second case. Launch dates, email sends, and content publication all have weekday patterns, and picking a date without checking which day it lands on is how a campaign ends up going live on a Saturday. The third case is historical verification: any document, photograph or record that states both a date and a weekday can be sanity-checked in seconds, and a mismatch is a genuine signal that something has been transcribed wrong. The official definition of civil date and time standards is maintained by bodies such as the NIST Time and Frequency Division, and the calendar rules themselves are set out in the ISO 8601 date and time standard.
Arb Digital builds scheduling, booking and reporting systems where weekday logic, week numbering and time zones are handled explicitly instead of guessed at.
Web Development Services Talk to Arb DigitalCommon Mistakes to Avoid
- Forgetting the January and February shift in Zeller — those months count as 13 and 14 of the previous year, and skipping that breaks every early-year answer.
- Assuming h = 0 means Sunday — in the standard Gregorian form of the formula, 0 is Saturday. Different published variants use different starting points.
- Reading week numbers as simple seven-day blocks — ISO week 1 is the week containing the first Thursday, so early January can belong to the previous year's week 52 or 53.
- Letting invalid dates roll silently — 31 April becoming 1 May in a form field corrupts data without any error to notice.
- Applying the Gregorian formula to pre-1582 dates — historical dates before the calendar reform need the Julian variant of the congruence instead.
Related Free Tools From Arb Digital
Pair this with the date difference calculator to measure the gap between two dates, the days until date calculator for a countdown to a future date, the age calculator for years and months elapsed, and the Unix timestamp converter when you need the machine-readable form of a date. The full free online tools hub has the rest.
Frequently Asked Questions
It is a closed-form arithmetic formula that returns the weekday for any Gregorian date from the day, month, century and year within the century. It needs no lookup tables and no date library, which makes it reliable across every programming language and browser.
Shifting them into the previous year moves the leap day to the end of the year, where it no longer disturbs the pattern of month lengths that the formula relies on. Without that shift the formula gives wrong answers for every January and February date.
It is a mental method based on the fact that 4/4, 6/6, 8/8, 10/10, 12/12 and the last day of February all share the same weekday within any given year. Find that weekday, then count in sevens from the nearest anchor date to the one you want.
Yes. The Gregorian calendar rules are fixed and deterministic, so weekdays for future dates are exact rather than estimated. Only leap seconds are unpredictable, and they do not affect which weekday a calendar date falls on.
Under ISO 8601, week 1 is the week containing the first Thursday of the year. That means the first days of January can fall in week 52 or 53 of the previous year, and the last days of December can fall in week 1 of the next.
There are only fourteen possible calendar layouts, so any year's layout recurs — usually after 6, 11 or 28 years. The 28-year cycle only holds within a stretch that contains no skipped century leap year.
Not correctly. Dates before the Gregorian reform of October 1582 used the Julian calendar, which needs a different form of Zeller's congruence. Applying the Gregorian version to earlier dates gives an answer that no historical record would agree with.