WEEKNUM Function
Returns the week-of-year number for a date.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| serial_number | The date serial to evaluate. | Required |
| return_type | Optional. Controls the week-start day: 1 (default) = week starts Sunday; 2 = week starts Monday; 11-17 select a specific start day; 21 = ISO 8601 (week starts Monday, week 1 is the one containing the first Thursday). | Optional |
Basic Example
Week number of New Year 2024
=WEEKNUM(DATE(2024, 1, 1), 2)2024-01-01 is a Monday. With return_type 2 (Monday start), the week containing Jan 1 is week 1.
Advanced Examples
Example 1: ISO 8601 week for a late-December date spill
A date that belongs to the previous ISO yearreturn_type 21 follows the ISO rule
=WEEKNUM(DATE(2021, 1, 1), 21)Example 2: US week starting Sunday
Comparing numbering systemsreturn_type 1 starts the week on Sunday
=WEEKNUM(DATE(2021, 1, 1), 1)How WEEKNUM Works
WEEKNUM determines which week a date falls in based on the chosen week-start day. Week 1 always contains January 1. The ISO mode (21) defines week 1 as the week with the first Thursday (equivalently the week containing Jan 4), which can place early January dates in week 52 or 53 of the prior year.
Important Notes & Limitations
Week 1 always contains Jan 1, so early or late dates can return 52 or 53 under the ISO system.
For strict ISO weeks in Excel 2013 and later, the dedicated ISOWEEKNUM function is an alternative.
return_type must be 1, 2, 11-17, or 21; other values return #NUM!.
Common Errors & Fixes
#NUM!An invalid return_type value was supplied.Fix: Use 1, 2, 11-17, or 21.
Week number seems off by oneMixing Sunday-start and Monday-start systems, or expecting ISO behavior.Fix: Use return_type 21 for ISO 8601 weeks.
Download Practice File
WEEKNUM
weeknumPractice WEEKNUM with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the WEEKNUM function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps