How to Count Days from a Specific Date to Today in Google Sheets

Google Sheets makes it easy to calculate the number of days between any given date and today’s current date. This is especially useful for tracking how long it’s been since an event occurred, like a task started, a ticket was created, or a project was initiated.

In this article, we will walk you through the best ways to count days from a specific date to today using simple formulas.

Key Takeaways

Steps to count the number of days from a past date using the TODAY function in Google Sheets:

➤ Use a dataset with past dates in Column B (e.g., “2024-12-01”)
➤ In Column C, next to the first date (e.g., C2), enter the formula: =TODAY() – B2
➤ Press Enter. This will return the number of days between the date in B2 and today
➤ Format the cell as a number if needed by going to Format >> Number >> Number
➤ Drag the fill handle down to apply the formula to the remaining rows
➤ The values will automatically update each day as the TODAY function reflects the current date daily

overview image

Download Practice Workbook
1

Use the TODAY Function to Count Days from a Date to Today in Google Sheets

One of the simplest and most dynamic ways to calculate the number of days that have passed since a given date is to use the TODAY function in Google Sheets. This function automatically returns the current date and updates daily, making it ideal for tracking progress, follow-ups, or deadlines.

We’ll use the following dataset of tasks with their start dates to demonstrate this method:

Use the TODAY Function to Count Days from a Date to Today in Google Sheets

The “Days Since Start” column will be dynamically calculated using the TODAY() function.

Steps:

➤ Open your Google Sheet with a column containing the start dates (e.g., Column B).
➤ Click on cell C2 next to the first start date.
➤ Type the formula:

=TODAY() – B2

➤ Press Enter. The result will be the days between the start date and today.


➤ Drag the fill handle down from C2 to apply the formula to the rest of the column.


➤ If the value appears as a date, go to Format >> Number >> Number to display it as a number.


2

Calculate Days Since a Date Using the DATEDIF Function in Google Sheets

The DATEDIF function is another effective way to calculate the number of days between two dates. It stands for “Date Difference” and can return results in days, months, or years, depending on the unit specified. When paired with the TODAY function, it becomes a powerful way to calculate the exact number of days that have passed since any start date.

We’ll continue using the same 10-row dataset with tasks and their start dates:

Steps:

➤ Click on cell C2, where the first day difference will be calculated.
➤ Type the formula:

=DATEDIF(B2, TODAY(), “D”)

➤ Press Enter.

Calculate Days Since a Date Using the DATEDIF Function in Google Sheets

This tells Google Sheets to calculate the number of days (“D“) between the start date in B2 and today’s date.

➤ Drag the fill handle down to C11 to copy the formula for all the tasks.
➤ The “Days Since Start” column will now show the number of days that have passed since each task’s start date.

The benefit of DATEDIF() over plain subtraction is that it explicitly defines the unit of difference, which is helpful if you want to calculate months or years instead.


3

Count Days Since Each Date Using the ARRAYFORMULA Function in Google Sheets

If you’re working with multiple rows and want to calculate days since a past date without writing a formula in every row, the ARRAYFORMULA function is your best choice. It processes entire ranges at once, making your sheet cleaner and more efficient.

We’ll continue using the same dataset, where Column A contains the start dates. In this method, we’ll populate Column B with the number of days passed.

Steps:

➤ Make sure your date values are in Column B from B2 to B11
➤ Click on cell C2
➤ Enter this formula:

=ARRAYFORMULA(IF(A2:A11<>””, TODAY() – B2:B11, “”))

Count Days Since Each Date Using the ARRAYFORMULA Function in Google Sheets

Explanation
ARRAYFORMULA function allows the formula to run over an entire range. The IF function ensures that it only calculates for non-empty cells. TODAY() - A2:A11 subtracts each date from today’s date to give the number of days passed.

➤ Press Enter.
Column B will now instantly show the day difference for all the rows with dates.

This method is ideal for dynamic logs and task trackers that grow over time.


4

Automate Days Calculation Using Google Apps Script

You can use Google Apps Script to calculate how many days have passed from a list of start dates to today’s date. This is ideal if you’re managing a dynamic sheet where you want the data to update programmatically.

Steps:

➤ Open your Google Sheet
➤ Click on Extensions >> Apps Script

Automate Days Calculation Using Google Apps Script

➤ Delete any placeholder code and paste the following:

function calculateDaysSinceDate() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Table4"); // <- Use the actual sheet name
if (!sheet) {
throw new Error("Sheet not found. Please check the sheet name.");
}
var lastRow = sheet.getLastRow();
var today = new Date();
for (var i = 2; i <= lastRow; i++) {
var startDateRaw = sheet.getRange(i, 2).getValue();
var startDate = new Date(startDateRaw);
if (!isNaN(startDate.getTime())) {
var diffInTime = today.getTime() - startDate.getTime();
var diffInDays = Math.floor(diffInTime / (1000 * 3600 * 24));
sheet.getRange(i, 3).setValue(diffInDays); // Write to Column C
}
}
}

➤ Click the floppy disk icon to save the script


➤ Then click the Run button for calculateDaysSinceDate

➤ If prompted, authorize the script

Column C will now populate with the number of days from each date in Column B to today.


Frequently Asked Questions

How do I calculate the number of days between a date and today in Google Sheets?

You can subtract the earlier date from the TODAY() function using a simple formula like =TODAY() – A2. This gives you the number of days between that date and today. The result updates automatically each day.

Why does my formula return a weird number or error when subtracting dates?

If your formula returns a strange number or error, it’s likely because the referenced cell isn’t formatted as a valid date. Make sure the date column is set to “Date” format under Format >> Number.

Can I automatically update days passed without manually refreshing the sheet?

Yes, the TODAY() function updates automatically every time the sheet recalculates or is reopened. You don’t need to refresh anything manually, as your “days since” value will always be current.

What if I want to ignore blank cells when calculating days from a date?

Wrap your formula in an IF statement like =IF(A2<>””, TODAY() – A2, “”). This ensures blank cells won’t show errors or unnecessary values and keeps your dataset clean.

Can Google Sheets Apps Script be used to calculate days from a date to today?

Yes, Apps Script can loop through rows and subtract each date from the current date using JavaScript. This is especially useful for bulk operations or automating updates without formulas.


Wrapping Up

Tracking the number of days between a given date and today is a practical need in many workflows, from project management to attendance tracking and habit logs. Google Sheets offers multiple ways to achieve this, whether through simple built-in functions like the TODAY function and subtraction, dynamic formulas like the DATEDIF function, or even automation using Apps Script.

Now that you’ve seen different techniques, choose the one that fits your use case, and effortlessly simplify your tracking process.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo