Article — Months Between Dates Calculator
Months between dates explained
The number of months between two dates depends on how a month is defined. Calendar months count anniversaries: Jan 15 to Apr 15 is exactly 3 months. Decimal months divide the total day span by 30.4375, the average Gregorian month length, which gives 89 / 30.4375 = 2.92 for the same range.
Both answers are correct for different jobs. Pediatricians, lenders, and HR departments use calendar months. Engineers running amortisation tables, scientists logging durations, and anyone comparing intervals shorter than a month tend to use decimal months. The calculator above returns both.
What months between dates means
Three quantities matter in a date difference: the year change, the month change, and the day change. A standard calendar month difference is twelve times the year change plus the month change, with a correction if the end day of the month is earlier than the start day. That correction shifts the count down by one and rolls the remainder into the days field.
An example: from March 5, 2024 to October 18, 2025. Years differ by 1, months by 7, days by 13. No correction needed (18 is later than 5). Twelve times 1 plus 7 is 19 months. So the answer is 19 months and 13 days. The total day span is 593 days, which gives 19.48 decimal months.
The Gregorian calendar averages 365.2425 days per year, or 30.43687 days per month. The 30.4375 figure used in decimal-month conversion comes from the simpler Julian average of 365.25 / 12, which differs by less than two minutes per year.
Calendar vs decimal months between dates
Pick the method that matches the source of the time span. Calendar months win when the dates correspond to events recurring monthly: rent due, loan payment, subscription renewal. Decimal months win when the dates are arbitrary measurements: the start and end of an experiment, a project milestone window, a clinical observation period.
M_cal = 12ΔY + Δm + δM_dec = total days / 30.437530 days = 0.99 months365 days = 12.00 monthsLeap years and months between dates
Leap years add February 29. The calendar-month method does not care: Jan 15, 2024 to Jan 15, 2025 is 12 months whether or not Feb 29 falls in the range. Day totals do shift by 1 across a leap day, so the decimal months figure carries an extra ~0.033 (one day divided by 30.4375).
The leap year rule is divisible by 4, except divisible by 100 unless also divisible by 400. So 2000 was a leap year, 1900 was not, 2100 will not be. The calculator handles this in the date library; you do not need to track the rule yourself.
Months between dates in pregnancy tracking
Obstetricians count from the first day of the last menstrual period (LMP) and use weeks rather than months. A 40-week pregnancy works out to 280 days, or 9.20 decimal months. In calendar terms, that is 9 months and roughly 6 days, which is why people say “9 months pregnant” even though the medical metric is weeks.
For trimester planning, use weeks (LMP + 280 days = due date). For everyday talk and most apps, calendar months still work fine. Just remember that “3 months pregnant” corresponds to roughly weeks 9-13.
Months between dates for loans and leases
Loans, leases, and subscriptions almost always count in calendar months. A 60-month auto loan signed on June 30 ends on June 30 five years later. A 12-month lease starting January 15 ends on January 15. Day adjustments happen only at the boundaries, when contracts begin or end mid-month and pro-rate the first or last payment.
For amortisation arithmetic, the monthly interest rate is the annual rate divided by 12. That uses the same convention: a year is 12 calendar months, regardless of leap days. Some bond and money-market instruments use day-count conventions like Actual/360 or Actual/365, but those are interest calculations, not month counts.
Months between dates for age in months
Pediatricians track age in months from birth up to age 2 or 3. The same calendar-month rule applies: a baby born March 20 turns 1 month old on April 20, 2 months on May 20, and so on. If the current day is earlier than the birth day, subtract one from the count. So on May 19, a child born March 20 is 1 month old, not 2.
For babies born before 37 weeks, pediatricians often use adjusted age (chronological age minus weeks of prematurity) for developmental milestones. Adjusted age is used until around age 2 or 3, then dropped.
Common pitfalls in counting months
Three issues catch people out. First, treating a month as 30 days: it is not, and decimal conversion needs 30.4375 to be accurate. Second, ignoring the day-of-month adjustment: Jan 31 to Feb 28 is 0 months 28 days, not 1 month. Third, mixing methods within one calculation: never compute calendar months and then add decimal-month remainders, because the denominators differ.
- 30.4375 = average month length in days (Julian)
- 30.43687 = average month length in days (Gregorian)
- 12 months in every year, no exceptions
- 365 or 366 days per year depending on leap status
- 0 month difference for any span shorter than the next calendar anniversary
- 280 days = roughly 9 calendar months (pregnancy from LMP)
- 360 months = standard 30-year mortgage term
Worked examples
Three examples worth walking through. First, June 1 to June 1 next year: 12 months, 365 or 366 days depending on year. Second, March 31 to April 30: end day (30) earlier than start day (31), so calendar months = 0 and days = 30. Third, January 15, 2023 to July 4, 2025: years differ by 2, months by 6, days by -11. Apply correction: 30 months minus 1 = 29 months, with leftover days computed against June’s 30 days = 19 days. So 29 months 19 days, or 901 total days, or 29.60 decimal months.
For most everyday uses, the calendar-month answer is the one to quote. For statistical comparisons across many intervals, the decimal version is more honest because it preserves the precise day count and does not collapse short overhang periods. The calculator displays both side by side so you can pick the one that matches your context without doing the arithmetic yourself.
Crossing a year boundary is the same arithmetic. December 15 to February 1 is 1 month 17 days: month delta is -10 (12 to 2), year delta is 1, so 12 minus 10 is 2 months, then correction (1 is earlier than 15) takes it down to 1, with 17 leftover days. The total day span is 48 days, or 1.58 decimal months.