📅 Date
DATEDIF Formula for Date
Calculate difference between two dates. Copy-paste ready for Excel, Google Sheets, and Airtable.
=DATEDIF(A1,B1,"D")When you need this: When you need to calculate employee tenure in years — use DATEDIF with hire date (A1) and today's date.
How it works
- 1DATEDIF calculates time between two dates (A1 = start, B1 = end).
- 2The unit ("D" = days, "M" = months, "Y" = years) determines what to return.
- 3Returns clean numbers without decimals.
Variations
DATEDIF in months
=DATEDIF(A1,B1,"M")DATEDIF in complete years
=DATEDIF(A1,TODAY(),"Y")Related Formulas
TODAY / NOW — Get current date or date/timeDateNETWORKDAYS — Count business days between two datesDateEDATE — Add or subtract months from a dateDateYEAR / MONTH / DAY — Extract year, month, or day from a dateDate
Need a formula that's not here?
Generate custom formula →