Week numbers: how ISO 8601 week numbering actually works

ISO week numbers don't simply start at January 1. The ISO 8601 standard defines week 1 as the week containing the year's first Thursday, which means January 1 is...

ISO 8601 defines a week as starting on Monday and ending on Sunday. Week 1 of a year is defined as the week containing the year's first Thursday. This definition ensures that every week belongs unambiguously to exactly one year, and that years have either 52 or 53 weeks.

A practical consequence: if January 1 falls on a Friday, Saturday, or Sunday, that day belongs to week 52 or 53 of the previous year (because the week's Thursday falls in the previous year). January 1, 2021 was a Friday — it was in week 53 of 2020. January 4 (Monday, which contained Thursday January 7) was the first day of week 1 of 2021.

When a year has 53 weeks

Most years have 52 weeks. A year has 53 ISO weeks if and only if January 1 falls on Thursday (because that week's Thursday is in the new year, making week 1 start on December 28 or 29 of the previous year, and the 53rd week ends on December 31 or January 1), or if it's a leap year starting on Wednesday. In the 400-year Gregorian cycle, exactly 71 years have 53 ISO weeks (about 17.75% of years).

Years with 53 weeks: 2004, 2009, 2015, 2020, 2026, 2032... Businesses that operate on ISO week calendars — particularly in manufacturing, retail, and European payroll systems — need to account for 53-week years in their annual budgeting, since the extra week adds one additional payroll period.

Week numbering in different countries

ISO 8601 week numbering is widely used in Europe (especially Scandinavia and Germany) and in international business. The US and Canada typically use a simpler system where week 1 begins on January 1, and weeks start on Sunday. This means a date can be in different week numbers depending on which convention is used.

When working with week numbers across systems, always verify which standard is in use. Many programming languages have separate functions for ISO week numbers and simple week-of-year counts. In Python, `date.isocalendar()` returns the ISO week number, while `date.strftime('%W')` returns the US-style week number (Monday-based) and `%U` returns Sunday-based week numbers.