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])| Argument | What it means | |
|---|---|---|
serial_number | Required | The date to check. |
return_type | Optional | Which 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
| A | B | |
|---|---|---|
| 1 | Date | Week |
| 2 | 2026-12-02 | 49 |
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
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Type 1 | Type 2 | Type 21 |
| 2 | 2026-03-08 | 10 |
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
| A | B | |
|---|---|---|
| 1 | Date | ISO week |
| 2 | 2027-01-01 | 53 |
Result: 53
Under ISO rules Friday 1 Jan 2027 still belongs to week 53 of 2026. Plain =WEEKNUM(A2) would return 1.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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.
| Language | Function name |
|---|---|
| Danish | UGE.NR |
| Dutch | WEEKNUMMER |
| Finnish | VIIKKO.NRO |
| French | NO.SEMAINE |
| German | KALENDERWOCHE |
| Hungarian | HÉT.SZÁMA |
| Italian | NUM.SETTIMANA |
| Norwegian (Bokmål) | UKENR |
| Polish | NUM.TYG |
| Portuguese (Brazil) | NÚMSEMANA |
| Portuguese (Portugal) | NÚMSEMANA |
| Russian | НОМНЕДЕЛИ |
| Spanish | NUM.DE.SEMANA |
| Swedish | VECKONR |
| Turkish | HAFTASAY |