Dates & Time

Months Between Two Dates (with Days)

Pick two dates and it counts the full months between them plus the leftover days, and also gives you a decimal-month figure. It handles leap years and the uneven length of each month.

Reviewed and updated

How to use
  1. Enter the start date and the end date.
  2. Check the decimal-months and years-and-months breakdown for other formats.
Span
Months & days

whole months plus leftover days

Months (decimal)
Years & months
Total days
Total weeks
Date math uses your inputs as given; check time-zone and leap-year edge cases.
Was this helpful?

Whole months, then the leftover days

A month span is counted by the calendar, not by a fixed number of days. You compare the year and month of each date, then adjust for the day of the month.

Months = (years apart × 12) + months apart + day adjustment

The day adjustment is zero if the end day is on or after the start day, and minus one if it falls short. The days left over after the last whole month are shown separately, so the answer reads as a number of whole months plus a days remainder.

Whole months versus a decimal figure

  • Whole months plus days. The default for leases, age tracking and loan terms, where a same-day anniversary each month is what people mean.
  • Decimal months. Total days divided by 30.44 (the average month, 365.25 ÷ 12). A period of 3 months and 15 days works out to about 3.49 months this way.

The two methods can disagree by a fraction because calendar months are uneven, so pick the one your use case needs before comparing results.

Where the count can shift by one

  • Short months. A start late in a long month has no matching day in a shorter one, so the count anchors to that month last day instead.
  • Leap years. A leap day adds one calendar day to the span but does not change the whole-month count for a same-day anniversary.
  • Age in months. A child turns one month older on the same day number each month, which is exactly the day-adjustment rule above.

Common questions

How are whole months counted between two dates?

Take the difference in years times twelve plus the difference in months. If the end day of the month is earlier than the start day, subtract one month and carry the leftover days. The result is whole months plus a days remainder.

Is one month always about 30 days?

No. Months run 28 to 31 days, so a fixed period like 30 days does not line up with calendar months. If you need a single decimal figure, the average month is 30.44 days.

Why does February make month counting awkward?

February has only 28 or 29 days, so there is no matching day for a start on the 30th or 31st. Most calculators anchor to the end of February in that case, treating the last day of one month to the last day of the next as one whole month.

From the blog

Guides & how-tos

All articles →