ISO Week Number

December 31, 2019 belongs to week 1 of 2020. That is not a bug in whichever system told you so — it is what ISO 8601 says, and it is the single most common reason two reports covering the same period refuse to reconcile.

ISO Week Number Calculator — Week of the Year, Both Ways, With the Year-End TrapsBuildFigure

The rule, in one sentence

Under ISO 8601 a week runs Monday to Sunday, and week 1 is the week containing the first Thursday of January. That is equivalent to two other formulations you will see: the week containing January 4, and the first week with at least four of its days in the new year.

Everything awkward about ISO weeks follows from that one rule. Because a week is never split between two numbering years, up to three days at either end of a calendar year get pulled across the boundary. December 29, 30 and 31 can belong to week 1 of the following year; January 1, 2 and 3 can belong to week 52 or 53 of the previous one.

This is why a week number alone is not an identifier. "Week 1" is ambiguous; 2020-W01 is not. The ISO year travels with the week number, and dropping it is the most common way two teams end up comparing different seven-day windows while believing they are looking at the same one.

Fifty-three-week years

A calendar year holds 52 weeks and one or two spare days, so the spare days accumulate and every five or six years an ISO year has 53 weeks. It happens when January 1 falls on a Thursday, or when a leap year starts on a Wednesday — both of which put enough days of the new year into that first week to claim it.

Anything built on an assumption of 52 breaks in those years: a rota that repeats on a 52-week cycle, a report template with 52 columns, a payroll calendar that pays 52 times. The whole-year mode here lists every week of a year with its Monday and Sunday, and says which kind of year it is, so a 53-week year can be caught while the schedule is still on paper.

ISO against the convention most United States tools use by default

The other widespread scheme starts weeks on Sunday and calls the week containing January 1 week 1, however few days of it fall in the new year. Under that scheme January 1 is always in week 1 and there is no separate week-numbering year, so a date always keeps its own calendar year.

DateISO 8601Sunday-start, Jan 1 in week 1
Dec 31, 20192020-W01Week 53 of 2019
Jan 1, 20212020-W53Week 1 of 2021
Jan 1, 20262026-W01Week 1 of 2026

Neither convention is more correct than the other; they answer slightly different questions. What causes trouble is that different tools default to different ones and none of them label the output. Spreadsheet week functions, database extract functions and reporting tools each have their own default, and several offer both under names that do not make the difference obvious. If two systems must agree, fix the convention in writing and check a year-boundary date in both before trusting the pipeline.

Dates in, dates out, no string parsing

All the arithmetic here runs on UTC day numbers rather than on parsed date strings. That is deliberate: new Date('2026-12-31') is read as UTC midnight, which in every United States time zone is the evening of December 30 in local time, and a week-number tool built on that is off by one day for anybody west of Greenwich for part of the day. Working in whole UTC days removes the possibility entirely, and no time zone or daylight saving rule can affect the answer.

The week-to-dates direction refuses a week number the year does not have rather than silently rolling it into the next year, and the whole-year list marks the weeks that straddle December 31. If you need a series of dates rather than a week index — every other Thursday, say — the date list generator produces those, and for spans measured in days rather than weeks the date calculator is the shorter route.

Questions people ask

Why does my date show a different year than the one I typed?

Because ISO weeks never span two numbering years. A week containing days from both December and January belongs entirely to whichever year holds the majority — formally, to the year containing that week\u2019s Thursday. So December 31, 2019 is in week 1 of ISO year 2020. The output flags it whenever the ISO year differs from the calendar year of the date you entered.

How can a year have 53 weeks?

A common year is 52 weeks and one day, a leap year 52 weeks and two days. Those spare days accumulate until a year has enough of them at the start to claim an extra week. In practice it happens when January 1 is a Thursday, or when a leap year begins on a Wednesday, which works out to roughly every five or six years.

Which convention does my spreadsheet use?

It depends on the tool and often on which function you call, since several ship both an ISO version and a legacy Sunday-start version. Test it on a year-boundary date such as January 1 or December 31 rather than on a date in June, because the two conventions agree for most of the year and only diverge where it matters.

Do weeks always start on Monday?

Under ISO 8601, yes, and Monday is day 1 of the week. The alternative convention shown alongside starts on Sunday. Both appear in ordinary use, which is precisely why a week number should never travel without a note saying which scheme produced it.

Is a week number the same as a fiscal or broadcast week?

No. Retail and broadcast calendars use their own period definitions with their own year-start rules, and organisations set their own fiscal calendars. Those are policy choices, not standards, so this page does not attempt to guess them — it computes only ISO 8601 and the common Sunday-start convention.

Related