Connect via MCP →

Enter Calculation

Formula

Formula: Months Between Two Dates Calculator

Advertisement

Results

Months Between Dates
14.17
months
Whole months 14
Fractional part 0.17

What is the Months Between Two Dates Calculator?

This calculator measures the time span between two calendar dates and expresses it as a number of months. Unlike a simple "count the months on a calendar" approach, it also accounts for the difference in days, returning a decimal value so you can capture partial months. This is handy for billing periods, lease terms, subscription durations, project planning, age in months, and anything where a fractional month matters.

How to use it

Pick a Start Date and an End Date using the date pickers, then read the result. The main number is the total months between the two dates. The secondary rows split that into the whole-month part and the leftover fractional part so you can see exactly how the figure breaks down. If the end date comes before the start date, the result will be negative.

The formula explained

The calculation uses the year, month, and day pieces of each date:

$$\text{months} = (Y_2 - Y_1) \times 12 + (M_2 - M_1) + \frac{D_2 - D_1}{30}$$

The first term converts whole-year differences into months. The second term adds the difference in month numbers. The final term turns the difference in day-of-month into a fraction of a month, using a 30-day month approximation (a common, simple convention also used in many interest and accounting models).

Diagram of the three components that add up to the total months
Months combine the year, month, and day-fraction components.
Timeline showing whole months plus a fractional month between a start and end date
The total is whole months between the dates plus a fractional part from leftover days.

Worked example

From 2023-01-15 to 2024-03-20: years \((2024 - 2023) \times 12 = 12\), months \((3 - 1) = 2\), days \((20 - 15) / 30 = 0.1667\). Total = $$12 + 2 + 0.1667 = 14.17 \text{ months}$$ made up of 14 whole months plus a 0.17 fraction.

FAQ

Why use 30 days for a month? Months have different lengths, so the calculator uses a fixed 30-day approximation for the day fraction. This keeps results simple and predictable rather than depending on which months are spanned.

Can the result be negative? Yes. If the end date is earlier than the start date, the months value will be negative, which tells you the dates are in reverse order.

Is this the same as a precise day count? No. For an exact difference in days, use a date-difference tool. This calculator focuses on a convenient month-based measure with a fractional component.

Last updated: