The Google Sheets WEEKNUM function returns the week number of a given date within the year, using the syntax WEEKNUM(date, [type]). For example, =WEEKNUM(DATE(2025,1,6)) returns 2, because January 6, 2025 falls in the second week of the year. The optional type argument controls which day the week starts on, giving you flexibility for different calendar conventions.
What Is WEEKNUM Used For?
WEEKNUM is a date function that helps you group, compare, or label dates by their position in a calendar year. Common uses include:
- Tracking weekly sales or project milestones
- Creating weekly reports or dashboards
- Calculating the number of weeks between two dates
- Sorting or filtering data by week number
It is part of Google Sheets’ Date category, alongside functions like TODAY, DATE, and WEEKDAY. Unlike Excel, which has multiple week-numbering systems (WEEKNUM, ISOWEEKNUM), Google Sheets only has WEEKNUM, but its type parameter covers most common conventions.
Syntax and Arguments Explained
The function takes two arguments:
- date (required): The date you want to evaluate. This can be a cell reference containing a date, a date returned by another function like
DATE(), or a text string like “1/6/2025” that Google Sheets recognizes as a date. - type (optional): A number that determines which day the week starts on. The default is 1, meaning Sunday. The available values are:
- 1 – Week starts on Sunday (default)
- 2 – Week starts on Monday
- 11 – Week starts on Monday (ISO 8601)
- 12 – Week starts on Tuesday
- 13 – Week starts on Wednesday
- 14 – Week starts on Thursday
- 15 – Week starts on Friday
- 16 – Week starts on Saturday
Note: Types 11-17 are ISO-based, meaning they follow the ISO 8601 standard where week 1 is the week containing the first Thursday of the year. Types 1-7 are the traditional US-style numbering where week 1 is the week containing January 1.
How to Use WEEKNUM: Step-by-Step Examples
To see WEEKNUM in action, try these examples in a blank Google Sheet:
- In cell A1, enter a date, e.g.,
3/15/2025. - In cell B1, enter the formula
=WEEKNUM(A1). This returns 12, because March 15, 2025 is the 12th Sunday-start week of the year. - In cell B2, enter
=WEEKNUM(A1, 2). This returns 11, because with Monday-start weeks, the same date falls in week 11.
You can also use a date directly: =WEEKNUM(DATE(2025,12,31)) returns 1 (since December 31, 2025 falls in week 1 of 2026 under the default system, which is a quirk of the US convention).
Choosing the Right Type Argument
The type argument is crucial for accurate results. Here’s how to decide:
- US business or academic calendars often start the week on Sunday – use type 1.
- International business or ISO standards start on Monday – use type 2 or 11.
- Custom workweeks (e.g., a team that starts on Thursday) – use types 12-16.
For ISO 8601 compliance (used widely in Europe and for week numbers in many software systems), type 11 is the safest choice because it ensures week 1 is the week with the first Thursday. Type 2 also starts on Monday but uses the simpler rule that week 1 contains January 1, which can produce a week 1 that is only one day long.
Common Problems and How to Fix Them
Here are frequent issues users encounter:
- #VALUE! error: This occurs if the date argument is not a valid date. For example,
=WEEKNUM("hello")returns an error. Ensure the date is a real date or a text string that Sheets can parse. - Wrong week number at year boundaries: The default type 1 can return 1 for dates in late December that belong to the next year’s first week. If you need consistent ISO weeks, use type 11.
- Text dates not recognized: If you type a date as text like “2025-01-06”, Sheets usually parses it, but if it doesn’t, wrap it in
DATEVALUE()or useDATE().
WEEKNUM vs. ISOWEEKNUM and Other Functions
Google Sheets does not have a separate ISOWEEKNUM function (unlike Excel). Instead, you use WEEKNUM(date, 11) for ISO weeks. If you need the day of the week, use WEEKDAY(date, [type]). For example, =WEEKDAY("1/6/2025", 2) returns 1, meaning Monday (where Monday=1).
To calculate the number of weeks between two dates, you can subtract the WEEKNUM values, but be careful at year boundaries. A more robust approach is to use =INT((B1-A1)/7) where A1 and B1 are dates, but that counts 7-day intervals, not calendar weeks.
Practical Use Cases and Tips
Here are some real-world scenarios where WEEKNUM shines:
- Weekly sales aggregation: Use
=WEEKNUM(A2, 2)in a helper column, then use a pivot table to sum sales per week. - Project timeline: Label tasks with week numbers to see which week a milestone falls in.
- Attendance tracking: Count how many weeks an employee was present by filtering on week numbers.
Tip: Always use a consistent type across your entire sheet to avoid confusion. If you share the sheet with international collaborators, consider using type 11 to align with ISO standards.
Frequently Asked Questions
Does Google Sheets have an ISOWEEKNUM function?
No, Google Sheets does not have a separate ISOWEEKNUM function. To get ISO week numbers, use WEEKNUM(date, 11). This follows the ISO 8601 standard where weeks start on Monday and week 1 contains the first Thursday of the year.
Why does WEEKNUM return 1 for December 31, 2025?
With the default type 1 (Sunday start), the week containing January 1 is considered week 1. December 31, 2025 falls on a Wednesday, and the Sunday of that week is December 28, 2025, which is in 2025. However, because the week that starts on December 28 includes January 1, 2026, that entire week is counted as week 1 of 2026. So WEEKNUM returns 1 for December 31, 2025. To avoid this, use type 11 for ISO weeks.
Can I use WEEKNUM with a date stored as text?
Yes, if the text is a recognized date format (e.g., “1/6/2025” or “2025-01-06”), WEEKNUM will parse it automatically. If not, you can use DATEVALUE() to convert it first, like =WEEKNUM(DATEVALUE("January 6, 2025")).
What is the difference between type 2 and type 11?
Both start the week on Monday, but they differ in how week 1 is defined. Type 2 uses the rule that week 1 is the week containing January 1. Type 11 uses the ISO rule that week 1 is the week containing the first Thursday of the year. This means type 11 can sometimes have a week 1 that starts in the previous year, while type 2 always has January 1 in week 1.
How do I get the week number for a date in a different year?
WEEKNUM only returns the week number within the year of the given date. If you need a continuous week count across years, you can calculate it with a formula like =YEAR(A1)*100 + WEEKNUM(A1, 2) to create a week identifier like 202512, but this is not a standard function.
Related
- Garage Door Repair Log Excel Template Guide
- How to Write on a Casio Calculator (fx-991EX, ClassWiz & More)
- Random 5 Digit Number: How to Generate One
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Creating a Cover Page in Word: Steps and Design TipsTo create a cover page in Microsoft Word, open the Insert tab, choose Cover Page in the Pages…
- Excel Dropdown Lists: How to Create and Manage ThemYes, Excel has dropdown lists. In Microsoft Excel for Microsoft 365 on Windows, you can create one with…
- How to Change View Settings in Outlook for a Better InboxTo change how your inbox looks, open Outlook’s view controls and adjust the message list, reading pane, sorting,…
- How Excel Goal Seek Works: Steps, Examples, and LimitsExcel Goal Seek works backward from a formula result: you specify the result you want, and Excel adjusts…
- How to Double Space in Word: A Step-by-Step GuideTo double-space text in Microsoft Word, select the text, then choose Home > Line and Paragraph Spacing >…
- Can You Automate Goal Seek in Excel? Methods That WorkYes. In Excel for Microsoft 365 on Windows, you can automate Goal Seek with a VBA macro; in…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.