• Link to Facebook
  • Link to Youtube
  • Link to LinkedIn
  • Link to X
  • Link to Tiktok
  • Link to Instagram
  • EN ESPAÑOL
    • Inicio
    • Glosario de Términos
    • Modelos Financieros
    • Tutoriales Cortos
  • A.CRE HELP
    • Support Section
    • Contact Us
  • LOGIN/REGISTER
  • Shopping Cart Shopping Cart
    0Shopping Cart
Adventures in CRE
  • A.CRE
    • A.CRE Home
    • A.CRE Help
    • Accelerator
      • Learn More
      • Login
    • AI.Edge
      • Learn More
      • Login
    • Artificial Intelligence
    • Careers
    • CRE Event Calendar
    • CRE Job Board
    • Education
    • Library of Excel Models
    • Meet the A.CRE Team
  • RE Modeling
    • 1031 Exchange
    • Audio Series
    • All-in-One (Ai1) Model
      • Download
      • Guides and Tutorials
      • Support
    • Ask Me Anything (Live)
    • Beginner’s Guide to Excel
    • Excel Models
      • Excel Add-ins
      • Library of Excel Models
      • All-in-One (Ai1) Model
      • Apartment
      • Condo
      • Debt
      • Development
      • Equity Waterfall
      • Hotel
      • Industrial
      • Office
      • Portfolio
      • Retail
      • Single Family
      • Tutorial
    • Excel Tips
    • Practice Library of Case Studies
    • Stochastic Modeling
    • Argus
    • My Downloads / My Account
  • Careers
    • About Careers in Real Estate
    • Ask Me Anything (Live)
    • Audio Series
    • Compensation in Real Estate
    • CRE Job Board
      • Find a Job
        • Browse Jobs
        • Post a Resume
        • Register
        • Login
      • Post a Job
    • CRE Event Calendar
    • CRE Interviews
    • Day in the Life Series
    • Real Estate Legal Content
    • What CRE Pros Do
  • Education
    • Accelerator
    • AI.Edge
    • A.CRE 101
    • Ask Me Anything (Live)
    • A.CRE Audio Series
    • Audio Series
    • Book Reviews
    • CRE Event Calendar
    • Deep Dive Series
    • Glossary of CRE Terms
    • Real Estate Legal Content
    • Real Estate Clubs
    • University Profiles
    • Watch Me Build
  • AI
    • AI Skills
    • AI Use Cases in CRE
    • AI for CRE Training
    • AI Tools for CRE
    • AI.Edge Membership
      • Learn More
      • Login
  • Accelerator
    • Accelerator Reviews
    • Accelerator Story
    • Enroll Now
    • Learn More
    • See What’s New
    • Enterprise Members Only
      • General Enterprise Login
      • ICSC Login
      • M&M Login
    • Members Only
      • Extend/Renew Membership
      • Login
      • Manage Membership
  • My Downloads
    • View My Downloads
    • Find an Excel Model
    • Register
    • Login
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
You are here: Home1 / Real Estate Financial Modeling2 / Excel Tips3 / DateDif: The “Secret” Excel Formula (Updated 11.14.2020)
Michael Belasco
Real Estate Financial Modeling, Excel Tips

DateDif: The “Secret” Excel Formula (Updated 11.14.2020)

calendar

For one reason or another, there is a perfectly functioning and pretty valuable formula that can be utilized in Excel that Microsoft has chosen to exclude from Excel’s list of functions: the DateDif function. This function is a valuable tool that can instantly calculate the number of days, months, or years between two dates.

While in Excel, if you click on the ‘fx’ button to the left of the formula ribbon and search for this function in the ‘Insert Function’ box, you will see that it is nowhere to be found. However, you can manually type the DateDif formula into a cell and by following the instructions in this post, get the results described.

Using DateDif In Real Estate Financial Modeling

The DateDif formula can be a valuable tool for real estate financial modeling and is a great function to have in your arsenal. For example, I use it in my Condominium Development Model as shown in the video. A second example can be found in the second tab of the downloadable excel file below where I use it to model for rental increases in a lease over time that has a start date prior to the analysis start.

