Months Between Dates Calculator
Enter a start and end date to see the months between them.
Result
How it is calculated
Both dates must be real calendar dates written as YYYY-MM-DD, and the end date cannot be earlier than the start (the same day gives 0). A month counts as complete on the same day number of the next month; if that month is shorter, the last day of the month is used, so 31 January to 28 February is one whole month. Whole months are the largest count whose anchor date does not pass the end date, and the leftover is the extra days from that anchor to the end date. Decimal months are separate: total days ÷ 30.4375, where 30.4375 is the average month length (365.25 ÷ 12). The total days figure is the exact day count, with leap days included, and the end date itself is not added as an extra day. Because the calendar count and the decimal figure use different rules, they can disagree slightly.
Worked example
Start 2024-01-15, end 2025-04-20. From 15 January 2024 to 15 April 2025 is 15 whole months (one year is 12, plus three more). The leftover from 15 April to 20 April is 5 days. The exact day count is 461, because 2024 was a leap year (366 days to 15 January 2025, then 90 more to 15 April, then 5). The decimal figure is 461 ÷ 30.4375 = 15.15 months. So the result is 15 months and 5 days, or about 15.15 months.
Common mistakes
- Typing the date in a local order such as 15/01/2024. The tool needs year-month-day, 2024-01-15, and an impossible date like 2025-02-30 gives no result.
- Expecting a month-end start to behave like PHP or spreadsheet date maths that rolls into the next month. Here 31 January to 28 February counts as 1 month and 0 days, but 31 January to 30 March is 1 month and 30 days, because 31 March has not been reached.
- Comparing the decimal months with the whole months. 15.15 months is a day count divided by an average month, so it will not exactly match 15 months and 5 days.
- Putting the later date first. The end date cannot be before the start date; there is no result, and the tool does not swap them for you.
- Using the decimal months for rent or interest proration without checking your contract. Many agreements count calendar months or actual days, not 30.4375-day months.
About this calculator
Counting the months between two calendar dates is trickier than it looks because months have different lengths. This calculator finds the number of whole calendar months that fit between a start and end date, then reports the leftover days that don't make up a full month, and also expresses the gap as a single decimal number of months for cases where a fractional value is more useful.
This kind of date-span calculation comes up constantly in everyday life: figuring out a baby's or pet's age in months, calculating how long a tenancy, loan, subscription or employment contract has run, prorating rent or interest for a partial month, or working out how many months remain until a deadline or renewal date.
Enter any start and end date and the calculator returns the whole months, remaining days, and decimal-month equivalent between them.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)