In Excel, you calculate the week number of a date with the WEEKNUM function for the US-style numbering system or the ISOWEEKNUM function for the ISO 8601 international standard, and the formula =WEEKNUM(A1,21) returns the same ISO week as =ISOWEEKNUM(A1). Both functions need only one argument — the cell that contains your date — and a second argument for WEEKNUM that selects which day the week starts on.

Once you understand which numbering convention your reports need, picking the right function is straightforward. ISO 8601, the international standard, treats Monday as weekday 1 and Sunday as weekday 7, and it defines week 1 as the week that contains January 4. The US-style convention embedded in older Excel templates treats Sunday as the first day of the week and the week containing January 1 as week 1, which means the same date can label as two different weeks depending on which formula you pick. Excel does not automatically warn you about which convention you are using — it just gives you back a number — so picking the right function up front saves a lot of confusion in weekly reports, sprint planning, and inventory tracking.

how to calculate week number based on date in excel
How to Calculate Week Number Based on Date in Excel

What a Week Number Actually Means in Excel

A "week number" is just an integer that tells you which week of the year a date belongs to, but the rule that turns a date into that integer is not universal. Four systems are in common use: ISO 8601 (international, weeks start Monday, week 1 contains the first Thursday), the US convention (weeks start Sunday, week 1 contains January 1), a Middle East variant (weeks start Saturday, week 1 contains January 1), and a Chinese variant (weeks start Monday, week 1 contains January 1). Excel ships with two of these baked into its formula library and gives you a way to call the others on demand.

When your file holds a real Excel date — meaning a serial number such as 45292 for 2024-01-01 — both WEEKNUM and ISOWEEKNUM will accept it as the first argument. If your date column holds text strings, both functions return a #VALUE! error, and you must first convert the column with DATEVALUE or by reformatting the cells as a Date type. Picking the wrong system does not trigger an error in Excel; it just returns a number from a different rule, which is why a January 1 in one report can show as week 1 while the same date shows as week 53 in another.

Excel's Two Built-In Week Functions: WEEKNUM and ISOWEEKNUM

ISOWEEKNUM is the simpler of the two: it takes exactly one argument, the date, and returns the ISO 8601 week number. WEEKNUM takes a date plus a second argument called return_type that picks which day the week starts on and which numbering rule applies. The values that ship with Excel follow the table below, which is the official Microsoft-documented list of return_type values.

WEEKNUM return_typeWeek starts onWeek 1 anchor
1 (or omitted)SundayWeek containing January 1
2MondayWeek containing January 1
11MondayWeek containing January 1
12TuesdayWeek containing January 1
13WednesdayWeek containing January 1
14ThursdayWeek containing January 1
15FridayWeek containing January 1
16SaturdayWeek containing January 1
17SundayWeek containing January 1
21MondayWeek containing the first Thursday (ISO 8601)

For ISO 8601 work, ISOWEEKNUM(A1) and WEEKNUM(A1,21) return identical results, so either formula is fine. The two-argument form exists so you can stay inside WEEKNUM when you have a sheet that mixes conventions, or when your team already standardized on return_type 11 and you want to migrate to ISO 8601 without rewriting every formula in the workbook.

Calculate Week Number from a Date in Excel

  1. Type your date in cell A1 (for example, 2024-12-30) and press Enter, or import a column where every cell is a real Excel date rather than a text string.
  2. Click into cell B1 and type =ISOWEEKNUM(A1) if you need the ISO 8601 week number, or =WEEKNUM(A1,21) for the same result through the older function.
  3. To get the US-style week number instead, type =WEEKNUM(A1,1) in B1, or =WEEKNUM(A1,17) if your team follows the newer US alias.
  4. Press Enter. Excel returns a single integer between 1 and 53 — for 2024-12-30, ISOWEEKNUM returns 1 because that Monday belongs to ISO week 1 of 2025.
  5. Select B1, hover over the small green square at the bottom-right corner, and drag down to apply the formula across the rest of your date column.
  6. If B1 shows a serial number or a date format, right-click the cell, choose Format Cells, and select Number with 0 decimals so it displays as a clean week integer.