DateDif Video Tutorial

The below video will walk you step by step through how the function work. Download the template below or simply open a blank Excel file on your computer and follow along.

DateDif Example
  • Sheet 1: Practice Example to use with the step-by-step guide
  • Sheet 2: RE Financial Modeling Example

Frequently Asked Questions about the DateDif Example Workbook

 

What does the DateDif Example workbook demonstrate?

The workbook demonstrates how to use the DATEDIF function in Excel through a practice scenario and a real estate financial modeling application.

What is included in Sheet 1 of the workbook?

Sheet 1 includes a practice example designed to be used alongside a step-by-step instructional guide for learning the DATEDIF function.

What is included in Sheet 2 of the workbook?

Sheet 2 provides a real estate financial modeling example that applies the DATEDIF function in a CRE context.

What is the main function used in this workbook?

The main function featured in this workbook is DATEDIF, which calculates the difference between two dates in various units (days, months, years).

How many times has the workbook been downloaded?

The workbook has been downloaded 2,459 times.

Why is the DATEDIF function useful in real estate financial modeling?

DATEDIF is useful for calculating the duration of leases, loan terms, or investment holding periods with precision in months, years, or days, which is critical in financial modeling.


Download Now!2757 Downloads

Video Walk Through Instructions

  • Step 1: In cell C9, type 1/1/2021
  • Step 2: In cell D9, type 5/26/2032
  • Step 3: In cell E9, type =DateDif(C9,D9,”d”)
    The d in quotation marks will return the number of days between the two dates, which should read 6,310.
  • Step 4: In cell F9, type =DateDif(C9,D9,”m”)
    The m in quotation marks will return the number of full months between the two dates, which should read 207 for this example. If there are additional days after a full month count is reached it will not include those days as an additional month. If you want to include that additional month, see sheet 2 in the downloadable Excel file.
  • Step 5: In cell G9, type =DateDif(C9,D9,”y”).
    The y in quotation marks will return the number of full years between the two dates, which should read 17 for this example. If there are additional days or months after a full year count is reached it will not include those days or months as an additional year. If you want to include that additional year, see sheet 2 in the downloadable Excel file.

Frequently Asked Questions about the DateDif Excel Formula

What is the DateDif formula in Excel?

The DateDif formula calculates the number of days, months, or years between two dates. Although it’s not listed in Excel’s function menu, it can still be used manually. For example:
=DateDif(start_date, end_date, “d”) returns the number of days between the two dates.

Why doesn’t DateDif appear in Excel’s function list?

Microsoft does not include DateDif in Excel’s ‘Insert Function’ list, despite it being functional. This makes it a “hidden” or undocumented formula, but it still works when typed directly into a cell.

How is DateDif used in real estate financial modeling?

It’s useful for calculating durations such as:

Time between lease start and analysis date

Length of holding periods

Timelines for rent escalations
The post mentions use cases in a Condominium Development Model and lease modeling scenarios.

What does “d”, “m”, and “y” return in DateDif?

“d” returns total number of days

“m” returns number of full months

“y” returns number of full years
Partial months or years are not counted. For example, 17 years and 11 months would return 17 with “y”.

Does DateDif account for partial months or years?

No. DateDif only returns full days, months, or years. To include partial time periods, you’ll need additional logic. Sheet 2 of the downloadable Excel file offers guidance on how to account for that.

Is there an example of how to use DateDif step-by-step?

Yes. The post walks through an example with start date 1/1/2021 and end date 5/26/2032:

=DateDif(C9,D9,”d”) → 6,310 days

=DateDif(C9,D9,”m”) → 207 months

=DateDif(C9,D9,”y”) → 17 years

Where can I get a practice file to use DateDif?

The post provides a downloadable Excel file with two sheets:

A practice example

A real estate modeling example
You can follow the instructions or watch the tutorial video included in the post.


