Mastering Google Sheets: Calculate Duration in a Flash

Montreal Jul 09, 2026

Calculating duration in Google Sheets is a common task when working with dates and times. Google Sheets provides several functions to help you determine the difference between two dates or times, or to calculate the duration between two events. In this guide, we'll explore how to calculate duration using various Google Sheets functions.

How to Calculate Running Total in Google Sheets
How to Calculate Running Total in Google Sheets

Before we dive into the functions, let's assume we have the following data in cells A1 and B1 respectively: A1 contains the start date (e.g., 1/1/2022) and B1 contains the end date (e.g., 1/5/2022). We'll use these cells as references in our examples.

Google Maps Distance & Duration Calculator - Google Sheets, Build Apps Script Function - Part 14
Google Maps Distance & Duration Calculator - Google Sheets, Build Apps Script Function - Part 14

Calculating Duration Between Two Dates

To find the duration between two dates, we'll use the DAYS function, which calculates the number of days between two dates.

How to Calculate Time in Google Sheets - ModernSchoolBus.com
How to Calculate Time in Google Sheets - ModernSchoolBus.com

Formula: `=DAYS(end_date, start_date)`

Days Between Two Dates

How to Calculate Age in Google Sheets - ModernSchoolBus.com
How to Calculate Age in Google Sheets - ModernSchoolBus.com

To calculate the number of days between the start date (A1) and the end date (B1), use the following formula:

`=DAYS(B1, A1)`

This will return the number of days (4 in our example) between 1/1/2022 and 1/5/2022.

How to Calculate Time in Google Sheets - TeqTog
How to Calculate Time in Google Sheets - TeqTog

Days and Hours Between Two Dates

If you need the duration in days and hours, you can use the DATEDIF function. This function returns the difference between two dates in various formats, including days and hours.

Formula: `=DATEDIF(start_date, end_date, "d")` for days, and `=DATEDIF(start_date, end_date, "h")` for hours

Quick tutorial: How to create dropdowns in Google Sheets (the easy way!)
Quick tutorial: How to create dropdowns in Google Sheets (the easy way!)

To calculate days and hours between the start date (A1) and the end date (B1), use the following formulas:

`=DATEDIF(A1, B1, "d")` for days, and `=DATEDIF(A1, B1, "h")` for hours

the datedif function calculator is displayed in this screenshot from microsoft
the datedif function calculator is displayed in this screenshot from microsoft
Master End-of-Month Calculations with the EOMONTH Function in Google Sheets
Master End-of-Month Calculations with the EOMONTH Function in Google Sheets
How to Calculate Average in Google Sheets
How to Calculate Average in Google Sheets
How to Highlight Duplicates in Google Sheets in 2022 [2 Ways Explained]
How to Highlight Duplicates in Google Sheets in 2022 [2 Ways Explained]
Effortlessly Convert Numbers to Dates in Google Sheets – Step-by-Step Guide!
Effortlessly Convert Numbers to Dates in Google Sheets – Step-by-Step Guide!
4 Ways to Calculate Difference Between Dates on Google Sheets
4 Ways to Calculate Difference Between Dates on Google Sheets
How to Create Progress Bars in Google Sheets (Step-by-Step)
How to Create Progress Bars in Google Sheets (Step-by-Step)
How to Easily Calculate Percentages in Google Sheets: A Step-by-Step Beginner’s Guide
How to Easily Calculate Percentages in Google Sheets: A Step-by-Step Beginner’s Guide
The Ultimate Google Sheets Keyboard Shortcut Cheat Sheet for Beginners & Pros
The Ultimate Google Sheets Keyboard Shortcut Cheat Sheet for Beginners & Pros
How to Use the MONTH Function in Google Sheets
How to Use the MONTH Function in Google Sheets
How to use an Excel spreadsheet in Google Sheets (access from any device, anytime) or Numbers for Ma
How to use an Excel spreadsheet in Google Sheets (access from any device, anytime) or Numbers for Ma
Google Sheets power tips: How to use dropdown lists
Google Sheets power tips: How to use dropdown lists
Basic Formatting in Google Sheets
Basic Formatting in Google Sheets
Learn how to calculate bond yield with ease using the YIELDDISC function in Google Sheets.
Learn how to calculate bond yield with ease using the YIELDDISC function in Google Sheets.
Easily Calculate Stock Levels in Google Sheets with Simple Formulas – Step-by-Step Guide
Easily Calculate Stock Levels in Google Sheets with Simple Formulas – Step-by-Step Guide
Google Sheets
Google Sheets
How to calculate time in Google Sheets: subtract, sum, and hours worked
How to calculate time in Google Sheets: subtract, sum, and hours worked
Master Compound Interest in Google Sheets: Easy Step-by-Step Guide with Example
Master Compound Interest in Google Sheets: Easy Step-by-Step Guide with Example
6 Crazy Google Sheets Formulas You Should Know
6 Crazy Google Sheets Formulas You Should Know
the google spreadsheet dashboard is shown in this screenshot
the google spreadsheet dashboard is shown in this screenshot

This will return 4 days and 0 hours for the days, and 12 hours for the hours between 1/1/2022 and 1/5/2022.

Calculating Duration Between Two Times

To find the duration between two times, we'll use the TIME function, which calculates the time difference between two time values.

Formula: `=TIME(end_time, "0:0:0") - TIME(start_time, "0:0:0")`

Time Duration Between Two Times

To calculate the time duration between the start time (e.g., 9:00 AM in cell A1) and the end time (e.g., 5:00 PM in cell B1), use the following formula:

`=TIME(B1, "0:0:0") - TIME(A1, "0:0:0")`

This will return the time duration (8 hours) between 9:00 AM and 5:00 PM.

In practice, you can apply these formulas to various date and time scenarios, such as calculating project durations, event timelines, or even determining how long it takes for a process to complete. Mastering these functions will help you streamline your workflow and gain valuable insights from your data in Google Sheets.