DATEDIF Google Sheet Formula
Generate Google Sheet DATEDIF Formulas in seconds
Interactive Formula Generator
Formula Generator
Create complex Google Sheets formulas with natural language. Simply describe what you want to calculate.
Upgrade to Sheet Alchemy Pro
Get advanced formulas, batch processing, and priority support
Input
Result
Your formula will be displayed here:
Your formula will appear here
Describe what you want to calculate and click Generate
Pro Features Available
Sheet Alchemy Pro includes additional advanced features to enhance your formula generation.
Advanced Formulas
Complex array formulas and dynamic ranges
Batch Processing
Generate multiple formulas at once
Unlimited History
Save and organize all your formulas
DATEDIF Formula Syntax
Example Use Case
Calculating the difference between two dates in various units
Understanding the DATEDIF Formula
The DATEDIF function in Excel calculates the difference between two dates in your choice of units (days, months, years, etc.). It's a date calculation tool for measuring time spans—like determining age, tenure, or duration in specific units.
DATEDIF("1/1/2023", "12/31/2023", "m") returns 11, counting the months between dates. It takes start_date, end_date, and unit arguments ("d"=days, "m"=months, "y"=years, "ym"=months excluding years, "yd"=days excluding years, "md"=days excluding months and years), supporting various time measurements.
Why Use DATEDIF?
DATEDIF offers specialized date differencing—think age calculations or service intervals. Its unit options allow precise control over how differences are reported, making it ideal for HR applications, project timelines, or anywhere specific time measurements matter.
Example with Sample Data
Date Range, Unit | Formula | Result |
---|---|---|
1/1/2023 to 12/31/2023, "d" | =DATEDIF("1/1/2023", "12/31/2023", "d") | 364 (days) |
6/1/2020 to 8/15/2023, "y" | =DATEDIF("6/1/2020", "8/15/2023", "y") | 3 (complete years) |
6/1/2020 to 8/15/2023, "ym" | =DATEDIF("6/1/2020", "8/15/2023", "ym") | 2 (months excluding years) |
DATEDIF calculates time spans: 11 months between Jan and Dec, 3 complete years in a longer span. It's a date difference specialist.
Explore More Google Sheet Formulas
STDEVA
Estimating sample standard deviation including text and logical values
Learn moreIMTAN
Calculating the tangent of a complex number for complex analysis
Learn moreHLOOKUP
Looking up a value in the top row and returning a value from a specified row
Learn moreDEGREES
Converting radians to degrees for angle readability
Learn moreTRIM
Removing excess spaces from text for clean data
Learn moreNOW
Retrieving the current date and time that updates when the workbook recalculates
Learn moreCOLUMNS
Counting the number of columns in a range for dimension analysis
Learn moreAND
Testing if all conditions are TRUE for logical operations
Learn moreUnlock the Full Power of Sheet Alchemy
Get access to all our formula generators, script generators, and conversion tools with a free Sheet Alchemy account.