EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Certification Courses
  • 120+ Courses All in One Bundle
  • Login
Home Excel Excel Resources Excel Tips Time Difference in Excel
Secondary Sidebar
Excel Functions
  • Excel Tips
    • Recover Document in Excel
    • Excel Shortcut to Select Row
    • Excel Header Row
    • Excel Insert Button
    • Excel Translate
    • Budget in Excel
    • KPI Dashboard in Excel
    • Blank Invoice Excel Template
    • Write Formula in Excel
    • Auditing Tools in Excel
    • Autofit Row Height in Excel
    • Formatting Text in Excel
    • Add Rows in Excel Shortcut
    • Divide Cell in Excel
    • Compare Two Columns in Excel for Matches
    • Excel Troubleshooting
    • Unprotect Excel Workbook
    • Subtract Date in Excel
    • Carriage Return in Excel
    • Negative Numbers in Excel
    • Worksheets in Excel
    • Excel Match Multiple Criteria
    • Exponential Moving Average Formula
    • Sentence Case in Excel
    • Excel Reverse Order
    • Excel Timesheet Template
    • Weighted Average in Excel
    • CTRL Shift-Enter in Excel
    • Excel Expense Tracker
    • INDEX MATCH Function in Excel
    • Percent Change in Excel
    • Drag and Drop in Excel
    • Shade Alternate Rows in Excel
    • Excel Database Template
    • Inverse Matrix in Excel
    • New Line in Excel Cell
    • Format Cells in Excel
    • Excel Text with Formula
    • Project Management Template in Excel
    • Vlookup vs Index Match
    • Embedded in Excel
    • Count Colored Cells in Excel
    • Excel Hacks
    • Column Header in Excel
    • Database Function in Excel
    • Excel Spell Check
    • Linear Interpolation in Excel
    • Convert Excel to CSV
    • Excel Not Responding
    • Delta Symbol in Excel
    • Excel Mortgage Calculator
    • Excel Show Formula
    • Break Links in Excel
    • VLOOKUP Examples in Excel
    • Alternate Row Color Excel
    • Checklist in Excel
    • Microsoft Office Tips
    • Excel vs Access
    • Excel Change Case
    • Count Characters in Excel
    • Formula Bar in Excel
    • Invoice Template in Excel
    • Find and Replace in Excel
    • PowerPivot in Excel
    • Wildcard in Excel
    • Line Break in Excel
    • NULL in Excel
    • Text Formula in Excel
    • Family Tree in Excel
    • Insert Calendar in Excel
    • Page Setup in Excel
    • Search For Text in Excel
    • Switching Columns in Excel
    • 3D Cell Reference in Excel
    • Roadmap Template in Excel
    • Cell References in Excel
    • Excel Automation
    • Matching Columns in Excel
    • Evaluate Formula in Excel
    • How to Find Mean in Excel
    • How to Add Cells in Excel
    • Project Timeline in Excel
    • TODAY Formula in Excel
    • Poisson Distribution in Excel
    • YEAR Formula in Excel
    • REPLACE Formula in Excel
    • Create Spreadsheet in Excel
    • SEARCH Formula in Excel
    • HYPERLINK Formula in Excel
    • Pivot Table with Multiple Sheets
    • COLUMNS Formula in Excel
    • DAY Formula in Excel
    • RIGHT Formula in Excel
    • INDIRECT Formula in Excel
    • Excel IRR Formula
    • Pivot Table Sort
    • OR Formula in Excel
    • Pivot Table Formula in Excel
    • How to Edit Drop Down List in Excel?
    • WEEKDAY Formula in Excel
    • Chart Wizard in Excel
    • Time Difference in Excel
    • Lookup Table in Excel
    • SUBTOTAL Formula in Excel
    • LOOKUP Formula in Excel
    • Themes in Excel
    • Group Worksheets in Excel
    • Excel ISNUMBER Formula
    • 3D Maps in Excel
    • VLOOKUP Tutorial in Excel
    • Moving Columns in Excel
    • Grouping Columns in Excel
    • Excel Formula of Percentage
    • Excel Leading Zeros
    • Timesheet in Excel
    • Nested IF Formula in Excel
    • SUMIF Formula in Excel
    • Concatenation in Excel
    • Excel Insert Page Break
    • LEN Formula in Excel
    • Insert Comment in Excel
    • Excel Print
    • Fractions in Excel
    • Excel Add a Column
    • Borders in Excel
    • Excel Sum by Color
    • Excel vs Google Sheets
    • Calculate Percentage Increase in Excel
    • Excel Format Phone Numbers
    • Excel Search Box
    • Excel vs CSV
    • Excel vs Numbers
    • Excel Concatenate Date
    • Excel Bullet Points
    • Calculate Compound Interest in Excel
    • Find External Links in Excel
    • Excel Comma Style
    • Excel Remove Leading Spaces
    • Combine First and Last Name in Excel
    • How to Calculate Ratio in Excel
    • SUMPRODUCT Function with Multiple Criteria
    • Create Excel Template
    • Excel Greater than or Equal
    • Excel Keyboard Shortcuts
    • Excel Row vs Excel Column
    • Excel Operators
    • Excel Text Compare
    • Excel Uppercase Function
    • Excel Auto Numbering
    • Watermark in Excel
    • Excel Delete Row Shortcut
    • Excel Word Count
    • Row Count in Excel
    • Excel Grade Formula
    • Excel Percentage Difference
    • Excel Rows and Columns
    • Excel Group
    • Excel Move Columns
    • Excel Row Height
    • Excel Sparklines
    • Excel Drawing a line
    • Multiple IFS in Excel
    • Excel Strikethrough
    • Numbering in Excel
    • Share Excel Workbook
    • Excel Shortcut For Merge Cells
    • Excel OneDrive
    • Excel Track changes
    • Excel Hide Formula
    • Excel Filter Shortcuts
    • Excel 3D Reference
    • Protect Excel Workbook
    • Excel Moving Averages
    • Excel Row Limit
    • Excel Absolute Value
    • Excel Print Area
    • Excel Format Painter
    • Excel Separate text
    • Excel Autofit
    • Excel Columns to Rows
    • Excel Paste Shortcut Option
    • Excel Rows to Columns
    • Excel Insert Row Shortcut
    • Excel Extensions
    • Excel Unmerge Cells
    • Divide in Excel Formula
    • Excel Compare Two Columns
    • Not Equal To Excel
    • Excel Remove Duplicates
    • Excel Remove Spaces
    • Excel Calculate Age
    • Copy Excel Sheet
    • Excel Conditional Formatting Based on Another Cell Value
    • Excel Cell Reference
    • Excel Split Cell
    • Excel Circular Reference
    • Highlight Every Other Row in Excel
    • Errors in Excel
    • Excel Delete Pivot Table
    • Excel Pivot Table
    • Subtraction in Excel
    • Count Unique Values in Excel
    • Excel Highlight Duplicates
    • Excel Data Formatting
    • Random Numbers in Excel
    • Basic Excel Formulas
    • Page Numbers in Excel
    • Excel CAGR Formula
    • Excel Combine cells
    • IFERROR with VLOOKUP in Excel
    • Column Sort in Excel
    • Print Comments in Excel
    • Cheat Sheet of Excel Formulas
    • Remove Hyperlinks in Excel
    • Excel Drop Down List
    • Remove (Delete) Blank Rows in Excel
    • Relative Reference in Excel
    • Subscript in Excel
    • Superscript in Excel
    • Excel Insert Multiple Rows
    • Excel Absolute Reference
    • Unhide Columns in Excel
  • Excel Functions (12+)
  • Excel Tools (114+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (14+)
  • Lookup and Reference Functions in Excel (35+)
  • Maths Function in Excel (47+)
  • TEXT and String Functions in Excel (26+)
  • Date and Time Function in Excel (24+)
  • Statistical Functions in Excel (59+)
  • Information Functions in Excel (4+)
  • Excel Charts (56+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (15+)
  • Excel Formula and Functions (22+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • EXCEL COURSE
  • Online Excel Data Analysis Course
  • Excel for Finance Course

Time Difference in Excel

By Madhuri ThakurMadhuri Thakur

Time Difference in Excel 2

Time Difference in Excel (Table of Contents)

  • Time Difference in Excel
  • How to Implement Time Difference in Excel?

Time Difference in Excel

  • Time is a numeric value that is being formatted as time, but when we subtract one value from another value, it gives a decimal number, and again we have to format it as time.
  • The mathematical formula is End Time – Start Time.
  • We can simply subtract the start time from the end time to get the difference of the time.

Today, we will work in various ways to calculate the Difference between two-time values.

How to Implement Time Difference in Excel?

In MS Excel, we can implement the Time value in a cell in 3 methods:

Method 1

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

Go to the Home tab, and in Number Group, select Click on Time from the drop-down menu to change the cell value into a Time value.

All in One Excel VBA Bundle(120+ Courses, 30+ Projects)
Basic ExcelAdvanced ExcelVBA & MacrosExcel Dashboards
Pivot TablesStatistical FunctionsFinancial FunctionsCharts & Graphs
Price
View Courses
120+ Online Courses | 30+ Projects | 500+ Hours | Verifiable Certificates | Lifetime Access
4.9 (64,639 ratings)

time in excel 1-1

Method 2

Go to the Home tab in Number Group and Click on the dialog box launcher icon as shown below.

time in excel 1-2

A dialog box of “Format Cells” will open. We need to select the Time option.

time in excel 1-3

Select the type of time format as required. By default, it is 13: 30: 55. Then Click on OK.

Method 3

Select the Cell.

time in excel 1-4

Press the right-click button on the mouse. Click on the Format Cells Option.

time in excel 1-5

A “Format Cells” dialog box will open. We have to click on the Time option.

Select type of time format as per requirement. Then Click on OK.

time in excel 1-6

You can download this Time -Difference-Excel-Template here – Time -Difference-Excel-Template

Calculating the Time Difference – Example #1

If we want to calculate the time difference between 6.00 pm and 9.00 PM, just deduct 9.00 pm and 6.00 pm.

In the figure below, we will find out the time difference.

time example 1-2

Select Cell B4.

time example 1-1

Write the Formula as “= B3-B2 “.

time 1-3

Press Enter Button and Result will show as 3:00 AM.

time 1-4

Go to the Home tab, an in Number Group, select on the Drop-Down menu. Click on time to change the cell value into a Time value.

time 1-5

The result will show as 3:00:00.

time 1-6

This can be done in an alternate way:

Select cell B4.

time 1-7

Write the formula as “= HOUR(B3 – B2).

time 1-8

Press Enter Button and Result will show as 3.

time 1-9

  • Suppose the time difference is in an hour: minute format, and we want to see the hour and minute difference in separate cells.
  • We want to calculate the time difference between 6.30 PM and 9.00 PM

Select Cell A5.

time 1-10

Write the Formula as “= HOUR( B3-B2) “ to calculate the exact hours irrespective of the minutes and seconds.

time 1-11

Press Enter Button and Result will show as 2.

time 1-12

Select Cell B5.

excel 2-7

Write the Formula as “= MINUTE (B3-B2) ” to calculate the exact minutes irrespective of the hours and seconds.

excel 2-8

Press Enter Button and Result will show as 30.

excel 2-9

Adding Time Value to Time – Example #2

  • In Excel, one day means 1, which is 24 hours. This represents as times and hours are fractions of 1.
  • Now the problem is when the time crosses midnight. That means the day changes. In that case, the calculation is to be done in a different way.
  • For example, if the start time is 8:00 PM on Day 1, and the end time is 7:00 AM on Day 2, the start time becomes greater than the end time, then the (end time – start time) formula will give a negative value.
  • It will show an error with the value of hash characters (#) in the cell.
  • So, to avoid this issue, we can use the following formula for times that cross a day boundary:

=1-start time + end time

  • If we deduct the start time from 1, we find the time value on day 1. Then we will add that value to the time value( End time ) on day 2.

Select Cell B3.

example 3-1

Write the Formula as “= 1 – B1 + B2 “

example 3-2

Press Enter Button and Result will show as 11:00 AM.

example 3-3

Go to the Home tab, and in Number Group, select on the Drop-Down Menu.

Click on time to change the cell value into a Time value.

time in excel 3-4

The Result will show 11:00:00.

example 3-5

Generalized Format of Formula – Example #3

The previous formula will only work if the day changes. So we need to use a generalized format of formula.

For this reason, we can also use the following formula:

= MOD (End Time – Start Time, 1)

Select cell C2.

example 4-1

Write the Formula as “= MOD ( B2-A2, 1) “.

example 4-2

Press Enter button and the Result will show as 4:00 AM.

example 4-3

Go to the Home tab, and in Number Group, click on the drop-down menu.

Click on time to change the cell value into a Time value.

time-in-excel-4-4

The result will show as 04:00: 00.

example 4-6

Drag or Copy the Formula of C2 to C3, and the Result will show as 23:00:00.

example 4-7

Things to Remember About Time Difference in Excel

  • The formula will work only with the data within a 24-hour time frame. It does not work if the end time and start time difference are more than 24 hours.
  • We might need to customize the cell format of time like Hours: Minutes, that is hh:mm.

Recommended Articles

This has been a guide to Time Difference in Excel. Here we discuss How to Implement Time Difference in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles.

  1. Time Function in Excel
  2. Excel Sum Time
  3. VBA Time
  4. Excel Subtract Time
Popular Course in this category
All in One Excel VBA Bundle (120+ Courses)
  120+ Online Courses |  500+ Hours |  Verifiable Certificates |  Lifetime Access
4.9
Price

View Course

Related Courses

Excel Training (23 Courses, 9+ Projects)4.9
Excel Data Analysis Training (17 Courses, 8+ Projects)4.8
Excel for Finance Training (18 Courses, 7+ Projects)4.7
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Excel Course

Excel functions, formulas, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download Time -Difference-Excel-Template

EDUCBA

Download Time -Difference-Excel-Template

EDUCBA

डाउनलोड Time -Difference-Excel-Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more