Skip to content
πŸ› οΈToolsShed

ISO Week Number

Find the ISO 8601 week number for any date.

About this tool

The ISO 8601 Week Number is the international standard way to identify weeks in a year, used widely in business, logistics, healthcare, and computing. Unlike regional week numbering systems that vary by country (such as the US system starting on Sunday), ISO week numbering is consistent globally: weeks always start on Monday and are numbered based on which week contains the year's first Thursday. This standardization makes ISO weeks essential for global teams that need to coordinate across time zones and regions.

This tool lets you find the ISO week number for any date instantly. Simply select or type a date, and you'll see the corresponding ISO week and year, the day of the week, day of year, and quarter. You can navigate backward and forward through weeks using the provided buttons, or click on specific dates in the embedded calendar to jump to a different week. The visual calendar display helps you understand where your selected date falls within its week and makes it easy to identify the Monday-to-Sunday boundaries of the ISO week.

ISO week numbering is particularly useful when working with data, scheduling, or reporting across international contexts. Some organizations use it exclusively for financial reporting, supply chain tracking, and project management because it removes ambiguity about which week people are referring to. You'll also find ISO week references in many programming libraries and standards documentation, making it a handy reference tool for developers, analysts, and anyone coordinating schedules globally.

Frequently Asked Questions

Code Implementation

from datetime import date

def iso_week_number(d: date) -> tuple[int, int, int]:
    """Return (ISO year, ISO week number, ISO weekday) for a given date.
    ISO week 1 is the week containing the year's first Thursday.
    Monday = 1, Sunday = 7
    """
    iso_cal = d.isocalendar()
    return iso_cal.year, iso_cal.week, iso_cal.weekday

def dates_in_iso_week(year: int, week: int) -> list[date]:
    """Return all 7 dates in a given ISO week."""
    # ISO week 1, Monday
    jan4 = date(year, 1, 4)  # Jan 4 is always in week 1
    start_of_week1 = jan4 - timedelta(days=jan4.isocalendar().weekday - 1)
    from datetime import timedelta
    start = start_of_week1 + timedelta(weeks=week - 1)
    return [start + timedelta(days=i) for i in range(7)]

# Example
from datetime import timedelta
today = date.today()
y, w, wd = iso_week_number(today)
print(f"Today {today}: ISO week {w} of {y}, weekday {wd} (1=Mon)")

# All years have 52 or 53 ISO weeks
for yr in [2020, 2021, 2022, 2023, 2024]:
    last_week = date(yr, 12, 28).isocalendar().week  # Dec 28 is always in last week
    print(f"  {yr}: {last_week} ISO weeks")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.