Arguments
start_date- The earlier date.end_date- The later date.unit- "Y" years, "M" months, "D" days, and "YM"/"MD"/"YD" for remainders.
Returns the difference between two dates in complete years, months, or days.
Syntax
=DATEDIF(start_date, end_date, unit)start_date - The earlier date.end_date - The later date.unit - "Y" years, "M" months, "D" days, and "YM"/"MD"/"YD" for remainders.=DATEDIF(A2, B2, "Y")Returns: Whole years between the dates
Common for age or tenure.
=DATEDIF(A2, TODAY(), "D")Returns: Days from A2 until today
Pair with TODAY() for a live counter.
Google Sheets supports DATEDIF with the same arguments.
Fill in your ranges and copy a ready-to-paste formula - no signup.