About this article
This article was generated using an AI-assisted automated workflow. We verified Microsoft's official documentation for WEEKNUM and ISOWEEKNUM and created a sample table to compare week numbers around the New Year.Verification Status: 📘 Official Information Verified, Actual Hardware Not Tested
Formula input and screen rendering in Excel have not been tested. The following results represent expected values derived from the official specifications.
- Supported Environments, Capabilities, and Limitations (Verified: November 28, 2026)
- Try this first: List four consecutive days around the year-end and New Year
- Merely starting on Monday does not make it the ISO method
- Why determining the associated year along with the week number
- Changing one part: When December 30 falls into the first week of the following year
- When the formula result differs from expectations
- For professional use: Define weekly aggregation rules first
- Summary
Supported Environments, Capabilities, and Limitations (Verified: November 28, 2026)
| Item | Target, Condition, and Availability |
|---|---|
| Target Products and Features | Week number calculation using Excel's WEEKNUM, ISOWEEKNUM, DATE, YEAR, and WEEKDAY functions |
| Usage Location and Environment | Microsoft 365 Excel desktop app, Excel 2024 / 2021 / 2019 / 2016. Based on target products in Microsoft official documentation. Individual builds, web versions, and mobile versions have not been verified. |
| Account and Required Subscription | A subscription or license that supports the applicable Excel version. An additional Copilot subscription is not required for these calculations. |
| Storage Location | A new practice workbook. Can be tested with local storage. |
| Available Operations | Calculate week numbers from dates and compare differences across year boundaries. |
| Limitations and Unverified Items | Company-specific accounting weeks, holidays, and cutoff date definitions are not automatically determined. Actual Excel behavior has not been verified. |
| Limits and Provision Conditions | A valid Excel date is required. The formulas presented here target modern dates and do not handle legacy date system boundaries. |
| Safety Precautions | Do not overwrite production summary tables; verify using a copy or a new workbook. |
Even though December 31 and January 1 fall within the same week, Excel week numbers may sometimes differ. This is not necessarily just a day-of-the-week setting issue, because the method that treats the week containing January 1 as the first week and the ISO method use different criteria to determine the first week of the year.
When aggregating weekly sales or inquiry counts, determine not only the week number but also the specific week numbering method and year before aggregating. Especially around the year-end and New Year holidays, the date's calendar year and the ISO week's assigned year may not match.
Try this first: List four consecutive days around the year-end and New Year
Open a new workbook and enter "Date", "Monday Start", "ISO Week Number", "ISO WEEKNUM", and "ISO Week Year" in cells A1 through E1. Enter the following formulas row by row from A2 to A5. By generating dates using the DATE function rather than using string dates, you avoid discrepancies caused by regional settings during entry.
| Cell | Formula to Enter |
|---|---|
| A2 | =DATE(2020,12,28) |
| A3 | =DATE(2021,1,1) |
| A4 | =DATE(2021,1,3) |
| A5 | =DATE(2021,1,4) |
Enter the following formulas into cells B2, C2, D2, and E2 in order.
| Cell | Formula |
|---|---|
| B2 | =WEEKNUM(A2,2) |
| C2 | =ISOWEEKNUM(A2) |
| D2 | =WEEKNUM(A2,21) |
| E2 | =YEAR(A2-WEEKDAY(A2,2)+4) |
Copy B2:E2 and paste it into B3:E5. The relative reference A2 adjusts according to the row. If column A displays numbers, change the cell format to Date.
Expected Value
| Date | WEEKNUM(2) | ISOWEEKNUM | WEEKNUM(21) | ISO Week Year |
|---|---|---|---|---|
| 2020/12/28 | 53 | 53 | 53 | 2020 |
| 2021/1/1 | 1 | 53 | 53 | 2020 |
| 2021/1/3 | 1 | 53 | 53 | 2020 |
| 2021/1/4 | 2 | 1 | 1 | 2021 |
Observe the row for January 1st. The 1 in column B and the 53 in column C do not mean that one of them is a calculation error. They are the result of representing the same Friday using different week numbering systems. Columns C and D match because both use the ISO method.
Merely starting on Monday does not make it the ISO method
Setting the second argument of WEEKNUM to 2 makes Monday the start of the week. However, the rule of assigning the first week to the week containing January 1st of that year remains unchanged. Therefore, while results may be similar mid-year, discrepancies with the ISO method occur at the year boundary.
On the other hand, the ISO method defines Monday through Sunday as a single week, and the first week is the one containing the first Thursday of the year. January 1, 2021 was a Friday. The Thursday of that week was December 31, 2020, so it belongs to the 53rd week of 2020. The first week of 2021 begins on Monday, January 4, of the following week.
To specify the ISO method in WEEKNUM, set the second argument to 21. Since ISOWEEKNUM retrieves the week number using the same method based solely on the date, it makes the intent easier for the reader to understand in tables where the method needs to be explicit. WEEKNUM with the omitted second argument starts on Sunday and does not have the same meaning as 2 or 21.
Official: Microsoft Support — WEEKNUM function
Official: Microsoft Support — ISOWEEKNUM function
Why determining the associated year along with the week number
Knowing only that the ISO week number is 53 does not indicate whether it is the 53rd week of 2020 or of another year. Furthermore, simply extracting the year from the date using YEAR combines January 1, 2021, with the 53rd week of 2021. This combination differs from the intended meaning of the ISO week in this context.
In the formula for column E, WEEKDAY(A2,2) first calculates the weekday number, where Monday is 1 and Sunday is 7. Subtracting this weekday number from the date and adding 4 yields the date of Thursday in the same week (3 days later for a Monday, 1 day prior for a Friday). Finally, YEAR extracts the year of that Thursday. The associated year of the ISO week is determined by the year of this Thursday.
If you are adding a column to identify the week, enter "ISO Week Key" in F1, enter the following formula in F2, and copy it down.
=E2&"-W"&TEXT(C2,"00")
The expected values are 2020-W53 for the first three rows and 2021-W01 for the last. Formatting the week number to two digits is intended to make it easier for humans to identify. There is no need to turn the resulting string into a surrogate date. Keep the original date in a separate column so it can be used for both aggregation and source detail verification.
Official reference:Microsoft Support — WEEKDAY function
Official reference:Microsoft Support — YEAR function
Official reference:Microsoft Support — TEXT function
Changing one part: When December 30 falls into the first week of the following year
Change only A2 to =DATE(2024,12,30). Because it is a Monday, B2 is expected to be the 53rd week of the 2024 side, C2 and D2 are 1, and E2 is 2025. If column F is created, it becomes 2025-W01.
Previously, a date in January belonged to the previous year, but this time a date in December belongs to the following year. Testing boundaries in both directions shows that simply adding exception handling for January is insufficient. When reviewing business formulas, it is important to unify the adopted week definition across the entire formula rather than using conditions that only adjust for January 1.
When the formula result differs from expectations
First, check the dates in column A. Even if they look like dates, values imported from a CSV might be stored as text. Verify whether practice dates created with DATE, like the ones used here, can be calculated before examining the actual data types. Values that cannot be recognized as dates or numbers out of range will cause errors.
Next, check the second arguments in columns B and D. A distinction must be made between specifying a Monday start and specifying the ISO method. If the results differ between columns C and D, verify that the date references are identical and that column D is set to 21. Also, check whether copying the formula caused it to reference a different column.
Determine whether blank dates should be included in the calculation of week numbers. If you want to prevent unintended values from being generated by passing blank cells to the formula, you can use something like =IF(A2="","",ISOWEEKNUM(A2)) to visually distinguish unpopulated rows. This is only a countermeasure for blank cells and does not fix invalid strings or input errors. Rather than hiding all errors, keeping the original data in an inspectable state is more useful for investigating omission in aggregation.
- Formula:Microsoft Support — IF function
For professional use: Define weekly aggregation rules first
For example, suppose a help desk reports the number of processed requests every Monday through Sunday. If the policy is to group the week of December 28 to January 3 into a single aggregation row, the ISO week key serves as a candidate for gathering the line items for that week into the same group. However, if the company adopts a rule to split the aggregation period on January 1st, changing to the ISO method itself would be incorrect.
First, confirm with the reporting recipient whether weeks spanning the year-end should be split or treated as a continuous 7-day period. If compatibility with existing reporting sheets is required, document the method used in those sheets before modifying the formula. In departments that use fiscal years or custom closing days, a design that manages standard ISO weeks and custom business weeks in separate columns can also be considered.
Perform modifications by copying the production sheet, and compare the original line item count with the aggregated total for the few days around the year-end. Verify whether the same week is split into two rows, or conversely, whether week numbers from different years are mixed together. If modifying previous year report values retroactively, obtain agreement from stakeholders regarding the change in aggregation conditions before applying it.
Summary
The rule for determining the start day of the week and the first week is a separate setting. When aggregating using the ISO method, use ISOWEEKNUM or WEEKNUM with type 21, and handle the corresponding week year as well. Determine whether year-spanning line items fall into the same week by checking not only Excel functions, but also against business aggregation definitions.

