Pinterest Pixel

DATEDIF function: Introduction

  What does it do? Calculates the number of Days, Months, or Years between two dates Formula... read more

Download Excel Workbook
John Michaloudis
Posted on

Overview

DATEDIF function: Introduction | MyExcelOnline

 

What does it do?

Calculates the number of Days, Months, or Years between two dates

Formula breakdown:

=DATEDIF(Start Date,End Date,Interval)

What it means:

=DATEDIF(starting date, ending date, the unit of measurement)

Where INTERVAL is:

m” Months , “ym” Months Excluding Years
d” Days , “yd” Days Excluding Years
y” Years , “md” Days Excluding Years And Months


The DATEDIF function is a mystery function within Excel.  When you write it out in a workbook it doesn’t give you any hints like other functions would and if you look it up in the function list you would not find it! Creepy…

The DATEDIF function stands for “date difference” and it calculates the number of Days, Months, or Years between two dates.

So if you want to find out how many days, years or months have passed since you were born, well this is the formula for you!   Well you can also extend this to project start and end dates, but you get my point.

DATEDIF function: Introduction | MyExcelOnline

Download excel workbookDateDif.xlsx

STEP 1: Enter the Start Date

DATEDIF function: Introduction

 

STEP 2: Enter the End Date

DATEDIF function: Introduction

 

STEP 3: To get the number of months as a difference, type in the following formula

=DATEDIF(B12, B15, “m”)

The DATEDIF arguments:

B12 is the startdate
B15 is the enddate
m tells it to count in total months

DATEDIF function: Introduction

 

STEP 4: To get the number of days on this year from your birthday, type in the following formula

=DATEDIF(B12, B15, “yd”)

The DATEDIF arguments:

B12 is the startdate
B15 is the enddate
yd tells it to count in days but excluding the year portion

DATEDIF function: Introduction

 

And you have your calculated differences!

DATEDIF function: Introduction

 

How to Use the DateDif Formula in Excel

 

 

If you like this Excel tip, please share itEmail this to someone

email

Pin on Pinterest

Pinterest

Share on Facebook

Facebook

Tweet about this on Twitter

Twitter

Share on LinkedIn

Linkedin

DATEDIF function: Introduction | MyExcelOnline
Founder & Chief Inspirational Officer at MyExcelOnline.com

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 Academy Online Course.

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!