Date & time function

WEEKNUM function

Returns the week number of a date within its year, using a week that starts on Sunday, Monday or another day you choose.

Available in Excel 2007 and later (earlier versions needed the Analysis ToolPak add-in), Excel for the web

Excel 2007 and laterWorks in Google Sheets

Syntax

WEEKNUM(serial_number, [return_type])
ArgumentWhat it means
serial_numberRequiredThe date to check.
return_typeOptionalWhich day starts the week: 1 or omitted = Sunday, 2 or 11 = Monday, 12 = Tuesday … 17 = Sunday; 21 = ISO 8601 weeks (Monday start, week 1 contains the first Thursday).

Returns: A whole number from 1 to 54.

How WEEKNUM works

WEEKNUM numbers the weeks of the year so you can group sales, timesheets or production figures by week. In its default system (types 1, 2 and 11–17) week 1 is the week containing 1 January, and a new week begins on the start day you pick. That means week 1 may be only a day or two long, and the year can have 53 or even 54 partial weeks.

This simple system is common in the US but does not match the ISO 8601 standard used across Europe, where week 1 is the first week with a Thursday in it. For ISO weeks pass 21 as the return type, or use ISOWEEKNUM, which gives the same result. Choosing the wrong system is the most common reason a week number disagrees with a printed calendar.

Examples

1Week number with Sunday-start weeks

B2fx=WEEKNUM(A2)
AB
1DateWeek
22026-12-0249

Result: 49

With the default type 1 (weeks start on Sunday, week 1 contains 1 January), Wednesday 2 Dec 2026 is in week 49.

2Same Sunday, different systems

C2fx=WEEKNUM(A2,2)
ABCD
1DateType 1Type 2Type 21
22026-03-0810

Result: 10

8 March 2026 is a Sunday. With Sunday-start weeks (type 1, in B2) it starts week 11; with Monday-start weeks (type 2) it is the last day of week 10. ISO type 21 also gives 10.

3ISO week via return type 21

B2fx=WEEKNUM(A2,21)
AB
1DateISO week
22027-01-0153

Result: 53

Under ISO rules Friday 1 Jan 2027 still belongs to week 53 of 2026. Plain =WEEKNUM(A2) would return 1.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#NUM!return_type is not a valid code.Use 1, 2, 11–17 or 21.

Tips

  • Agree on one week system for a whole workbook and document it — mixing type 1 and ISO weeks causes reports that do not tie out.
  • For a sortable year-week label use =YEAR(A2)&"-W"&TEXT(WEEKNUM(A2,2),"00") (non-ISO) or the ISO-year trick shown on ISOWEEKNUM.

Google Sheets

WEEKNUM also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

WEEKNUM in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishUGE.NR
DutchWEEKNUMMER
FinnishVIIKKO.NRO
FrenchNO.SEMAINE
GermanKALENDERWOCHE
HungarianHÉT.SZÁMA
ItalianNUM.SETTIMANA
Norwegian (Bokmål)UKENR
PolishNUM.TYG
Portuguese (Brazil)NÚMSEMANA
Portuguese (Portugal)NÚMSEMANA
RussianНОМНЕДЕЛИ
SpanishNUM.DE.SEMANA
SwedishVECKONR
TurkishHAFTASAY