Count the whole months between a start and end date.
Copy this formula
=DATEDIF(A2, B2, "m")DATEDIF with "m" returns complete months elapsed. Use "ym" for the leftover months after whole years. It correctly accounts for day-of-month, unlike dividing days by 30.
=DATEDIF("2026-01-15", "2026-06-23", "m")→5Five complete months.
Months vary in length, so /30 drifts. DATEDIF counts true calendar months.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.