Excel Formulas to Calculate Total Hours that Fall Between Two Times!!
Tags: excelformula, excelformulas
Published: 2021-05-29 07:44:24

---
title: Excel Formulas to Calculate Total Hours that Fall Between Two Times!!
published: true
date: 2021-05-28 15:19:54 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-calculate-total-hours-that-fall-between-two-times/
---

For instance, you need to calculate the **total hours between two-time ranges in Excel**. How could you get them quickly? Today I introduce you to some formulas to solve this problem. Let’s get into the article!! Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

[![Total hours between times](https://geekexcel.com/wp-content/uploads/2021/05/Total-hours-between-times.png)](https://geekexcel.com/excel-formulas-to-calculate-total-hours-that-fall-between-two-times/total-hours-between-times/#main)<figcaption id="caption-attachment-45745">Total hours between times</figcaption>

## General Formula:

- If you want to calculate the total number of hours between a start and end time that overlap a period of interest with a given start and end time,  you can use the below formula.

**=[IF](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)(B5<C5,[MAX](https://geekexcel.com/how-to-use-excel-max-function-in-office-365-with-examples/)(0,[MIN](https://geekexcel.com/how-to-use-excel-min-function-in-office-365-with-examples/)(C5,upper)-MAX(B5,lower)),MAX(0,upper-B5)+MAX(0,C5-lower))**

## Syntax Explanations:

- **IF** – The Excel [**IF Function**](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/) will help to return one value for a TRUE result, and another for a FALSE result.
- **MAX** – This function returns the largest numeric value from the range of input values. Read more on the [**MAX function**](https://geekexcel.com/how-to-use-excel-max-function-in-office-365-with-examples/).
- **MIN** – In Excel, the **[MIN Function](https://geekexcel.com/how-to-use-excel-min-function-in-office-365-with-examples/)** returns the smallest numeric value from the range of input values.
- **Minus Operator (-)** – This symbol will help to subtract any two values.
- **Comma symbol (,)** – It is a separator that helps to separate a list of values.
- **Parenthesis ()** – The main purpose of this symbol is to group the elements.

## Practical Example:

Let’s consider the below example image.

- Here, we will enter the input values in **Column B** and **Column C**.
- Now we are going to find out the total number of hours between a start and end time.

![Input Ranges](https://geekexcel.com/wp-content/uploads/2021/05/Input-Ranges-56.png)<figcaption id="caption-attachment-45747">Input Ranges</figcaption>

- Select any cell and type the above-given formula.

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/05/Enter-the-formula-96.png)<figcaption id="caption-attachment-45746">Enter the formula</figcaption>

- Finally, press  **ENTER**  to get the result out, if you need, drag the fill handle over range to apply the formula.

![Result](https://geekexcel.com/wp-content/uploads/2021/05/Result-90.png)<figcaption id="caption-attachment-45748">Result</figcaption>

## Verdict:

From this short tutorial, you can get some clarification on **how to calculate the total hours that fall between two times in Excel**. I hope you like this article. Let me know if you have any **doubts** regarding this article or any other Excel/VBA topic.

Thank you so much for visiting  **[Geek Excel](https://geekexcel.com/)!! **If you want to learn more helpful formulas, check out [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!! **

### Related Articles:

- **[Excel Formulas to Find the Time Difference in Hours as Decimal Value!!](https://geekexcel.com/excel-formulas-to-find-the-time-difference-in-hours-as-decimal-value/)**
- **[Excel Formulas to Check the Date is within the Last N Days from Today!!](https://geekexcel.com/excel-formulas-to-check-the-date-is-within-the-last-n-days-from-today/)**
- **[How to Find the Last Column of Data in Excel Office 365?](https://geekexcel.com/how-to-find-the-last-column-of-data-in-excel-office-365/)**
- **[How to Search for a Value in All Tabs in Excel Office 365?](https://geekexcel.com/how-to-search-for-a-value-in-all-tabs-in-excel-office-365/)**