How to Calculate the Time Difference in Minutes in Excel – 3 Methods

This is an overview.

Sample Data


Method 1 – Using an Excel Formula to Calculate Time Difference in Minutes

Step 1: Find the Time Difference in Dates

  • Enter the following formula.
= (C5-B5)

Handy Approaches to Calculate Time Difference in Minutes in Excel

It will calculate the difference between the two dates in days and show the result with decimal places.

Handy Approaches to Calculate Time Difference in Minutes in Excel

Step 2: Use a Formula to Calculate the Time Difference

  • Enter the following formula to convert the previous output into minutes.
=(C5-B5)*24*60

Handy Approaches to Calculate Time Difference in Minutes in Excel

  • Press Enter to see the results in minutes.

Handy Approaches to Calculate Time Difference in Minutes in Excel

  • Drag down the Fill Handle to see the result in the rest of the cells.

Handy Approaches to Calculate Time Difference in Minutes in Excel

Read More: How to Subtract Date and Time in Excel


Method 2 – Combining the DAYS, HOUR, and SECOND Functions to Calculate the Time Difference

Step 1: Find the Difference in Days

=DAYS(C5,B5)

Handy Approaches to Calculate Time Difference in Minutes in Excel

### is displayed, as no specific format is defined.

Handy Approaches to Calculate Time Difference in Minutes in Excel

  • Click Number.

Handy Approaches to Calculate Time Difference in Minutes in Excel

The number of days will be displayed.

Handy Approaches to Calculate Time Difference in Minutes in Excel

  • Drag down the Fill Handle to see the result in the rest of the cells.

Handy Approaches to Calculate Time Difference in Minutes in Excel

Step 2: Count the Time Difference in Minutes

  • Enter the following formula with the MINUTE function to calculate the minute difference on a particular day (10:30 A.M. to 10:53 A.M.).
=MINUTE(C5-B5)

Handy Approaches to Calculate Time Difference in Minutes in Excel

The minute difference: 23 minutes is displayed in E5.

Handy Approaches to Calculate Time Difference in Minutes in Excel

  • Drag down the Fill Handle to see the result in the rest of the cells.

Handy Approaches to Calculate Time Difference in Minutes in Excel

Step 3: Apply the SECOND Function

=SECOND(C5-B5)

Handy Approaches to Calculate Time Difference in Minutes in Excel

You will see the time difference in seconds.

Handy Approaches to Calculate Time Difference in Minutes in Excel

  • Drag down the Fill Handle to see the result in the rest of the cells.

Handy Approaches to Calculate Time Difference in Minutes in Excel

Step 4: Use the HOUR Function

=HOUR(C5-B5)

Handy Approaches to Calculate Time Difference in Minutes in Excel

The time difference in hours is displayed in E5.

Handy Approaches to Calculate Time Difference in Minutes in Excel

  • Drag down the Fill Handle to see the result in the rest of the cells.

Handy Approaches to Calculate Time Difference in Minutes in Excel

Step 5: Apply the Final Formula

  • Enter the following formula.
=D5*24*60 +E5*60 + F5 + G5/60

Handy Approaches to Calculate Time Difference in Minutes in Excel

You will see the time difference in minutes.

Sample Data

  • Drag down the Fill Handle to see the result in the rest of the cells.

Sample Data

Read More: How to Calculate Difference Between Two Times in Excel


Method 3 – Running a VBA Macro to Calculate the Time Difference in Minutes

Step 1: Create a Module

  • Press  Alt  F11  to open the VBA Macro.
  • Click the Insert tab.
  • Select Module.

Sample Data

Step 2: Enter the VBA code

  • Enter the following VBA code.
Sub TimeDifference()
'Define variables
    Dim MinDifference As Variant
    Dim StartTime As Variant
    Dim EndTime As Variant
'Insert Input box to select start time
Set StartTime = Application.InputBox("Select Start Time:", "ExcelDemy", RngText, , , , , 8)
'Insert Input box to select start time
Set EndTime = Application.InputBox("Select End Time:", "ExcelDemy", RngText, , , , , 8)
'Subtract times
MinDifference = EndTime - StartTime
'Apply formula in a cell to get the result in minutes
Range("E5").Value = MinDifference * 24 * 60
End Sub

Sample Data

Step 3: Run the Program

  • Save the program and press  F5  to run it.
  • Select start time.
  • Press Enter.

Sample Data

  • Select end time.
  • Click OK.

Sample Data

  • The time difference in minutes in is displayed in E5.

Sample Data

Read More: How to Subtract Minutes from Time in Excel


Download Practice Workbook

Download the practice workbook.


Related Articles


<< Go Back to Subtract Time | Calculate Time | Date-Time in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Bhubon Costa
Bhubon Costa

Bhubon Costa, B.Sc. in Naval Architecture & Marine Engineering from Bangladesh University of Engineering & Technology, has worked with the ExcelDemy since 2021. Currently, he has been working as a reviewer. Notably, he has written over 90 articles and led several VBA content development teams. He has a great passion for the fields of data analytics and data science. His areas of expertise include Excel VBA, Power Query, Pivot Table, Power BI, MySQL, PostgreSQL, machine learning, and Python... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo