WEEKNUM Function in Microsoft Excel: Syntax, Examples & Compatibility
Learn how to calculate a calendar week number for reports without confusing it with ISO week numbering in Microsoft Excel. Includes syntax, two verified-by-reasoning results, troubleshooting and portability notes.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Microsoft Excel. How formula examples are checked
Quick answer: calculate a calendar week number for reports without confusing it with ISO week numbering in Microsoft Excel. The reproducible examples below use explicit values so the formula’s meaning is testable without a large workbook.
Evidence: The function name and syntax are documented in the linked vendor function reference. Expected outputs were independently reasoned or checked outside the application. These are not native Microsoft Excel test results. A guide being published here does not certify every software release or file-import scenario.
Syntax and arguments
=WEEKNUM(serial_number, [return_type])
serial_number is the date. Type 2 begins weeks on Monday, but week 1 is still the week that contains January 1.
Best use case: Calculate a calendar week number for reports without confusing it with ISO week numbering.
Set up the example sheet
Use a small control table containing 1 January 2026 and 5 January 2026. Create the dates with DATE rather than typing locale-dependent strings.
Enter the formula in an unused cell. For a formula returning several values, leave an unobstructed area where those values can expand. These formulas use comma argument separators in a typical English-language locale; commas or semicolons inside quoted text are data, not argument separators. Adapt the separator if your regional settings require it.
Worked example 1: WEEKNUM with known input
=WEEKNUM(DATE(2026,1,1),2)
Expected output: 1.
A January 1 date always falls in WEEKNUM week 1, even if the week is incomplete.
Worked example 2: a second WEEKNUM case
=WEEKNUM(DATE(2026,1,5),2)
Expected output: 2.
Monday 5 January starts the next Monday-first week after the opening partial week.
Compare both results before replacing literal values or short sample ranges with your own workbook data. For a spilling formula, compare every output cell, not only the top-left result.
Practical advice and troubleshooting
When this formula helps: When you need ISO 8601 weeks, use ISOWEEKNUM where supported or the officially documented ISO return mode; WEEKNUM(…,2) is not equivalent near year boundaries.
Important edge case: The same late-December date may belong to a different ISO week-year than its calendar year. Always record both conventions in exports.
If the result differs, first verify the text-versus-number types of the input cells, the argument separators for your locale, and the range size. For dynamic arrays, inspect occupied cells in the output area. An error that looks like a missing function may reflect a software version rather than incorrect data.
Compatibility and version considerations
Both products document WEEKNUM, but migration must preserve the return_type argument and the meaning of week 1.
Check your installed release for availability and dynamic-array support.
Function availability and parameter behavior must be judged for the specific application and release; a function documented in one spreadsheet does not automatically work in another.
Related guides and official documentation
-
Microsoft Excel documentation for WEEKNUM — function syntax and current vendor information.
Editorial verification: Vendor catalogue referenced as of 2026-10-12. The two example outputs are independently reasoned; no native application run, screenshot, or version-specific output is claimed. Review the editorial testing standards if you require stronger proof before importing a workbook.