Article — Week Number Calculator
Week numbers explained: ISO 8601, the US system, and the 53-week year
There are two common ways to number weeks. ISO 8601, the international standard, puts Monday at the start and defines week 1 as the week containing the year's first Thursday. The US system puts Sunday at the start and says week 1 always contains January 1. Most years have 52 weeks; under ISO, 71 years out of every 400 have 53. The calculator above runs the math in both systems, and also counts weeks between any two dates.
If you only want today's week number, pick "Week number" mode, leave the date at today, and switch between ISO and US to see how the two answers differ. For project planning, payroll, retail, or pregnancy tracking, the "Weeks between dates" mode gives total weeks, decimal weeks, days, and approximate months in a single pass.
What week of the year is it?
The answer depends on both the date and which numbering system you use. In ISO 8601 the year runs from the Monday of week 1 to the Sunday of week 52 (or week 53 in some years). In the US system the year matches the calendar - week 1 always contains January 1, and the final week ends on December 31 even if that means the last week is only 1 day long.
On a Tuesday in mid-May 2026, ISO says "2026-W21-2" (week 21, day 2). The US system says "week 20" - one off, because the US calendar already passed January 1 into a partial first week, while ISO started counting from a complete Monday-to-Sunday week.
ISO 8601 was first published in 1988, drawing on European and military date conventions that go back to the early 20th century. The standard is now used in SQL date literals, JSON Schema, RFC 3339, and the date-time fields of HTTP headers. It is the closest thing the world has to a universal date format - and the week-numbering rules are part of the same document.
ISO 8601 versus the US system
The two systems differ on two things: which day starts the week, and how week 1 is identified.
ISO 8601 is the standard for any international software, scientific data, business reporting across borders, and modern programming languages. The US system is what you get if you do nothing in Excel and what most American payroll systems use.
- ISO 8601 = Monday-start, first Thursday rule, format YYYY-Www
- US = Sunday-start, week 1 contains January 1, partial weeks allowed
- Middle East variant = Saturday-start (Sunday is the start of the work week)
- Excel default = US (WEEKNUM with no system argument)
- ISO in Excel = ISOWEEKNUM() or WEEKNUM(date, 21)
How ISO week 1 is determined
The simplest rule: ISO week 1 is the week containing the first Thursday of the year. Equivalently, it is the week containing January 4. Equivalently again, it is the first week that has at least 4 days in the new year. All three statements identify the same week.
The choice of Thursday is mathematically convenient. A week's "year" under ISO is the year of its Thursday. Since Thursday is the middle day of a Monday-to-Sunday week (day 4 of 7), every Thursday in the Gregorian year unambiguously belongs to one and only one ISO year. Counting Thursdays in a year tells you whether the year has 52 or 53 ISO weeks: years with 53 Thursdays are 53-week years.
Week containing the first Thursday = Thursday ruleWeek containing January 4 = Jan 4 ruleFirst week with ≥4 days in the new year = Majority ruleWeek of the year-start Monday closest to Jan 1 = Closest Monday ruleWhy some years have 53 weeks
The arithmetic is simple. 52 weeks of 7 days is 364 days, but a Gregorian calendar year is 365 (or 366 if it is a leap year). The leftover 1 or 2 days accumulate. After about 5 or 6 years, those leftovers add up to enough that the next year contains 53 Thursdays, which under ISO 8601 means it has 53 weeks.
In a 400-year Gregorian cycle there are exactly 71 ISO years with 53 weeks and 329 with 52. The ratio matches the formula: 400 normal-week years times 364 days = 145,600 days, plus 71 extra weeks times 7 days = 497 days, giving 146,097 days - the exact length of the Gregorian 400-year cycle (with 97 leap days). The mathematics ties out to the day.
Retail and finance software needs to know about 53-week years. Stores running a "52 weeks of sales" report break when they hit one - they suddenly have an extra week to allocate. The 4-5-4 retail calendar used by NRF members handles this by inserting a 53rd week every 5-6 years to keep quarterly periods aligned with the Gregorian year.
The January 1 puzzle
Under ISO 8601, January 1 is not always in week 1. If January 1 falls on a Friday, Saturday, or Sunday, it belongs to the last week of the previous ISO year - week 52 or 53. This is a regular source of confusion and bugs.
The "year" part of an ISO week date is not always the calendar year. January 1, 2023 was a Sunday - it belongs to ISO week 52 of 2022. The full ISO date is 2022-W52-7. Software that parses ISO weeks while assuming the year matches the calendar year will get this wrong about three years out of seven. Always extract the year, week, and day-of-week from the ISO date as a unit.
The reverse case is also possible. If January 1 falls on a Monday, Tuesday, Wednesday, or Thursday, it is the start of ISO week 1 of the new year and matches the calendar year. So in any given year the ISO and calendar years agree at the boundaries about four times out of seven.
Excel and the WEEKNUM trap
Excel's WEEKNUM function has two return modes. Mode 1 (the default) is the US system - Sunday-start, week 1 contains January 1. Mode 2 is also US but starts the week on Monday. Mode 21 is the true ISO 8601 system. For ISO output, the cleaner option is the dedicated ISOWEEKNUM(date) function, available since Excel 2013.
The default behaviour is the source of countless silent errors in international spreadsheets. A European payroll spreadsheet imported into a US-based Excel install will quietly shift its week numbers by one. Project plans built around "week 1 of January" will not line up between a US and a European team. The fix is always the same: use ISOWEEKNUM() or specify mode 21 in WEEKNUM().
Weeks between two dates
For "how many weeks until" or "how many weeks since" calculations, the math is just total days divided by 7. The whole-number part is full weeks; the remainder is extra days. For pregnancy tracking, project planning, and pet vaccination schedules, decimal weeks - days divided by 7 with no rounding - is usually the most useful form.
Common reference points: a typical full-term pregnancy is 40 weeks (280 days) from the last menstrual period. A standard quarter is 13 weeks (91 days). A US fiscal year often runs 52 weeks (364 days) with a 53rd week inserted every five or six years. A typical mortgage is 360 monthly payments, equivalent to 1,560 weeks at 4.33 weeks per month.
The 4-5-4 retail calendar
Walmart, Target, Macy's, and most large US retailers do not use the standard Gregorian calendar internally. They use a 4-5-4 calendar: each quarter contains 13 weeks split as 4 weeks, 5 weeks, 4 weeks. Every "month" starts on a Sunday and ends on a Saturday. The whole year is exactly 52 or 53 retail weeks.
The point is to make year-over-year comparisons clean. February 2025 and February 2026 in a Gregorian calendar contain different numbers of weekends and may include different holidays - so sales numbers are not directly comparable. February in a 4-5-4 calendar is always the same 4 or 5 weeks, starting on a Sunday, ending on a Saturday. Two equivalent periods, week for week, day-of-week for day-of-week. The National Retail Federation publishes the 4-5-4 calendar template that hundreds of US chains use. Every five or six years it adds a 53rd week to absorb the Gregorian drift.