About the Author: Michael has spent a decade working in various capacities on more than $7 billion of real estate transactions spanning all asset classes and geographies throughout the USA. Michael is both the founder of Firm Ridge Real Estate, which has a core focus on niche and emerging real estate strategies and A.CRE Consulting, a real estate advisory and financial modeling firm that has provided services on projects totaling more than $21 billion to date. Prior, Michael was a founding member and COO of Stablewood Properties, an institutionally backed real estate operator. And before Stablewood, Michael was at Hines in San Francisco.  Michael has both an MBA and Master in Real Estate with a concentration in Real Estate Finance from Cornell University.

Contact Michael

 

 

by Michael Belasco
Share this entry
  • Share on X
  • Share on LinkedIn
  • Share by Mail
  • Link to Instagram
  • Link to Youtube
https://www.adventuresincre.com/wp-content/uploads/2016/04/calendar-series-4-1192550-640x480.jpg 480 640 Michael Belasco https://adventuresincre.com/wp-content/uploads/2022/04/logo-transparent-black-e1649023554691.png Michael Belasco2020-11-14 14:23:282025-07-08 11:01:41DateDif: The “Secret” Excel Formula (Updated 11.14.2020)
You might also like
Microsoft has blocked the macros in my A.CRE model – What now?
A.CRE Geocoding Excel Add-in to Auto-Populate Latitude and Longitude in Excel (Updated Jan 2024)
Supercharge Excel with the WST Macros Add-in
The Circuit Breaker – How to Fix Circular Reference Errors in Excel
Convert Monthly Cash Flows to Quarterly and Annual Cash Flows (Updated Mar 2022)
SUMIF and Other Excel Functions for Real Estate Analysis Using COUNTIFS, SUMIFS, and AVERAGEIFS Excel Functions in Real Estate Underwriting (Updated Dec 2024)
Accelerator - Learn More

Featured Content

  • RE Financial Modeling Training
  • Library of Excel Models
  • Post a Job – It’s Free
  • Master Financial Modeling
  • Technical Interview Guide
  • Definitive Guide to Excel
A.CRE Library of Excel Models

Recent Posts

  • A.CRE Real Estate Financial Models Download Guide (Updated Jun 2026)
  • Episodio 3 de Multiplicadores: La Brecha de la IA Ya Está Aquí
  • Nuevo Contenido en Español (Actualizado Junio 2026)
  • An AI Skill for the A.CRE Short-Term Rental Acquisition Model
  • Short-Term Rental Acquisition Model (Updated June 2026)

Note About Models

Models downloaded from A.CRE may contain errors. Verify formulas/methodology before basing investment decisions on any model here. Read our Terms and Conditions of Use and Disclaimer.

★★★★★

Accelerator Reviews

Search Adventures in CRE

Search Search

Have a Question or Need Help?

Visit our Help Section

Contact Adventures in CRE

  • Visit A.CRE Help
  • Via Email
  • Via LinkedIn

You Might Also Like

  • Real Estate Modeling Courses
  • Real Estate Financial Modeling
  • A.CRE Job Board
  • Careers in Commercial Real Estate
  • Real Estate Education

A.CRE Library of Excel Models

  • Browse Excel Models
  • Login/Register
  • View My Downloads
  • Edit Account Details

Terms, Policies, and Disclaimer

  • Privacy Policy
  • Cookie Policy
  • AI Usage Policy
  • Terms of Use
  • Disclaimer
© 2014 - Present - Copyright - www.AdventuresinCRE.com, LLC | Adventures in CRE | A.CRE
  • Link to Facebook
  • Link to Youtube
  • Link to LinkedIn
  • Link to X
  • Link to Tiktok
  • Link to Instagram
Link to: A.CRE Mock Interview Workshop – Guide for Interviewers and Interviewees Link to: A.CRE Mock Interview Workshop – Guide for Interviewers and Interviewees A.CRE Mock Interview Workshop – Guide for Interviewers and Interviewe... Link to: Development Associate – U.S. Development Firm Link to: Development Associate – U.S. Development Firm Development Associate – U.S. Development Firm
Scroll to top Scroll to top Scroll to top