If your date column contains text instead of real Excel dates, wrap the cell reference in DATEVALUE first: =ISOWEEKNUM(DATEVALUE(A1)). That small change converts a string like "2024-12-30" into the serial number the week functions expect, and you can paste it across the column the same way as the simpler version. Both WEEKNUM and ISOWEEKNUM also accept the result of TODAY(), NOW(), or any other date-returning function in place of A1, which is the standard pattern for "what week is right now" labels on dashboards.

Why Some Dates Land in a Different ISO Year

ISO 8601 ties the week-year to the Thursday of each week, not to January 1, so a date near the calendar boundary can belong to the previous or next ISO year even though it is clearly inside the calendar year. This is the single most common source of "why does my report show two different years" confusion, and it is worth knowing the three pattern cases before you trust a weekly total.

First, January 1 can belong to the previous ISO year: 2016-01-01 (a Friday) is 2015-W53, because week 53 of 2015 ended on Sunday January 3, 2016. Second, late December can belong to the next ISO year: 2024-12-30 (a Monday) is 2025-W01, because the Monday-to-Sunday week containing that date also contains Thursday January 2, 2025. Third, some ISO years contain 53 weeks rather than 52: 2015, 2020, and 2026 are recent examples of ISO week-years with 53 Mondays and a W53. Excel's ISOWEEKNUM handles all three cases correctly because the function follows the Thursday rule, but the integer it returns only tells you the week, not the week-year. If your filename or report key needs the full YYYY-Www label, you have to add the year yourself.

Verify Your Excel Result with the Week Number Calculator

If you want a second opinion on a date near the New Year boundary, or if you need the full YYYY-Www label rather than just the integer, the Week Number Calculator applies the ISO 8601 rules for you. Everything runs locally with UTC calendar arithmetic, so browser timezones and daylight-saving changes do not shift the selected date, and the returned label is in the strict YYYY-Www format ready to drop into filenames, planning documents, or audit reports.

To verify an Excel cell with the calculator:

  1. Enter the same Gregorian date you typed into Excel, using the strict YYYY-MM-DD format the parser accepts.
  2. Select Calculate ISO week.
  3. Compare the returned YYYY-Www label to your Excel formula. The two should agree for any date that ISOWEEKNUM or WEEKNUM(A1,21) handles correctly.

If the two numbers ever disagree, the disagreement almost always means your Excel date was a text string, your WEEKNUM return_type was not 21 or 11, or you were checking a date inside a fiscal calendar rather than the ISO 8601 calendar. The tool returns ISO labels only, so it cannot check a fiscal-week or retail 4-4-5 calendar — those systems use different rules and a different week number will come out.

When Excel's Answer Is Not What Your Calendar Says

Some systems that look like week numbers are not ISO 8601 at all. Retail 4-4-5 calendars split each quarter into two 4-week months and one 5-week month so every quarter is the same length, which gives a different week 1 and a different week 53 than ISO. Many payroll and tax systems use fiscal weeks that start on a Sunday but whose week 1 is defined by the company's accounting calendar, not by January 1. Government statistical agencies in some countries publish weekly figures on a Sunday-start, Jan-1-anchored numbering that matches WEEKNUM(A1,1) but not ISOWEEKNUM(A1). For any of these, ISO 8601 — and the ISO result from Excel — will not match the official number, and you should confirm the convention with whoever owns the source before reconciling reports.

For a quick cross-check on the day-of-week side, the guide to finding the day of the week for any date walks through the same ISO Monday-to-Sunday rule that drives the weekday number in the calculator. If you also need to convert text dates into real Excel dates before running ISOWEEKNUM, the Convert Date Format in Excel and Online Instantly guide covers the DATEVALUE workaround in more detail alongside a few cell-format approaches.