What is a week number calculator?
A week number calculator converts a calendar date into the ordinal week it belongs to within a year — Week 1 through Week 52 or 53 — and does the reverse, turning a week number back into an exact date range. It exists because weeks and months do not divide evenly: a year is 365 or 366 days, which is 52 weeks plus one or two extra days. That leftover is why week numbers drift against calendar dates, why some years have 53 weeks, and why a date in early January can officially belong to the previous year’s final week.
People reach for a week number calculator for a specific reason: they are working in a system that counts in weeks rather than months. Agile teams plan in sprints measured in weeks. Payroll and timesheet systems often run on weekly cycles. ISO-certified quality and logistics processes use week numbers in batch codes and delivery schedules. Schools count teaching weeks. European business calendars print week numbers down the side of every month. In all of those contexts “W43” is a more precise reference than “late October” — but only if you can translate it back to real dates quickly and correctly.
This calculator handles both directions and shows its work. The live panel at the top answers “what week is it?” the moment the page loads. Below that, you can select any date and see it in four different numbering systems simultaneously, browse a month calendar that shows the week number beside every row, count the weeks between two dates, and open a full year overview with all 52 or 53 weeks listed and clickable.
💡 One-line answer. Under ISO 8601, Thursday 22 October 2026 is 2026-W43-4 — day 4 of week 43 of 2026. The week ran from Monday 19 October to Sunday 25 October 2026.
How to use the calculator
The tool has four modes, switched with the tabs directly under the live panel. They share a single selected date, so switching mode never loses your place.
- Date → Week. Pick a date with the date field, the previous/next week arrows, or by clicking any day in the month calendar. The week number, week code, exact date range and eight supporting statistics update instantly.
- Week → Date. Enter a year and a week number. The tool tells you the exact start and end dates, shows each of the seven days, and warns you if the week does not exist in that year (for example week 53 in a 52-week year).
- Weeks Between. Enter two dates to get the complete weeks, leftover days, total days and weekday count. Preset buttons fill in this month, this quarter, this year or the next four weeks.
- Year Overview. Choose a year to see every week as a clickable block plus a sortable table with start date, end date, quarter and a note for weeks that straddle the New Year. The table downloads as CSV.
Every result has its own copy button, and the Copy summary button in the card header captures the whole picture in one labelled block you can paste into a report, a ticket or a message.
ISO 8601 week numbering, precisely
ISO 8601 is the international standard for week numbering, and it is the default in this tool because it is what most of the world and most software uses. It rests on two rules, and everything else follows from them.
Rule 1 — weeks start on Monday. Monday is day 1 and Sunday is day 7. A “week” is always a complete Monday-to-Sunday block, never a partial one.
Rule 2 — week 1 is the week containing the year’s first Thursday. Equivalently, week 1 is the week that contains 4 January. Equivalently again, week 1 is the first week with at least four of its days in the new year. All three statements describe exactly the same week, and the tool uses the Thursday formulation because it is the easiest to compute with.
Those two rules produce one consequence that catches almost everybody out: the ISO week-year is not always the calendar year. Because a week belongs to the year that owns its Thursday, a week that straddles New Year is assigned in its entirety to whichever year holds the Thursday. If the Thursday falls in the new year, the whole week — including its December days — is week 1 of the new year. If the Thursday falls in the old year, the whole week — including its January days — is the last week of the old year.
Real year-boundary cases
| Calendar date | Day | ISO week date | Why |
|---|---|---|---|
| 2024-12-30 | Monday | 2025-W01-1 | Thursday 2 Jan 2025 is in the new year → the whole week is week 1 of 2025. |
| 2025-01-01 | Wednesday | 2025-W01-3 | 1 Jan is a Wednesday, so it sits inside week 1 of its own year. |
| 2005-01-01 | Saturday | 2004-W53-6 | Its Thursday was 30 Dec 2004 → the week belongs to 2004, which had 53 weeks. |
| 2021-01-01 | Friday | 2020-W53-5 | Its Thursday was 31 Dec 2020 → week 53 of 2020, not week 1 of 2021. |
| 2025-12-29 | Monday | 2026-W01-1 | Thursday 1 Jan 2026 is in the new year, so this Monday opens week 1 of 2026. |
| 2026-12-28 | Monday | 2026-W53-1 | 2026 has 53 weeks; this final week runs into 3 Jan 2027 but stays in ISO year 2026. |
Between 4 January and 28 December the ISO week-year and the calendar year always agree. Every disagreement happens in a window of at most three days at the start of January or at most three days at the end of December.
The four numbering systems compared
There is no single global answer to “what week is it?” — it depends on which convention you follow. This calculator shows all four at once so you can see exactly where they diverge.
| System | Week starts | Week 1 is… | Max weeks | Typical use |
|---|---|---|---|---|
| ISO 8601 | Monday | The week containing the year’s first Thursday (equivalently, containing 4 January) | 53 | Europe, international business, logistics, most programming languages and ISO-certified systems |
| US / Canada | Sunday | The week containing 1 January — so week 1 is often a partial week of 1–6 days | 53 | North American payroll, retail calendars, Excel’s default WEEKNUM |
| Simple Monday | Monday | The week containing 1 January, with Monday as the first day | 53 | Casual planning and some regional calendars where Monday start matters but the Thursday rule does not |
| Middle East | Saturday | The week containing 1 January, with Saturday as the first day | 53 | Much of the Middle East, where the working week begins on Sunday and Saturday opens the calendar week |
Notice the asymmetry: the simple systems anchor week 1 to January 1, which means their week 1 can be as short as a single day. ISO avoids that by anchoring to Thursday, which guarantees week 1 always contains at least four days of the new year. That is the whole design rationale — ISO wanted every week to have a clear majority in one year.
⚠ Week 54 exists — but not in ISO. ISO 8601 caps the week number at 53. Some simple Sunday-start or Monday-start systems, however, can produce a 54th partial week in rare years. A leap year beginning on a Saturday, counted with Sunday-start weeks, yields 54 partial weeks. If you see week 54 anywhere, you are looking at a simple system, not ISO.
Why ISO and US weeks disagree near New Year
Take 1 January 2026, a Thursday. Under ISO, Thursday 1 January sits in week 1 because week 1 is defined by the first Thursday — so it is 2026-W01-4. Under US numbering, week 1 begins on the Sunday on or before 1 January. That Sunday was 28 December 2025, so 1 January 2026 is day 5 of week 1 — also week 1, but with a different date range.
Now take 1 January 2027, a Friday. Under ISO, its Thursday is 31 December 2026, so the entire week belongs to ISO year 2026 — 1 January 2027 is 2026-W53-5. Under US numbering, 1 January 2027 opens week 1 of 2027 directly. The two systems now disagree by 52 weeks in the year field, which is exactly the kind of mismatch that breaks a report when someone mixes an ISO week number with a calendar year label.
📌 Practical rule. Whenever you store a week number, store the week-year alongside it — and store them as a pair, never separately. “W53 of 2026” is unambiguous; “week 53, 2027” is wrong, because 2027 has only 52 ISO weeks.
Which years have 53 weeks?
An ISO year has 53 weeks exactly when 1 January falls on a Thursday, or when the year is a leap year and 1 January falls on a Wednesday. Both conditions guarantee the year contains 53 Thursdays, and since each ISO week owns exactly one Thursday, 53 Thursdays means 53 weeks.
Within the 400-year Gregorian cycle there are 71 long years — 27 leap years and 44 common years. That averages out to one 53-week year roughly every 5.6 years. Between 2000 and 2050 the long years are:
| 53-week years (ISO) | Gap from previous | Last week runs |
|---|---|---|
| 2004 | +6 | 27 Dec 2004 – 2 Jan 2005 |
| 2009 | +5 | 28 Dec 2009 – 3 Jan 2010 |
| 2015 | +6 | 28 Dec 2015 – 3 Jan 2016 |
| 2020 | +5 | 28 Dec 2020 – 3 Jan 2021 |
| 2026 | +6 | 28 Dec 2026 – 3 Jan 2027 |
| 2032 | +6 | 27 Dec 2032 – 2 Jan 2033 |
| 2037 | +5 | 28 Dec 2037 – 3 Jan 2038 |
| 2043 | +6 | 28 Dec 2043 – 3 Jan 2044 |
| 2048 | +5 | 28 Dec 2048 – 3 Jan 2049 |
2025 is a 52-week year; 2026 is a 53-week year. That difference matters for payroll: an employer running weekly pay periods has 53 paydays in a 53-week year, which is one reason some organisations align their fiscal calendar to a 52/53-week structure rather than to months.
How to calculate the week number yourself
There is a well-known closed-form formula for the ISO week number based on the day of the year and the ISO weekday number. Let d be the day of the year (1–366) and w be the ISO weekday (Monday = 1 … Sunday = 7):
week = ⌊(d − w + 10) ÷ 7⌋
If the result is less than 1, the date belongs to the last week of the previous year. If it exceeds the number of weeks in its ISO year, it belongs to week 1 of the following year. That single edge case is why so many home-grown implementations get the New Year boundaries wrong.
Worked example — 22 October 2026. It is day 295 of 2026 (a common year). 22 October 2026 is a Thursday, so w = 4. Then (295 − 4 + 10) ÷ 7 = 301 ÷ 7 = 43. Therefore the week number is 43. ✓
Worked example — 1 January 2021. It is day 1 of 2021 and a Friday, so w = 5. Then (1 − 5 + 10) ÷ 7 = 6 ÷ 7 = 0.857, floored to 0. A result of 0 means “the last week of the previous year”, which resolves to 2020-W53. ✓
Getting the week number in Excel, Sheets, Python and SQL
Week numbers are one of those things every platform implements slightly differently, which is a frequent source of “why does this number not match?” bug reports. Here is the accurate mapping for the tools you are most likely to use.
| Platform | ISO 8601 week | US / Sunday-start week |
|---|---|---|
| Excel | ISOWEEKNUM(A1) or WEEKNUM(A1,21) | WEEKNUM(A1) (default return type 1) |
| Google Sheets | ISOWEEKNUM(A1) | WEEKNUM(A1,1) |
| Python | date.isocalendar() → (iso_year, iso_week, iso_weekday) | date.strftime('%U') (Sunday start) |
| C strftime | %V (ISO week, 01–53) | %U (Sunday start) or %W (Monday start) |
| MySQL | WEEK(d, 3) | WEEK(d, 0) |
| PostgreSQL | EXTRACT(WEEK FROM d) | — (ISO only) |
| SQL Server | DATEPART(ISO_WEEK, d) | DATEPART(WEEK, d) |
| Oracle | TO_CHAR(d, 'IW') | TO_CHAR(d, 'WW') |
In JavaScript there is no built-in week-number function on Date, which is why this calculator implements the algorithm directly. A correct minimal implementation shifts the date to the Thursday of its week and counts weeks from 1 January of that Thursday’s year:
The trap to avoid: computing week numbers in local time and then comparing them to a UTC-based server value. Around midnight and around daylight-saving transitions the two can disagree by a day, which can shift the week number at a boundary. This tool converts every date to a whole-day index first, so timezone offsets and DST changes cannot affect the result.
Counting weeks between two dates
The simplest correct method is to count days and divide by seven. Take the absolute difference between the two dates in days, then the number of complete weeks is the integer part of that difference divided by seven, and the remainder is the leftover days. Eighteen days is 2 weeks and 4 days.
That is the right answer when you want a duration. It is the wrong answer when you want the number of calendar-week boundaries crossed. If you are counting “how many payroll weeks does this project span”, subtract the two ISO week numbers instead — but remember to add 52 or 53 for each year boundary in between, and to use the ISO week-year rather than the calendar year when subtracting.
The Weeks Between mode gives you the duration answer plus the exact weekday count, so a project spanning three calendar weeks but containing only eleven weekdays is reported correctly.
Where week numbers actually get used
- Agile and sprint planning. A sprint is a fixed number of weeks; week numbers give every sprint an unambiguous name. “Sprint starting W43” is clearer than “the sprint after next”.
- Payroll and timesheets. Weekly pay periods are numbered, and a 53-week year adds an extra payday that must be budgeted for.
- Manufacturing and logistics. Batch codes, production schedules and delivery windows are frequently expressed as week numbers, especially in automotive and food supply chains where date precision matters more than month labels.
- ISO management systems. Quality, environmental and safety audits are commonly scheduled by week number because it avoids month-length ambiguity.
- Education. Teaching weeks, term weeks and academic timetables are counted in weeks, not dates — “week 6 of term” survives a timetable change that a date would not.
- Fiscal and 4-4-5 calendars. Retail and finance often run 52/53-week years composed of 13-week quarters, so week numbers are the primary reporting axis.
- Content and marketing calendars. Editorial plans and campaign schedules are usually built week by week, and week numbers make them easy to sort.
- Software and data pipelines. Weekly aggregations in analytics, cohort tables and reporting jobs all depend on getting the week number — and the week-year — right.
Common mistakes people make with week numbers
- Assuming week 1 always starts on 1 January. Only the simple systems do that. Under ISO, week 1 can begin as early as 29 December of the previous year or as late as 4 January.
- Pairing a week number with the calendar year. The most damaging error in reporting. A date on 31 December 2026 may be in ISO week 53 of 2026, while 1 January 2027 may also be in ISO week 53 of 2026. Store the ISO week-year, not the calendar year.
- Assuming every year has 52 weeks. Roughly one year in five or six has 53. Code that hard-codes 52 will silently mis-handle those years.
- Mixing Excel’s WEEKNUM with ISO week numbers. Plain
WEEKNUMuses Sunday start and a January 1 anchor. UseISOWEEKNUMwhen you need ISO. - Computing in local time and comparing with UTC. Timezone and DST shifts around midnight can move a date across a week boundary.
- Confusing “weeks between” with “week numbers between”. A 20-day span is 2 weeks and 6 days as a duration, but it may cross three calendar-week boundaries.
- Expecting week 53 in every 53-week-looking year. Week 53 exists only when the year has 53 Thursdays. A leap year starting on a Thursday has 53 weeks, but a common year starting on a Thursday also does — the condition is about the weekday of 1 January, not about leap status alone.
Privacy
Every calculation runs locally in your browser. The tool converts dates to integer day counts and does the arithmetic in plain JavaScript — no dates are transmitted, no account is required and no network request is made after the page loads. The share button writes the current date, mode and numbering system into the URL hash on your own device so a link can reproduce the view; nothing is sent to a server.
Limitations
- Only the Gregorian calendar is supported. Week numbering for the Julian, Hebrew, Islamic, Chinese or other calendars is out of scope.
- Week numbers are counted within a single calendar year’s week system. Fiscal weeks that start mid-year, and 4-4-5 retail calendars with a custom year start, need their own configuration and are not modelled here.
- Dates before 1582 are computed with the proleptic Gregorian calendar — modern rules applied backwards. Historians often use the Julian calendar for earlier dates.
- Weekday counts in the Weeks Between mode assume a Monday-to-Friday working week and ignore public holidays, regional weekends and shift patterns.
- The Middle East option uses a Saturday week start with a January 1 anchor. Some Gulf countries operate different official weekend patterns and fiscal week definitions, so treat that option as a convention rather than an authority.
- Week numbers are not a substitute for an unambiguous full date. Whenever a week number will be stored or transmitted, include the week-year and the numbering system.
Frequently asked questions
What week number is it today?
The live panel at the top of the tool shows today’s ISO week number, its week code and its Monday-to-Sunday date range, updated from your device’s current date. ISO 8601 is the international default; switch the numbering system to see today in US, Simple Monday or Middle East numbering as well.
How is the week number calculated?
For ISO 8601, find the Thursday of the week the date belongs to, take that Thursday’s calendar year as the ISO week-year, then count the weeks elapsed since 1 January of that year. Using ordinal dates: week = floor((dayOfYear − ISOweekday + 10) / 7). For US numbering, week 1 is the week containing 1 January and weeks start on Sunday: week = floor((dayOfYear + weekdayOfJan1 − 1) / 7) + 1.
Why is the ISO week-year different from the calendar year?
Because a week belongs to the year that owns its Thursday. If a week straddles New Year and its Thursday falls in the new year, the whole week — December days included — belongs to the new ISO year. Monday 30 December 2024 is therefore 2025-W01-1, not 2024-W53-1.
How many weeks are in a year?
An ISO year has either 52 or 53 weeks. It has 53 when 1 January is a Thursday, or when 1 January is a Wednesday in a leap year. Recent long years are 2004, 2009, 2015, 2020 and 2026; the next are 2032, 2037, 2043 and 2048.
What is the difference between ISO and US week numbers?
ISO 8601 starts weeks on Monday and defines week 1 as the week containing the year’s first Thursday. The US convention starts weeks on Sunday and calls the week containing 1 January week 1, which can be a partial week. The two agree most of the year and diverge around New Year.
How do I convert a week number back to a date?
For ISO, 4 January is always in week 1. Step back to the Monday of that week, then add (week − 1) × 7 days. The Sunday is six days later. The Week → Date mode does this automatically and validates that the week exists in that year.
How many weeks are between two dates?
Count the days between the dates and divide by seven. The whole-number part is complete weeks and the remainder is leftover days. For example, 6 January to 24 January is 18 days — 2 weeks and 4 days. To count calendar-week boundaries crossed instead, subtract the week numbers and account for any year boundary.
What is week 53 and does every year have one?
Week 53 exists only in years containing 53 Thursdays: when 1 January is a Thursday, or when 1 January is a Wednesday in a leap year. When it exists it usually straddles New Year — 2026-W53 runs from Monday 28 December 2026 to Sunday 3 January 2027.
What does the week code 2026-W43 mean?
It is ISO 8601 week-date notation in the form YYYY-Www. 2026-W43 is week 43 of ISO year 2026. Adding a weekday digit gives a full date: 2026-W43-4 is Thursday of that week, which is 22 October 2026.
Why does 1 January sometimes belong to the previous year’s week 52 or 53?
If 1 January falls on a Friday, Saturday or Sunday, that week’s Thursday is in the previous calendar year, so the whole week is numbered as part of the previous ISO year. 1 January 2021, a Friday, is 2020-W53-5 for exactly this reason.
How do I get the ISO week number in Excel or Google Sheets?
Use ISOWEEKNUM(date) in both. In Excel you can also use WEEKNUM(date, 21). The plain WEEKNUM(date) uses the US convention and will disagree with ISO around New Year.
Can week 54 ever exist?
Not in ISO 8601, which caps the week number at 53. Some simple Sunday-start or Monday-start systems that anchor week 1 to 1 January can produce a 54th partial week in rare years, such as a leap year beginning on a Saturday under Sunday-start numbering. The tool shows the correct maximum for the selected system.
Does the calculator handle leap years?
Yes. Leap years follow the Gregorian rules — divisible by 4, except centuries not divisible by 400. 29 February is a valid date, day-of-year counts include it, and the 53-week rule correctly accounts for leap years starting on a Wednesday.
Which countries use ISO week numbers?
ISO week numbering is the everyday standard across most of Europe, including Germany, France, the Netherlands, the Nordics, Switzerland, Austria and Poland, and in international business, logistics, ISO-certified management systems and most programming languages. The United States, Canada and a few other regions more commonly use Sunday-start numbering anchored to 1 January.
Is my data uploaded anywhere?
No. Every calculation runs locally in your browser using JavaScript date arithmetic. Dates are never sent to a server, there is no account, and no network request is made after the page loads. The optional share button writes state into the URL hash on your own device only.
Related tools on AIToolsPros
Sources & methodology
- ISO 8601-1:2019 — Date and time — Representations for information interchange — Part 1: Basic rules. Defines the week-date system used as the default here.
- ISO 8601-2:2019 — Part 2: Extensions. Covers the extended
YYYY-Www-Dweek-date notation. - Wikipedia — ISO week date. Reference for the first-Thursday rule, the equivalences with 4 January and the 53-week-year conditions, and the boundary behaviour of the ISO week-year.
- POSIX / C standard
strftimespecification — definitions of%V(ISO week),%U(Sunday start) and%W(Monday start). - Microsoft Excel documentation —
ISOWEEKNUMandWEEKNUMreturn-type behaviour. - PostgreSQL, MySQL, SQL Server and Oracle date-function documentation —
EXTRACT(WEEK),WEEK(d,3),DATEPART(ISO_WEEK),TO_CHAR(d,'IW').