Google Sheets WEEKNUM Function: Syntax, Examples & Tips

The WEEKNUM function returns the week number of a specific date, helping to identify the week of the year for scheduling or analysis.
Google Sheets
WEEKNUM(date, [type])

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is a WEEKNUM?
  3. A Practical Example
  4. WEEKNUM Formula
  5. Result of the Formula
  6. Why Use WEEKNUM?
  7. Key Takeaways:
  8. Example use case

Parameters

date:
The date for which you want to find the week number. This can be a date value, a cell reference containing a date, or a formula that returns a date.

type:
An optional parameter that specifies the system used to determine the week number. It can be 1 (default, where weeks start on Sunday) or 2 (where weeks start on Monday).

What is a WEEKNUM?

The WEEKNUM function in Google Sheets is a useful tool that allows you to determine the week number of a specific date within a year. This function is particularly helpful for organizing data by weeks, analyzing trends over time, or generating reports that require weekly summaries. The WEEKNUM function can return the week number based on different systems, allowing for flexibility depending on your needs.

In simpler terms, WEEKNUM helps you find out which week of the year a particular date falls into.

A Practical Example

Imagine you are tracking sales data throughout the year and want to analyze weekly performance:

Sales Data Table:

DateSales
2023-01-01500
2023-01-08700
2023-01-15600
2023-01-22800

You want to add a column that indicates the week number for each sales entry.

WEEKNUM Formula

To achieve this, you would use the WEEKNUM function as follows:

Google Sheets
=WEEKNUM(A2, 1)

In this formula:

  • A2 is the cell containing the date from the Sales Data Table.
  • 1 indicates that the week starts on Sunday (you can use 2 if you want the week to start on Monday).

Result of the Formula

When you apply the WEEKNUM formula to the Sales Data Table, the output would look like this:

DateSalesWeek Number
2023-01-015001
2023-01-087002
2023-01-156003
2023-01-228004

In this case, the WEEKNUM function calculates the week number for each date, allowing you to easily see the weekly performance of sales.

Why Use WEEKNUM?

WEEKNUM is beneficial because it simplifies the process of organizing and analyzing data by weeks. It allows you to quickly categorize dates into their respective weeks, making it easier to identify trends and patterns over time. This function is especially useful for businesses that operate on a weekly schedule or for anyone looking to analyze data on a weekly basis.

Key Takeaways:

  • WEEKNUM: A Google Sheets function that returns the week number of a given date.
  • Flexible: Can specify the starting day of the week, accommodating different reporting needs.
  • Data Organization: Helps in categorizing and analyzing data by weeks, enhancing data insights.
  • Common Use Cases: Ideal for sales tracking, project management, and any scenario where weekly analysis is necessary.

WEEKNUM is an essential function for anyone working with date-related data in Google Sheets, providing a straightforward way to enhance data analysis and reporting capabilities.

Happy spreadsheeting!

Example use case

You have a table with dates in Column A and sales figures in Column B. By using the WEEKNUM formula, you can quickly categorize sales data by week number, allowing for easy analysis of weekly performance trends and comparisons across different weeks.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.