MS Excel: WEEKNUM function to get the week number from any date
- Fakhriddinbek

- May 4
- 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:
Return Type Options
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
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
Summary Table
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