Tools · Time & Date

Day of the Week Calculator

Which weekday any date from 1583 to 2200 falls on — worked out from the date itself with Zeller’s congruence, and shown term by term rather than simply asserted. With the day of the year, the leap-year verdict, and the same date in the years either side.

The arithmetic is shown, not hiddenHow it worksInputs stay on this device
Your inputs

One date

Any date from 1583 to 2200. Birthdays, historical events, a contract date — the weekday is worked out from the numbers, not looked up.

Your inputs are calculated locally and are not stored.
Day of the weekSaturday

January 1, 2000 falls on a Saturday — day 1 of 366 in a leap year, with 365 still to run.

Weekday
Saturday
ISO weekday number
6 of 7
Day of the year
1 of 366
Days left in the year
365
Leap year
Yes
Same date, year before
Friday, January 1, 1999
Same date, year after
Monday, January 1, 2001
Zeller’s congruence for 2000-01-01, term by term
TermValueWhat it accounts for
q — day of the month1Enters the sum unchanged.
⌊13(m + 1) ÷ 5⌋ — month term36m is 13: March is 3, and January and February are 13 and 14 of the year before.
K — year of the century991999 mod 100. One weekday of drift per year.
⌊K ÷ 4⌋ — leap days so far24One more day of drift for each leap year inside the century.
⌊J ÷ 4⌋ — century leap days4The centuries that keep their leap day: 1600, 2000, 2400.
5J — century drift95J is 19. A plain century is 36,524 days, which is 5,218 weeks and 6 days.
Sum259The six terms added together.
Sum mod 7 = h0Zeller counts from Saturday, so h = 0 is Saturday and h = 6 is Friday. Here that is Saturday.
  • Nothing here asks the browser what day it is. The weekday comes out of the date itself, which is why the same link gives the same answer forever.
  • Dates before 15 October 1582 are refused rather than guessed. Britain and its colonies kept the Julian calendar until 1752 and Russia until 1918, so a “date” from those places and years needs its calendar stated before it means anything.
Formula & methodology

Zeller’s congruence, and why it starts by moving January

Every computer already knows what weekday a date falls on, so working it out again needs a reason. The reason is that the answer is one word and the method is a small, complete piece of arithmetic that you can check by hand — and checking it by hand is the only way to believe it. Christian Zeller published the formula in the 1880s, and it has not needed correcting since.

h = (q + ⌊13(m + 1) ÷ 5⌋ + K + ⌊K ÷ 4⌋ + ⌊J ÷ 4⌋ + 5J) mod 7
q
Day of the month
m
Month, but shifted: March is 3 and February is 14, because January and February count as the 13th and 14th months of the previous year
K
Year within its century, after that shift
J
The century itself — 19 for 1999, 20 for 2026
h
0 is Saturday, 1 Sunday, and on to 6 for Friday — Zeller counted from Saturday, so this tool translates the result into the ISO 8601 numbering where Monday is 1

The month shift is the clever part. February is the only month whose length changes, and a month that changes length disturbs the offset of every month after it. Counting January and February as months 13 and 14 of the previous year moves the leap day to the very end, where there are no months left for it to disturb. That is what lets a single term, ⌊13(m + 1) ÷ 5⌋, absorb the whole irregular sequence 31, 30, 31, 30, 31, 31, 30, 31, 30, 31: from March onward those months average 30.6 days, and 13 ÷ 5 is 2.6, so the running floor lands exactly on each month’s cumulative offset.

The rest is drift. K adds one weekday for each year, because 365 mod 7 is 1. ⌊K ÷ 4⌋ adds one more for each leap day inside the century. 5J and ⌊J ÷ 4⌋ together handle the century years: an ordinary century is 36,524 days, which is 5,218 weeks and 6 days, and the 400-year rule gives the leap day back to 1600, 2000 and 2400. Add the terms, take the remainder on seven, and the calendar is gone — only the weekday is left.

Worked example

1 January 2000, added up by hand

January means the shift applies, so the date is treated as month 13 of 1999. That gives q = 1, m = 13, K = 99 and J = 19. The six terms are then 1, then ⌊13 × 14 ÷ 5⌋ = ⌊36.4⌋ = 36, then 99, then ⌊99 ÷ 4⌋ = 24, then ⌊19 ÷ 4⌋ = 4, then 5 × 19 = 95.

Add them: 1 + 36 + 99 + 24 + 4 + 95 = 259. And 259 is 7 × 37 exactly, so the remainder is 0— which in Zeller’s numbering is Saturday. The millennium began on a Saturday, and there was no calendar involved in finding that out.

A date with no shift, for contrast: 20 July 1969. q = 20, m = 7, K = 69, J = 19. The terms are 20, ⌊13 × 8 ÷ 5⌋ = 20, 69, ⌊69 ÷ 4⌋ = 17, 4 and 95, which sum to 225. 225 leaves a remainder of 1 on division by seven, and h = 1 is Sunday. Apollo 11 landed on a Sunday afternoon, which is why so much of the world was at home watching.

A provable curiosity

The 13th falls on a Friday more often than on anything else

This is usually told as superstition, but it is arithmetic, and the reason is that the Gregorian calendar closes. One cycle is 400 years and 146,097 days, and 146,097 divided by 7 is 20,871 with nothing left over — a whole number of weeks. So the calendar repeats exactly, weekdays included, and 400 years is not a sample of the calendar. It is all of it.

That makes the question countable. There are 4,800 thirteenths in a cycle, 12 a year for 400 years, and if the weekdays were evenly spread each would get 685 and change. They are not evenly spread, because 4,800 does not divide by 7:

