Pinterest Pixel

DATEDIF function: Introduction

John Michaloudis
DATEDIF function: Introduction.
What does it do?

DATEDIF function: Introduction

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.

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

 

 

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  Excel´s TEXT Function

Steps To Follow

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...