Get months past the last whole year

Turn November 4, 2026 to June 4, 2029 (2 years and 7 months) into 7.

What you'll make

In Excel: November 4, 2026 to June 4, 2029 becomes 7 months.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1A8The start or birth date.November 4, 2026
2B8The date to count up to.June 4, 2029
3"YM"Counts months, leaving out whole years."YM"
4DATEDIF( … )Gives the months finished since the last whole year.7

2 years and 7 months gives 7. A month counts once the same day comes round again.

=DATEDIF(A8,B8,"YM")

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own dates. Paste start dates and as-of dates into the green columns of the Template tab. The months fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

This gives only the months left over after whole years, never more than 11. Use it next to a years count.

Microsoft's help: DATEDIF function