Week Number Calculator - Find ISO Week Number for Any Date
Calculate the ISO week number for any date. Find which week of the year a date falls in, with week start and end dates. Essential for project planning and scheduling.
Reviewed by the Calcura editorial team · Last reviewed
- Question
- How do I find the ISO week number for a date?
- Answer
- Under ISO 8601, week 1 is the week containing the first Thursday of the year, weeks start on Monday, and every year has either 52 or 53 ISO weeks. To find a date's week number, count weeks forward from week 1. Modern programming languages expose this directly — Python: date.isocalendar().week; JavaScript: use a library since built-in Date has no ISO week support.
▸Show formula & caveatsHide formula & caveats
- Formula
ISO 8601: week 1 = week containing the first Thursday of the year- Caveats
- ISO weeks use Monday-to-Sunday. US convention is often Sunday-to-Saturday — these differ by a day.
- Jan 1–3 and Dec 29–31 can belong to an adjacent ISO year; the week-year can differ from the calendar year.
- Some systems use 'week of year' with Jan 1 = week 1; that's not ISO 8601.
What This Calculator Does
This calculator returns the ISO 8601 week number for a date, along with the Monday-start and Sunday-end of that week. ISO weeks begin on Monday, and week 1 is defined as the week containing the first Thursday of the year. Most years have 52 ISO weeks; some have 53. The week-year can differ from the calendar year for late-December or early-January dates — e.g., 2026-01-01 may belong to ISO week 2025-W53 depending on the day of week. This calculator handles all those edge cases.
When To Use This Calculator
Enterprise reporting using ISO weeks
Many ERP systems (SAP, Oracle, SQL databases) tag records with 2026-W16 format. Converting a raw date to its ISO week helps cross-reference reports and filter rows.
Project sprint planning
Many teams tag sprints by ISO week ('Sprint W14–W15'). Knowing that 2026-04-06 is in W15 lets you schedule a 2-week sprint starting that Monday.
Payroll or fiscal week closes
Companies on ISO-week fiscal calendars close books at the end of a week. Knowing the week number and end date (Sunday) anchors the close.
Cross-year date verification
2026-01-01 falls in week ISO 2026-W01 (because 2026 starts on Thursday). But 2027-01-01 (Friday) falls in week 2026-W53 — useful to confirm when tagging records.
How It Works
The algorithm shifts the input date to the Thursday of its ISO week, then counts weeks from January 1 of that Thursday's year. Specifically: convert the date to UTC, compute weekday number with Monday=1..Sunday=7, add (4 − weekday) days to land on Thursday, then ISO week = ceil(((Thursday − Jan 1 of Thursday's year) / 86,400,000 + 1) / 7). The week's Monday is Thursday − 3 days; Sunday is Monday + 6. This correctly handles the 'week 1 in previous year' case, because the Thursday shift pulls early-January Fridays/Saturdays/Sundays into the prior year's week 52 or 53.
Formula
date → UTC
weekday = getUTCDay() || 7 (Mon=1 .. Sun=7)
Thursday = date + (4 − weekday) days
isoYear = Thursday.getUTCFullYear()
isoWeek = ceil(((Thursday − Jan 1 of isoYear) / 86,400,000 + 1) / 7)Real-World Example
Scenario
A finance team needs to know which ISO week 2026-12-31 falls in for a fiscal year-end close that uses ISO week numbering.
Calculation
2026-12-31 is a Thursday (ISO weekday 4) Thursday shift: 2026-12-31 + (4 − 4) = 2026-12-31 Thursday's year: 2026 Weeks from Jan 1 2026: ceil(((2026-12-31 − 2026-01-01) / 86,400,000 + 1) / 7) = 53 Monday of week: 2026-12-28; Sunday: 2027-01-03
Result
2026-W53, running Monday 2026-12-28 through Sunday 2027-01-03. 2026 is a 53-week ISO year, so the fiscal close lands in week 53, which extends three days into calendar year 2027. Flag this to accounting so they don't accidentally assume a 52-week year.
Common Mistakes to Avoid
Mistake: Assuming 52 weeks every year
Solution: ISO years have 53 weeks roughly every 5–6 years (when Jan 1 falls on Thursday, or on Wednesday in a leap year). 2004, 2009, 2015, 2020, 2026 are 53-week ISO years.
Mistake: Confusing the calendar year with the ISO year
Solution: 2026-01-01 may belong to ISO week 2025-W53 if 2026 starts on Friday–Sunday. The week-year may differ from the calendar year — check both fields.
Mistake: Mixing ISO weeks with US-style weeks
Solution: Many US calendar apps number weeks starting Sunday. ISO starts Monday. If you're importing data from one system to another, confirm the convention to avoid off-by-one-week errors.
Mistake: Relying on ISOWEEKNUM for custom fiscal calendars
Solution: Retail 4-4-5 calendars, broadcast calendars, and some fiscal calendars don't match ISO weeks. Use a custom-calendar function, not this tool.
Week Number vs. Related Calculators
Date to Day Calculator
Returns the ISO week number alongside day-of-week and day-of-year — use when you want all three lookups in one result.
Workdays Calculator
For counting weekdays between dates within or across ISO weeks.
Date Difference Calculator
For the span between two dates in days/weeks — uses raw 7-day weeks rather than ISO week numbering.
When This Isn't the Right Tool
US Sunday-start week numbering
Use instead: Some US payroll, banking, and consumer apps use a Sunday-start week 1 that begins Jan 1. For those, use a dedicated US-calendar function — this calculator returns ISO only.
Retail 4-4-5 or NRF fiscal weeks
Use instead: Retailers use 4-4-5 or 4-5-4 accounting calendars (13 periods of 4 or 5 weeks each). These do not map to ISO week numbers. Use an NRF calendar tool.
Broadcast calendars
Use instead: TV broadcast weeks start Monday but use a slightly different year-start rule. Use a broadcast-calendar function if advertising or Nielsen data is involved.
Lunar or religious calendar weeks
Use instead: Hebrew, Islamic, and other religious calendars define weeks differently. ISO numbering applies only to the Gregorian calendar.
How to Verify This Calculation
In Excel, =ISOWEEKNUM(date) returns the ISO week. In Python, date.isocalendar() returns (year, week, weekday). In PostgreSQL, EXTRACT(WEEK FROM date) returns ISO week. Agreement confirms the result.
Sources
- ISO 8601 — Date and Time Format — Defines ISO week numbers: weeks start Monday; week 1 contains the first Thursday of the year.
- Wikipedia — ISO Week Date — Clear, practical reference for ISO week definitions, including 53-week years and year-boundary edge cases.
- NIST — Time and Frequency Division — NIST reference for civil time and the Gregorian calendar underlying ISO week calculations.
Reviewed by the Calcura editorial team · Last reviewed