Pinterest Pixel

How to Calculate Time in Between Two Dates in Excel Fast

John Michaloudis
When working with dates in Excel, I may have to find the time difference between two dates.
Excel has many ways to calculate the time between two dates.

In this article, I will show you how to calculate the time between two dates in Excel.

When working with dates in Excel, I may have to find the time difference between two dates. Excel has many ways to calculate the time between two dates. In this article, I will show you how to calculate the time between two dates in Excel.

Key Takeaways:

  • Excel stores dates as serial numbers.
  • The subtraction formula can be used to get the number of days between two dates.
  • The DATEDIF function calculates differences in years, months, and days.
  • NETWORKDAYS and NETWORKDAYS.INTL helps exclude weekends and holidays in calculations.
  • The WORKDAY function calculates future dates by adding workdays.

 

Format Dates in Excel

Excel stores dates as serial numbers. Each date corresponds to a unique numerical value starting from January 1, 1900. For example, March 22, 2024, is actually stored as 45353 in Excel. Follow these steps to correctly format dates:

STEP 1: Select the cells containing dates.

Time in Between Two Dates

STEP 2: Press Ctrl + 1 to open the Format Cells dialog box.

Time in Between Two Dates

STEP 3: Click the Number tab and select Date.

Time in Between Two Dates

STEP 4: Choose a format and click OK.

Time in Between Two Dates

The selected format will be applied to the cells.

Time in Between Two Dates

 

Calculate Time in Between Two Dates

STEP 1: Enter the start date.

Time in Between Two Dates

STEP 2: Enter the end date.

Time in Between Two Dates

STEP 3: In cell C2, enter the formula to calculate days elapsed.

Time in Between Two Dates

STEP 4: Press Enter.

Time in Between Two Dates

The output is 14, meaning 14 days have passed. To include both the start and end dates, I modify the formula:

Time in Between Two Dates

DATEDIF Function

DATEDIF function is used to calculate the difference between two dates in years, months, and days. It is not a built-in function, but it still works when entered manually.

STEP 1: Enter the start date and today’s date.

Time in Between Two Dates

STEP 2: Use the DATEDIF function to calculate the difference in:

  • Years

Time in Between Two Dates

  • Months (excluding full years)

Time in Between Two Dates

  • Days (excluding full years and months)

Time in Between Two Dates

STEP 4: Drag these formulas for all the rows.

Time in Between Two Datesa

 

Advanced Techniques

NETWORKDAYS Function

The NETWORKDAYS function determines how many working days fall between two dates. It automatically skips weekends and holidays.

=NETWORKDAYS(start_date, end_date, holidays)

Time in Between Two Dates

Exclude Holidays

If my company observes certain holidays, I can provide a list of holiday dates and modify the formula:

Time in Between Two Dates

NETWORKDAYS.INTL Function

Some businesses have different weekend policies. The NETWORKDAYS.INTL function allows me to customize weekends beyond the standard Saturday-Sunday setup.

Weekend Codes:

  • 1 – Saturday & Sunday (default)
  • 2 – Sunday & Monday
  • 3 – Monday & Tuesday
  • 7 – Friday & Saturday

Time in Between Two Dates

Here, the 7 tells Excel that Friday and Saturday are non-working days.

WORKDAY Function

The WORKDAY function can be used to add working days to a start date.

Time in Between Two Dates

 

FAQs

How to calculate days between two dates?

To calculate the number of days between two dates, subtract the start date from the end date.

=End Date - Start Date

What formula should I use to find elapsed hours and minutes?

You can use this formula to find elapsed hours and minutes in Excel:

=TEXT(B1-A1, "h:mm")

How to account for holidays in time calculations?

Yes, Excel can account for holidays in time calculations using the NETWORKDAYS or NETWORKDAYS.INTL functions. By adding a range of holiday dates as an optional argument, these functions exclude specified holidays from the total count of working days between two dates, alongside weekends.

Is datedif still in Excel?

Yes, the DATEDIF function is still available in Excel. It’s a hidden feature and not listed in the formula menu. But you can use it to calculate the difference between dates in units like years, months, or days by entering the formula manually.

If you like this Excel tip, please share it


Founder & Chief Inspirational Officer

at

John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship MyExcelOnline Academy Online Course.

See also  How to Generate Random Numbers 1-20 in Excel - Step by Step Guide

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...