What Day of the Week Is It: Find the Weekday for Any Date
Asking what day of the week it is sounds like a job for a wall calendar, and for today it really is. The trouble starts when you need the weekday for a date that has not happened yet, when you are checking whether a deadline lands on a weekend, when two versions of a schedule need comparing, or when you are trying to remember which Tuesday a meeting happened three years ago. A calendar cannot help there: it only knows about the year you are standing in.
Why the weekday is a calculation, not a lookup
There are always seven days in a week, and that turns the whole problem into addition and a remainder. If you know one anchor date, every other date follows: count the days between them and take the result modulo 7. A remainder of 0 means the same weekday, 1 means the next one, and so on around the loop. The catch is that the months are not the same length. January has 31 days, April has 30, February has 28, so each month nudges the count by a different amount and a table of those nudges is the real tool.
Then there is 29 February, which shows up once every four years and adds a day the rest of the year has to absorb. Any shortcut that assumes every February has 28 days will drift by exactly one weekday from March onwards, and the mistake looks entirely plausible: you will blame your arithmetic rather than the calendar.
Get the answer first, theory later
Most of the time there is no reason to compute anything by hand. Open the weekday calculator, type a date into the field, and press the Today button if you want the current one. You get the weekday name in your own language, plus the three numbers that usually travel with it: the day of the year out of 365 or 366, the ISO 8601 week number, and whether the year is a leap year. Below the form sit four historical dates that make handy test cases: 12 April 1961, 20 July 1969, 9 May 1945 and 1 January 2000. Click any of them and the date loads into the field.
- the weekday spelled out, Tuesday or Tuesday, whichever locale you are in;
- the day number within the year and the total length of that year;
- the ISO 8601 week number, where weeks start on Monday;
- the date in a readable form, copyable with one click.
When the question is really about an interval rather than a name, the neighbouring tools take over. The date difference calculator measures the gap between two dates, the date formatter shows one date in every popular notation including Unix time, and the Unix timestamp converter goes the other way when you have a date and need the number. What a timestamp means and why it always sits in UTC is covered in the article on date formats.
Zeller's congruence: one formula, any date
For centuries, Christian calendars worked out the weekday by arithmetic rather than by looking at a printed sheet. The classic method was worked out by the Austrian mathematician and astronomer Johann Zeller in 1582, the same year the Gregorian calendar replaced the Julian one. The formula has barely changed since: it accepts any date and needs nothing but a pencil.
h = (q + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J) mod 7
q - day of the month (1…31)
m - month counted from March: March = 3 … December = 12,
January = 13 and February = 14 (the year is then reduced by 1)
K - the last two digits of the year (0…99)
J - the first two digits of the year, the century (0…19)
The remainder h gives the weekday:
0 - Saturday, 1 - Sunday, 2 - Monday, 3 - Tuesday,
4 - Wednesday, 5 - Thursday, 6 - FridayThe trick is the month numbering. March becomes month 3, so the month lengths run in one unbroken sequence of 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, and the 13/5 term then hands you the right offset for each of them. January and February are treated as months 13 and 14 of the previous year, because with this numbering they sit at the end of the year and the arithmetic never has to break stride.
Walking through a real date
Take 3 November 2026. Since the month is 11, nothing has to be adjusted: m = 11, K = 26, J = 20 and q = 3. From there it is one sum and one division.
q = 3, m = 11, K = 26, J = 20
⌊13(m+1)/5⌋ = ⌊13 × 12 / 5⌋ = ⌊156 / 5⌋ = 31
⌊K/4⌋ = ⌊26 / 4⌋ = 6
⌊J/4⌋ = ⌊20 / 4⌋ = 5
5J = 5 × 20 = 100
h = (3 + 31 + 26 + 6 + 5 + 100) mod 7
h = 171 mod 7
h = 3 → TuesdayA remainder of 3 in that numbering means Tuesday, which is what every printed calendar says as well. In ISO terms this is week 45, Tuesday, and the 307th day of a 365 day year.
Checking it on two more dates
A formula is only worth trusting once it survives a date whose answer nobody argues with. 1 January 2000 was a Saturday, and it is worth remembering because that was the year everybody wrongly believed would not be a leap year. January becomes month 13 and the year drops by one: m = 13, K = 99, J = 19, q = 1.
q = 1, m = 13, K = 99, J = 19
⌊13(m+1)/5⌋ = ⌊13 × 14 / 5⌋ = ⌊182 / 5⌋ = 36
⌊K/4⌋ = ⌊99 / 4⌋ = 24
⌊J/4⌋ = ⌊19 / 4⌋ = 4
5J = 5 × 19 = 95
h = (1 + 36 + 99 + 24 + 4 + 95) mod 7
h = 259 mod 7
h = 0 → SaturdayA remainder of zero is Saturday, so the formula holds. Run the same substitution on 1 January 2020 and the sum comes to 165, the remainder to 4, which is Wednesday, and 1 January 2020 was indeed a Wednesday. The same four numbers change, everything else stays put.
q = 1, m = 13, K = 19, J = 20
h = (1 + 36 + 19 + 4 + 5 + 100) mod 7
h = 165 mod 7
h = 4 → WednesdayThe shift table: counting from a date you already know
There is a second route that needs no algebra at all. The weekday shift between two dates equals the number of days between them, and the number of days between the same date in two consecutive months is just the length of the month in between. Convert those lengths into weekday shifts and the count becomes almost mechanical.
- a 31 day month shifts the weekday by +3, since 31 days is 4 weeks and 3 days;
- a 30 day month shifts it by +2;
- a 28 day February shifts it by 0, meaning the same weekday;
- a 29 day February shifts it by +1.
Here is how it runs in practice. Suppose you know that 1 January 2026 was a Thursday. By 1 November the count has reached 304 days, because January 31, February 28, March 31, April 30, May 31, June 30, July 31, August 31, September 30 and October 31 add up to that, and 15 November adds 14 more days for a total of 318. Now 318 mod 7 = 3, so a Thursday plus three days lands on Sunday. And 15 November 2026 was indeed a Sunday.
January 1 Jan 2026 - Thursday
February 1 Feb 2026 - Sunday
March 1 Mar 2026 - Sunday
April 1 Apr 2026 - Wednesday
May 1 May 2026 - Friday
June 1 Jun 2026 - Monday
July 1 Jul 2026 - Wednesday
August 1 Aug 2026 - Saturday
September 1 Sep 2026 - Tuesday
October 1 Oct 2026 - Thursday
November 1 Nov 2026 - Sunday
December 1 Dec 2026 - TuesdayA second table worth keeping covers 1 January of each coming year: 2026 opens on a Thursday, 2027 on a Friday, 2028 on a Saturday, 2029 on a Monday, 2030 on a Tuesday, 2031 on a Wednesday and 2032 on a Thursday. The rule behind it is short: an ordinary year pushes the next New Year forward by one weekday, and a leap year by two, because 366 days is 52 weeks and 2 days.
Where 29 February breaks the arithmetic
A leap year is one day longer and that extra day sits right in the middle of the year. 29 February 2024 was a Thursday. By 28 February 2026 the same calendar date had reached a Saturday: two years of drift, two weekday steps, because a leap year had passed in between. So whenever you carry February forward into March, take 29 days in a leap year and 28 in an ordinary one.
28 Feb 2026 - Saturday 29 Feb 2024 - Thursday
1 Mar 2026 - Sunday 1 Mar 2024 - FridayThis is why counting from New Year gives a different answer in a leap year and an ordinary one if you lean on a flat "31 days per month" table. Compare 15 January with 15 March: in 2026 the gap is 59 days (16 days left in January, 28 in February, 15 in March), while in 2024 it is 60 because February had an extra day. The weekdays differ too: 15 March 2026 was a Sunday and 15 March 2024 was a Friday.
Doing it in Excel, Python and JavaScript
Excel handles this in one cell. WEEKDAY with a second argument returns 1 to 7 with Monday as 1, so =WEEKDAY(A1,2) gives you a locale independent number. TEXT with the pattern "dddd" returns a name, but a Russian locale gives you «вторник» and an English one gives you "Tuesday", which is why formulas that cross a company border are safer when they lean on the number. If you do need a fixed English name, =TEXT(A1,"[$-409]dddd") forces it.
=WEEKDAY(A1,2) → 2 (Tuesday) for 03.11.2026 in A1
=CHOOSE(WEEKDAY(A1,2),"Mon";"Tue";"Wed";"Thu";"Fri";"Sat";"Sun")
=TEXT(A1,"[$-409]dddd") → "Tuesday"
=NETWORKDAYS(A1,B1) → working days between the two dates
=DATEDIF(A1,B1,"d") → the interval in days, one formulaPython works with date objects and gets on with it. weekday() numbers days from zero with Monday as zero, while isoweekday() starts at one with Monday as one, which lines up with ISO. strftime("%A") gives the English name; for other languages you either load a locale library or keep a seven item list on hand. The ISO week comes free with isocalendar(), which returns the year, the week and the weekday as a tuple.
from datetime import date
d = date(2026, 11, 3)
d.weekday() # 1 → Tuesday (Monday = 0)
d.isoweekday() # 2 → ISO: Monday = 1
d.strftime("%A") # "Tuesday"
d.timetuple().tm_yday # 307 → day of the year
d.isocalendar() # IsoCalendarDate(year=2026, week=45, weekday=2)
# days between two dates
(date(2027, 1, 1) - date(2026, 11, 3)).days # 59JavaScript has two traps that catch people regularly. First, new Date("2026-11-03") is parsed as midnight UTC while getDay() reports in local time, so anybody west of Greenwich sees the weekday one step early. Second, a night that loses or gains an hour at a daylight saving boundary makes the gap between two midnights 23 or 25 hours long, and dividing by 86,400,000 then produces a fraction. Calendar arithmetic is safer when it goes through Date.UTC.
// ISO weekday: Monday = 1 ... Sunday = 7
const iso = (d) => d.getDay() === 0 ? 7 : d.getDay();
iso(new Date(2026, 10, 3)); // 2 (Tuesday)
// Localised name
new Date(2026, 10, 3).toLocaleDateString("en-GB", { weekday: "long" });
// → "Tuesday"
// Day count with no timezone attached
const a = Date.UTC(2026, 10, 3), b = Date.UTC(2027, 0, 1);
(b - a) / 86400000; // 59ISO weeks and the question of day zero
An ISO week starts on Monday, and week 1 of a year is the week that contains the first Thursday. A consequence surprises people every year: 1 January does not have to belong to week 1 of its own year. 1 January 2027 belongs to week 53 of 2026, because 2026 had 53 ISO weeks. The first week of 2027 starts on 4 January, a Monday, and that Monday is where the new year begins as far as ISO numbering is concerned.
- ISO 8601: Monday is 1, Sunday is 7, and the week starts on Monday;
- ISO 8601: week 1 is the week holding the first Thursday, so it always starts near 4 January;
- POSIX and strftime: Sunday is 0, Monday is 1, running to Saturday 6;
- Excel with no second argument: Sunday is 1, Monday is 2;
- Excel with type 3: Monday is 0, Sunday is 6;
- .NET and older APIs: Sunday is 0, Monday is 1.
A "zero day of the week" is what people call this disagreement. ISO 8601 has no zero at all, days run from 1 to 7 and Monday leads. The Unix convention does have one: Sunday is 0 and Monday is 1, with the week starting on Sunday. Excel without arguments behaves the same way. So when an API hands you a day_of_week field full of zeroes, find out which numbering it uses before you map it onto your own calendar.
Questions people keep asking
What day of the week was 1 January 2020?
Wednesday. You can prove it with Zeller or with arithmetic from 1 January 2026, which was a Thursday: six years apart, with 2020 and 2024 both leap, gives 6 × 365 + 2 = 2192 days, and 2192 mod 7 = 1, so the weekday steps one back from Thursday to Wednesday. A second anchor confirms it: 1 January 2027 was a Friday and sits 2557 days after the start of 2020, a shift of two forward from Wednesday.
Why does 29 February change the count?
Because it turns up once every four years and adds exactly one day to the year. If you worked through the months by length and used 28 for February, every date from 1 March onwards ends up one weekday out. The rule for a leap year is simple: February has 29 days, so the step from 29 February to 1 March is +1, whereas in an ordinary year 28 February and 1 March always share the same weekday.
How do you count ISO weeks?
Weeks begin on Monday, and week 1 is the week containing the first Thursday of the year, which pins it to a day close to 4 January. From there follows a practical shortcut: if 1 January falls on a Thursday, Friday, Saturday or Sunday, it belongs to the final week of the previous year. In 2026, 1 January was a Thursday, so week 1 of 2026 began on 29 December 2025, and 2026 turned out to have 53 ISO weeks. That is why 1 January 2027 is written as 2026-W53-5.
What does a zero day of the week mean?
It means the weekday has been numbered from 0, which not every system does. ISO 8601 numbers days 1 to 7 starting on Monday and has no zero. The Unix convention and the Python %w directive give Sunday as 0 and Monday as 1, with the week running from Sunday. Excel without a second argument matches that. Whenever you meet a day_of_week field counting from zero, check the convention before translating it.
How do I find the weekday of a past date?
With the same calculator: put the past date in the field and the answer comes back, because the algorithm does not care whether the date has passed. By hand, take an anchor you are sure of, for example 1 January 2000, which was a Saturday, and count the days forward from it. A useful figure to remember: 9803 days separate 1 January 2000 from 3 November 2026, and 9803 mod 7 = 3, so a Saturday plus three days is a Tuesday, exactly as it should be.
Day of Week Calculator
Find what day of the week any date falls on, plus the day of year, ISO 8601 week number and whether the year is a leap year
Date Difference Calculator
Calculate the exact difference between two dates in multiple units
Date Formatter
Format dates in various formats — ISO 8601, RFC 2822, and custom formats
Unix Timestamp Converter
Convert Unix timestamps to readable dates and vice versa with live updates