Months Between Dates Calculator

Find the exact number of complete calendar months between any two dates.

Ad placeholder (leaderboard)

The months between dates calculator tells you instantly how many complete calendar months separate any two dates — along with a full breakdown into years, days, and weeks. Whether you need to verify a notice period, check how long a subscription has been active, calculate a child’s age in months, or measure an investment horizon, this tool gives you the answer in one click.

How it works

The tool counts complete calendar months — the standard used by HR systems, tenancy agreements, bank statements, and most legal contracts. The algorithm is straightforward:

  1. Compute the raw month span: (endYear − startYear) × 12 + (endMonth − startMonth).
  2. If the end day-of-month has not yet reached the start day-of-month, subtract 1 — that final month is incomplete.
  3. Derive years as floor(totalMonths / 12) and remaining months as totalMonths mod 12.
  4. Compute total days from the raw millisecond difference (ms / 86 400 000, rounded).
  5. Derive whole weeks as floor(totalDays / 7) and leftover days as the remainder.

This approach handles month-length irregularities (28, 29, 30, or 31 days) and leap years automatically because it works on the calendar position of each date, not on a fixed day-length approximation.

Worked example

Say you want to know how long a fixed-term tenancy ran:

  • Start date: 15 September 2023
  • End date: 28 February 2025

Step 1 — raw months: (2025 − 2023) × 12 + (2 − 9) = 24 − 7 = 17. Step 2 — end day (28) is greater than start day (15), so no subtraction. Step 3 — result: 17 complete months (1 year 5 months). Total days: 532. Whole weeks: 76.

If the tenancy had ended on 10 February 2025 instead: end day (10) < start day (15), so we subtract 1 → 16 complete months.

Formula note

The core formula in plain text:

months = (endYear - startYear) * 12 + (endMonth - startMonth)
if endDay < startDay: months = months - 1

This is equivalent to finding how many times you can advance a date by exactly one calendar month without overshooting the end date — the standard “floor” definition of elapsed months used across finance, HR, and law.

Common use cases

  • Employment and notice periods — most UK contracts specify notice in whole months; this confirms whether the minimum has been served.
  • Lease and tenancy terms — verify a 6-month, 12-month, or 24-month period exactly.
  • Subscription billing — know precisely how many billing cycles have elapsed.
  • Age in months — useful for child development milestones and paediatric references.
  • Loan and mortgage terms — cross-check the number of repayments remaining.
  • Project timelines — measure a sprint cadence or milestone gap.

The quick-preset buttons (Last 3 mo, Last 6 mo, Last 1 yr, Last 2 yr, Last 5 yr) fill both date fields automatically so you can benchmark common spans without typing.

Every calculation runs entirely in your browser — nothing is sent to any server.

Ad placeholder (rectangle)