Skip to content

WEEKNUM

Returns the week number of a date within its year. Several numbering systems are available, including the ISO standard.

Syntax

=WEEKNUM(, )

Date and time

All versions of Excel. The return types 11 to 17 and 21 need Excel 2010 or later.

Try it

Edit the formula in B2 or change the inputs. The sheet recalculates as you type.

B2
A
B
C
1
Date
Week
2
15-Mar-2025
11
3

B2 =WEEKNUM(A2) returns 11

How WEEKNUM works

WEEKNUM returns the week of the year for a date. The answer depends on the numbering system, which is the part most people don't expect. =WEEKNUM(DATE(2025,3,15)) returns 11, but =WEEKNUM(DATE(2024,12,30)) returns 53 with the default system and 1 with the ISO system.

Two numbering systems

System 1 (the default): week 1 is the week that contains 1 January, even if that week has only one day in the new year. Weeks start on Sunday by default, or Monday with return type 2 (or any other day with types 11 to 17). Under this system, a week that straddles the new year is split between the old year's last week and week 1.

System 2 (ISO 8601, return type 21): weeks start on Monday and week 1 is the week that contains the first Thursday of the year, which is the same as the week containing 4 January. Under this system a few days at the start of January belong to week 52 or 53 of the previous year, and a few days at the end of December can belong to week 1 of the next year. ISOWEEKNUM returns the same result as WEEKNUM(date,21).

The week of 29 December 2024 to 4 January 2025 shows the difference. System 1 splits it: 29 to 31 December are week 53, and 1 to 4 January are week 1. The ISO system keeps the whole week together as week 1 of 2025, so Monday 30 December is already in week 1.

Which should you use?

Use ISO (type 21 or ISOWEEKNUM) when the week number must match what other organisations and countries publish, such as in European supply chains and production planning. Use the default or type 2 when your own company has always counted weeks from the week containing 1 January, such as in some US retail calendars. If you have no rule, ask what week numbering your reports use, because mixing the two gives weeks that differ by one.

Labels and grouping

To make a sortable label, pad the number: ="W"&TEXT(WEEKNUM(A2,21),"00") returns W11. Week numbers repeat every year, so grouping by week alone mixes years. Combine them: the ISO week-year is not always the calendar year, so use =YEAR(A2-WEEKDAY(A2,2)+4) for the year that belongs to the ISO week.

Related patterns

  • Week commencing (Monday): =A2-WEEKDAY(A2,2)+1.
  • Week commencing (Sunday): =A2-WEEKDAY(A2)+1.
  • Totals by week: put WEEKNUM in a helper column and use SUMIFS on it, with the year as a second criterion.

WEEKNUM ignores the time of day. It returns #NUM! for an invalid return type.

Arguments

serial_number
The date to read: a cell holding a date, a date built with DATE, or text Excel can read as a date.
return_typeoptional
Which day the week starts on, and the numbering system. 1 or omitted: weeks start on Sunday, and week 1 is the week containing 1 January. 2: the same, with weeks starting on Monday. 11 to 17: weeks start on Monday (11) through Sunday (17), with week 1 containing 1 January. 21: the ISO system, where weeks start on Monday and week 1 is the week containing the first Thursday.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Default week number

B2 =WEEKNUM(A2)

Result: 11

Weeks start on Sunday and week 1 contains 1 January 2025. 15 March falls in week 11.

B2
A
B
C
1
Date
Week
2
15-Mar-2025
11
3

B2 =WEEKNUM(A2) returns 11

Example 2

The default and ISO systems disagree at the year end

B2 =WEEKNUM(A2)

Result: 53

Monday 30 December 2024 is in the week that starts on Sunday 29 December. System 1 numbers that week 53 of 2024.

B2
A
B
C
1
Date
Default week
2
30-Dec-2024
53
3

B2 =WEEKNUM(A2) returns 53

Example 3

The same date with ISO numbering (type 21)

B2 =WEEKNUM(A2,21)

Result: 1

In the ISO system, the week containing the first Thursday (2 January 2025) is week 1, and that week starts on Monday 30 December 2024.

B2
A
B
C
1
Date
ISO week
2
30-Dec-2024
1
3

B2 =WEEKNUM(A2,21) returns 1

Example 4

A sortable week label

B2 ="W"&TEXT(WEEKNUM(A2,21),"00")

Result: W02

TEXT pads the number to two digits, so the labels W02, W10 and W52 sort in the right order as text.

B2
A
B
C
1
Date
Label
2
08-Jan-2025
W02
3

B2 ="W"&TEXT(WEEKNUM(A2,21),"00") returns W02

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B2, return the ISO week number of the date in A2, where weeks start on Monday. Fill it down to B4.

Answer in B2, then it fills down to B4.

B2
A
B
C
D
E
1
Date
ISO week
Label
2
30-Dec-2024
3
15-Mar-2025
4
01-Jan-2025
5

Common mistakes

  • The default system makes the week containing 1 January week 1, even if it contains a single January day. It does not match ISO numbering, which differs by one week at some year ends.
  • Week numbers repeat each year. Group or sort by week alone and different years are mixed. Include the year as well.
  • Return types 11 to 17 and 21 aren't available in Excel 2007 and earlier. Those versions only know types 1 and 2.
  • The calendar year of a date and its ISO week-year can differ. 1 January 2021 is in ISO week 53 of 2020. Use YEAR(A2-WEEKDAY(A2,2)+4) for the ISO year.
  • An unsupported return type, such as 5 or 18, returns #NUM!.

Questions people ask

How do I get the ISO week number in Excel?

Use `=ISOWEEKNUM(A2)` or `=WEEKNUM(A2,21)`. Both give ISO 8601 weeks, which start on Monday.

Why does WEEKNUM show week 53 for 30 December?

The default system counts the week containing 1 January as week 1 and numbers the weeks before it up to 52 or 53. With ISO numbering that date can be week 1 of the next year.

How do I make weeks start on Monday?

Use return type 2 for Monday-start weeks with week 1 containing 1 January, or type 21 for ISO weeks.

How do I find the first day of a given week?

For Monday, use `=A2-WEEKDAY(A2,2)+1`. It moves any date back to the Monday of its week.

Does WEEKNUM work for fiscal weeks?

Not directly. Fiscal calendars start their weeks from a fiscal year start date. Use `=INT((A2-FYStart)/7)+1` with the fiscal year start in a cell.

Learn WEEKNUM in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.