WEEKNUM function
WEEKNUM returns the week of the year for a date. By default week 1 is the week containing 1 January, so use ISOWEEKNUM if you need ISO weeks.
Example
Read it as a sentence: find the week number of the date in F1, which is blank, so it gives 0.
Excel shows 0
F
1
Data
Syntax
WEEKNUM(serial_number, [return_type])
Arguments in [square brackets] are optional.
-
serial_number(required) - The date to evaluate.
-
return_type(optional) - Which day the week starts on; 1 or omitted is Sunday, 2 is Monday, 21 gives ISO numbering.
Returns: The week number of the year.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=WEEKNUM(DATE(2026,1,9)) | 2 | Default type |
=WEEKNUM(DATE(2026,1,9),2) | 2 | Monday start |
=WEEKNUM(DATE(2026,1,9),21) | 2 | ISO |
=WEEKNUM(DATE(2026,12,31)) | 53 | Year end |
=WEEKNUM(DATE(2026,12,31),21) | 53 | Year end ISO |
=WEEKNUM(Data!F1) | 0 | Blank |
=WEEKNUM(DATE(2026,1,9),3) | #NUM! | Invalid type |
=WEEKNUM("x") | #VALUE! | Bad date |
The Data sheet these formulas read
A cell that starts with = holds that formula.
F
1
Data
Watch out for
- The default system counts week 1 as the week containing 1 January, not the ISO rule.
- Use ISOWEEKNUM or return_type 21 for ISO weeks.
- Weeks can be numbered up to 54.
Where it works
- Excel
- WEEKNUM is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Date and time functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .