Current epoch — epochtime.tools · A precision instrument for time
ISO week number—
US week number—
Weeks in this ISO year—
Date shown—
ISO week date—
ISO week-year—
Week starts (Monday)—
Week ends (Sunday)—
Start of week, Unix seconds—
End of week, Unix seconds—
Day of the year—
Weeks left in ISO year—
Next week starts in—

What week is it?

The big number above is the ISO 8601 week number for the date shown, in the timezone you pick. Leave the date alone and it follows the clock, so it rolls over at midnight local time on Monday, not at midnight UTC. Pick a date to look up any other week.

ISO week or US week?

PropertyISO 8601 weekUS week (Excel WEEKNUM default)
Week starts onMondaySunday
Week 1 isThe week with the first Thursday of the year (the one that contains 4 January)The week that contains 1 January, even if it has only one day in the year
Weeks in a year52 or 53, and every week is a full seven days53 or 54 numbers, with a partial week at each end
Days at the turn of the yearEarly January can fall in week 52 or 53 of the old year, and late December in week 1 of the nextAlways counted in the calendar year they belong to

Much of Europe, and many business and manufacturing schedules, use ISO weeks. Calendar apps in the United States and Excel's WEEKNUM(date) use the Sunday-start version. If a week number looks off by one, check which system the other side is using.

Week numbers by year

Each year page lists every week with its Monday and Sunday dates and Unix start and end times: 2026 · 2027 · 2028 · 2029. Earlier years: 2015 · 2016 · 2017 · 2018 · 2019 · 2020 · 2021 · 2022 · 2023 · 2024 · 2025.

Get the ISO week number in code

JavaScript (no built-in)

function isoWeek(d) {
  const t = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()));
  t.setUTCDate(t.getUTCDate() + 4 - (t.getUTCDay() || 7));   // Thursday of this week
  const jan1 = Date.UTC(t.getUTCFullYear(), 0, 1);
  return Math.ceil(((t - jan1) / 86400000 + 1) / 7);
}

Python

from datetime import date
date.today().isocalendar().week     # Python 3.9+

PostgreSQL

SELECT EXTRACT(WEEK FROM CURRENT_DATE);   -- ISO 8601 week

MySQL

SELECT WEEK(CURDATE(), 3);                 -- mode 3 = ISO 8601

SQL Server

SELECT DATEPART(ISO_WEEK, GETDATE());

Java

LocalDate.now().get(IsoFields.WEEK_OF_WEEK_BASED_YEAR)

C#

System.Globalization.ISOWeek.GetWeekOfYear(DateTime.Now)

Go, PHP, Ruby, Bash, Excel

_, week := time.Now().ISOWeek()   // Go
date('W');                       // PHP, zero-padded string
Date.today.cweek                // Ruby
date +%V                        # Bash
=ISOWEEKNUM(A1)                 # Excel and Google Sheets

Related: day of the year, timezone converter, current Unix timestamp.

Last updated: