4.5 C
London
Thursday, December 19, 2024
HomeSoftware TutorialsGoogle SheetsHow to Calculate Day of the Year in Google Sheets

How to Calculate Day of the Year in Google Sheets

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following formulas to calculate the day of the year in Google Sheets:

Formula 1: Calculate Day of the Year for Today

=TODAY()-DATE(YEAR(TODAY()),1,0)

This formula will return the day of the year for the current day.

Formula 2: Calculate Day of the Year for Date in Cell

=A2-DATE(YEAR(A2),1,1)+1

This formula will return the day of the year for the date in cell A2.

Formula 3: Calculate Date for Day of the Year

=DATE(2022,1,0)+A2

This formula will return the date that corresponds to the day of the year in cell A2.

The following examples show how to use each formula in practice.

Example 1: Calculate Day of the Year for Today

This article was written on 11/2/2022. To find the day of the year for today, we can type the following formula into Google Sheets:

=TODAY()-DATE(YEAR(TODAY()),1,0)

The following screenshot shows how to use this formula in practice:

day of year for today in Google Sheets

We can see that 11/2/2022 is the 306th day of the year.

Example 2: Calculate Day of the Year for Date in Cell

To find the day of the year for a date in cell A2, we can type the following formula into Google Sheets:

=A2-DATE(YEAR(A2),1,1)+1

The following screenshot shows how to use this formula in practice:

day of year for date in cell in Google Sheets

We can see that 3/31/2022 is the 90th day of the year.

Example 3: Calculate Date for Day of the Year

To find the date that corresponds to the nth day of the year in cell A2, we can type the following formula into Google Sheets:

=DATE(2022,1,0)+A2

The following screenshot shows how to use this formula in practice:

We can see that the 90th day of the year in 2022 is 3/31/2022.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

How to Add & Subtract Years from Date in Google Sheets
How to Sort by Date in Google Sheets
How to AutoFill Dates in Google Sheets

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories