What this calculator does
Week numbers are used for payroll, production schedules, school calendars and project plans. There are two common ways to count them, and they don't always agree. This calculator gives both for any date from the year 1 to 9999, and does the reverse: it lists the dates in a given week.
How ISO 8601 weeks work
- Weeks start on Monday.
- Week 1 is the week that contains the year's first Thursday. That's the same as the week containing January 4.
- A year has 52 or 53 weeks, and the days at the start or end of January and December can belong to the neighboring year's week.
ISO week-year = that Thursday's year
Week number = ⌊(day of the year of that Thursday − 1) ÷ 7⌋ + 1
An ISO week date is written YYYY-Www-D, with D from 1 (Monday) to 7 (Sunday). Excel's ISOWEEKNUM and WEEKNUM with return type 21 use this system.
How US-style weeks work
Many US calendars and Excel's default WEEKNUM (return type 1) use a simpler rule: weeks start on Sunday, and the week containing January 1 is week 1. The first and last weeks can be shorter than 7 days, and a year has 53 weeks, or 54 in a leap year that starts on a Saturday.
Worked example: January 1, 2027
January 1, 2027 is a Friday. Its Monday–Sunday week runs from December 28, 2026 to January 3, 2027, and that week's Thursday is December 31, 2026, day 365 of 2026. So it's ISO week ⌊364 ÷ 7⌋ + 1 = 53 of 2026, written 2026-W53-5. In the US system it's simply week 1 of 2027.
Year-boundary cases
| Date | ISO week | US week |
|---|---|---|
| Mon, Dec 30, 2024 | 2025-W01 | Week 53 of 2024 |
| Thu, Dec 31, 2020 | 2020-W53 | Week 53 of 2020 |
| Sun, Jan 3, 2021 | 2020-W53 | Week 2 of 2021 |
| Thu, Jan 1, 2026 | 2026-W01 | Week 1 of 2026 |
| Fri, Jan 1, 2027 | 2026-W53 | Week 1 of 2027 |
Limitations
- Some companies use their own week numbering (for example, a fiscal year starting in October, or weeks starting on Saturday). Check which rule your organization uses.
- Excel's WEEKNUM with return type 2 starts weeks on Monday but still puts January 1 in week 1, so it can differ from ISO weeks.
- Dates use the Gregorian calendar extended backward before 1582.
Sources
- Microsoft: WEEKNUM function (System 1 and System 2 week numbering)
- IETF RFC 3339: Date and Time on the Internet (ISO 8601 profile, week-date syntax, four-digit years)