Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

Excel Tutorial

Excel HOME Excel Introduction Excel Get Started Excel Overview Excel Syntax Excel Ranges Excel Fill Excel Move Cells Excel Add Cells Excel Delete Cells Excel Undo Redo Excel Formulas Excel Relative Reference Excel Absolute Reference Excel Arithmetic Operators Excel Parentheses Excel Functions

Excel Formatting

Excel Formatting Excel Format Painter Excel Format Colors Excel Format Fonts Excel Format Borders Excel Format Numbers Excel Format Grids Excel Format Settings

Excel Data Analysis

Excel Sort Excel Filter Excel Tables Excel Conditional Format Excel Highlight Cell Rules Excel Top Bottom Rules Excel Data Bars Excel Color Scales Excel Icon Sets Excel Manage Rules (CF) Excel Charts

Table Pivot

Table Pivot Intro

Excel Case

Case: Poke Mart Case: Poke Mart, Styling

Excel Functions

AND AVERAGE AVERAGEIF AVERAGEIFS CONCAT COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS IF IFS LEFT LOWER MAX MEDIAN MIN MODE NPV OR RAND RIGHT STDEV.P STDEV.S SUM SUMIF SUMIFS TRIM VLOOKUP XOR

Excel How To

Convert Time to Seconds Difference Between Times NPV (Net Present Value) Remove Duplicates

Excel Examples

Excel Exercises Excel Syllabus Excel Study Plan Excel Certificate

Excel References

Excel Keyboard Shortcuts


How to Find the Difference Between Two Times Using Excel


Learn how to find the difference between two times using Excel.


Time can be converted into seconds using Excel.

The number 86400 can be used to convert time to seconds.

Conversion number 86400

Read more about 86400 in the How to Convert Time to Seconds Chapter


How to find the difference between two times?

Step 1) Create a sheet and set up values:

In this example, we will find the seconds between 14:00(A2)Time A and 16:00(A3) Time B.

Copy the values to follow the example.

Paste the values directly into your sheet.

Time to seconds setup
Copy Values

Info:

Excel can change the format when you use the 86400 number.

Make sure to change the format back to number if it changes to time format.


Step 2) Convert time to seconds:

Let us multiply the time by 86400.

Select cell C2

Convert time to seconds for Time A:

Calculation

B2(14:00) * G1(86400) = 50400
Time to seconds

Repeat the same for Time B: (B3(16:00) * G1(86400))


Step 3) Find the difference in seconds:

Select cell F9

Deduct Time B from Time A to find the difference.

Use the converted seconds to calculate (the numbers in Column C).

Calculation

C3(57600) - C2(50400) = 7200 Seconds
Difference between Time A and Time B

Step 4) Convert Seconds to Minutes:

Divide the seconds on 60 to find the minutes.

Select cell F10

Calculation

F9(7200) / G2(60) = 120 Minutes
Seconds converted to minutes

Step 5) Convert Minutes to Hours:

Divide the minutes on 60 to find the hours.

Select cell F11

Calculation

F9(120) / G3(60) = 2 Hours
Seconds converted to minutes

Good job!

You have successfully found the time between two times, 14:00 and 16:00.

In this case, the right answer was 7200 Seconds or 120 Minutes or 2 hours.


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.