Blog ยท DATEDIF

DATEDIF for Beginners โ€” Step by Step

Beginner-friendly tutorial for DATEDIF in Google Sheets.

What is DATEDIF?

Calculates the number of days, months, or years between two dates.

Syntax

DATEDIF(start_date, end_date, unit)

Step-by-Step Guide

  1. Understand the arguments โ€” DATEDIF requires specific inputs. Review the syntax above and make sure you understand each argument.
  2. Set up your data โ€” Organize your data with clear headers and consistent formatting before applying the formula.
  3. Write the formula โ€” Start typing =DATEDIF( in any cell and Google Sheets will show you the argument hints.
  4. Test with sample data โ€” Verify the output matches your expectations before applying to your full dataset.
  5. Handle errors โ€” Wrap in IFERROR() to gracefully handle edge cases: =IFERROR(DATEDIF(...), "N/A")

Expert Tips

Units: "Y" years, "M" months, "D" days, "YM" months ignoring years, "YD" days ignoring years.

[Advertisement โ€” Google AdSense]

Related Functions

Check out our complete formula reference for more Google Sheets functions.

Need Help?

Our Google Sheets experts build custom solutions every day. Get a free quote โ†’

๐Ÿ’ฌ