How the 4,800 thirteenths of a 400-year Gregorian cycle fall
WeekdayTimes the 13th falls on it
Friday688
Wednesday687
Sunday687
Monday685
Tuesday685
Thursday684
Saturday684

Friday leads Saturday by four occurrences in 4,800 — a margin of about a tenth of a percent, which nobody has ever noticed without counting. The superstition is much older than the Gregorian calendar and owes it nothing. But the fact is checkable, and the test suite behind this page checks it: it runs the congruence over all 4,800 thirteenths of a cycle and fails if any of those seven numbers moves.

Before 1582

Why an old date needs its calendar stated

The Julian calendar treated every fourth year as a leap year with no exceptions, which made the average year about eleven minutes too long. By the sixteenth century that had accumulated into ten days of error against the seasons, and the Gregorian reform of 1582 corrected it in one step: 4 October 1582 was followed directly by 15 October 1582. Those ten dates do not exist.

JavaScript, like most software, applies Gregorian rules to every earlier year as well — the proleptic Gregorian calendar — and will happily tell you which weekday 1 January 1500 fell on. The number it returns is not what anyone alive in 1500 wrote down. This calculator refuses dates before 1583 for that reason rather than from any technical limit.

Adoption was also nothing like simultaneous. Catholic Europe moved in 1582; Britain and its American colonies not until September 1752, when eleven days were dropped; Russia not until 1918, which is why the October Revolution is commemorated in November. For any date in that long gap, “what day of the week was it?” has two answers, and which one is right depends on where the date was written.

Assumptions

What this calculator assumes

  • The Gregorian calendar, always. Dates before 1583 are refused rather than converted; there is no Julian mode.
  • A plain calendar date with no time and no time zone. A weekday is the same all day everywhere the date is that date, so nothing here depends on where you are.
  • ISO 8601 weekday numbering, where Monday is 1 and Sunday is 7. Zeller’s own numbering starts on Saturday and is shown in the working; the two are the same answer written differently.
  • The day of the year counts the date itself, so 1 January is day 1 and 31 December is day 365 or 366. The days-remaining figure does not count the date itself, so 31 December has none left.
  • Anniversaries clamp down. A 29 February date has no counterpart in a common year, and this tool reports 28 February rather than 1 March — the same convention the age calculator uses, so the two never disagree.
  • Leap seconds are ignored, as they are in every civil calendar. A day here is always one day.
Common questions

Day of the week FAQ

What day of the week was I born on?

Put your date of birth in the field above. The weekday comes out of the digits of the date rather than from a lookup table, so it works just as well for 3 November 1938 as for last Tuesday. Below the answer you also get the day of the year you were born, whether it was a leap year, and which weekday that same date fell on in the years either side.

Is Friday the 13th really more common than any other Friday the 13th?

The 13th does fall on a Friday slightly more often than on any other weekday, and it is provable rather than folklore. The Gregorian calendar repeats exactly every 400 years — 146,097 days, which is 20,871 whole weeks — so one cycle contains every arrangement the calendar can produce. Counting all 4,800 thirteenths in a cycle gives Friday 688, Wednesday and Sunday 687 each, Monday and Tuesday 685, and Thursday and Saturday 684. Friday wins by four occurrences in 4,800, about a tenth of a percent. It is a real edge and a completely useless one.

Why won't this calculator go back before 1583?

Because before 15 October 1582 there was no Gregorian calendar to compute against. The reform deleted ten days outright — 4 October 1582 was followed by 15 October — and any earlier date belongs to the Julian calendar instead. A formula that ignores that will answer a question about 1500 with total confidence and no agreement from any record written at the time. Refusing is the honest option. It also matters later than you might think: Britain and its colonies kept the Julian calendar until 1752, and Russia until 1918, so a date from those places needs its calendar stated before a weekday means anything.

Why does a birthday move forward one weekday each year, and sometimes two?

A common year is 365 days, and 365 divided by 7 leaves a remainder of 1, so the same date lands one weekday later next year. A leap year is 366 days, remainder 2, so it jumps two. Following that, a given date returns to the same weekday after gaps of 6, 5, 6 and 11 years in some order — a pattern that adds up to 28 years and then repeats, until a century year like 1900 or 2100 skips its leap day and shifts everything along.

How can a formula know the weekday without a calendar?

Because the calendar is arithmetic wearing a disguise. Zeller's congruence counts three separate kinds of drift — one weekday per year, one more per leap year, and a correction for the century years that skip their leap day — adds them to the day of the month and a term that absorbs the irregular month lengths, and takes the remainder on division by seven. The working is printed with every result above, so you can add the column up yourself.

Does this need an internet connection or send my date anywhere?

No. The whole calculation is six additions and a remainder, and it runs in your browser. Nothing is uploaded, nothing is stored, and the page works offline once it has loaded. Sharing a result puts the date in the link's query string, which is the only way it ever leaves your device — and only when you choose to share it.

Primary sources

Sources and review notes

  1. ISO 8601-1:2019 — the standard behind the YYYY-MM-DD date this tool takes and the weekday numbering it returns, in which Monday is day 1
  2. US Naval Observatory, Astronomical Applications Department — the Gregorian reform, the ten days deleted in October 1582, and the 400-year cycle of 146,097 days
  3. Christian Zeller, “Kalender-Formeln”, Acta Mathematica9 (1887), pages 131–136 — the original publication of the congruence. Print only; there is no stable open link to cite.

There is no dataset behind this page to go stale. The Gregorian leap-year rule has been fixed since 1582 and the month lengths since Julius Caesar, so the only way the answers above change is if the arithmetic is wrong — which is what the cross-check in the test suite exists to catch. It runs the congruence against the platform calendar for all 225,720 days in the supported range.