MS Excel: WEEKNUM function to get the week number from any date
- Fakhriddinbek
- 2 days ago
- 2 min read
The WEEKNUM function in Microsoft Excel returns the week number of a given date. This is especially useful for weekly reporting, payroll, inventory planning, or project management where you want to organize or group data by calendar weeks.

Whether you need to calculate which week a date falls into or sort reports by weekly intervals, WEEKNUM helps you do it efficiently.
Syntax
=WEEKNUM(serial_number, [return_type])
Arguments:
Argument | Required | Description |
serial_number | ✅ Yes | A valid Excel date (can be a date, cell reference, or formula). |
return_type | ❌ No | A number (1 or 2, or 11–21) indicating which day starts the week. Default is 1 (week starts on Sunday). |
Return Type Options
Return Type | Week Starts On | Notes |
1 (default) | Sunday | Week 1 starts on Jan 1 |
2 | Monday | Week 1 starts on Jan 1 |
11–17 | Mon–Sun | ISO-like variations |
21 | Monday | ISO 8601 standard (use ISOWEEKNUM) |
Examples
Example 1: Week Number of a Date
=WEEKNUM(DATE(2025,5,2))
Result: 18(May 2, 2025 falls in the 18th week of the year if weeks start on Sunday.)
Example 2: Week Number Starting from Monday
=WEEKNUM("02/05/2025", 2)
Result: 18(Using Monday as the first day of the week.)
Example 3: Use with TODAY() for Dynamic Week Tracking
=WEEKNUM(TODAY(), 2)
Returns the current week number based on today’s date and a Monday start.
Sample Table
Date | Formula | Return Type | Result | Description |
01/01/2025 | =WEEKNUM(A2, 1) | 1 | 1 | First week of the year |
15/01/2025 | =WEEKNUM(A3, 2) | 2 | 3 | Third week, Monday start |
31/12/2025 | =WEEKNUM(A4) | 1 | 53 | Last week of the year |
Notes
The WEEKNUM function starts counting from January 1st, regardless of what day of the week that falls on.
For ISO 8601 week numbering (where Week 1 is the week containing the first Thursday of the year), use ISOWEEKNUM instead.
Excel stores dates as serial numbers; invalid inputs will result in a #VALUE! error.
Related Functions
Function | Description |
ISOWEEKNUM() | Returns ISO-compliant week number |
WEEKDAY() | Returns the day of the week as a number |
TODAY() | Returns the current date |
TEXT() | Format a date to show full names |
Summary Table
Feature | Description |
Function Name | WEEKNUM |
Purpose | Get week number of a given date |
Customizable Week Start | ✅ Yes (via return_type) |
Date System | Works with Excel 1900/1904 systems |
Introduced In | Excel 2007+ |
Conclusion
The WEEKNUM function simplifies weekly data organization in Excel. Whether you’re tracking deadlines, planning shifts, or preparing weekly reports, this function ensures accurate and dynamic week number calculations.
Comments