What is the number of months between two dates?

It's how many whole calendar months fit between two dates, plus the days left over. A month counts as complete when the same day number comes round again: from January 15 to February 15 is one month, whether February has 28 days or 29.

Months have different lengths, so the same number of days can be a different number of months. That's why counting months is handier than dividing days by 30 when you work with rent, contracts, subscriptions, loans or a baby's age.

How are month ends counted?

When the start date's day doesn't exist in a shorter month, the month completes on the first day of the next month. From January 31, the first month is complete on March 1 in most years, since February has no 31st. The leftover days are then counted from the last day of February, so January 31 to March 1 is 1 month and 1 day.

Tool description

Enter a start date and an end date, in either order. The tool counts from the earlier date and shows:

  • Months between the dates, as whole months and days
  • Decimal months: the whole months plus the leftover days as a share of the month they fall in
  • The same span in years, months and days
  • The total number of days

By default the end date itself isn't counted, the way most date calculators work: from May 1 to May 31 is 30 days. Turn on "Include the end date" to count it as a full day too, so May 1 to May 31 becomes 1 month.

Examples

  • January 15, 2025 to June 27, 2026: 17 months, 12 days, or 17.40 decimal months (1 year, 5 months, 12 days; 528 days)
  • January 15 to March 1, 2026: 1 month, 14 days, or 1.50 decimal months, since February 15 to March 15 is 28 days
  • January 1 to January 31, 2026 with the end date included: 1 month, 0 days

Features

  • Whole months and days between any two dates
  • Decimal months for prorating rent, salaries or fees
  • Years, months and days, and total days
  • Option to include the end date
  • Correct month ends and leap years
  • Numbers in your regional number format