What is a Month Calculator?
A Month Calculator answers two everyday date questions. First, how many whole months separate two dates? Second, what date do you land on after adding a number of months to a starting date? It is useful for planning subscriptions, loan schedules, project milestones, pregnancy timelines, contract renewals and age in months.
How to use it
Pick a mode. In Months between two dates, enter a start date and an end date. In Add months to a date, enter a base date and the number of months to add. The tool returns the full month count (plus total days) or the resulting calendar date.
The formula explained
The count of full calendar months uses the year and month components, with a small correction when the end day is earlier in the month than the start day:
$$\text{Months} = (Y_2 - Y_1)\times 12 + (M_2 - M_1)$$Here \(Y_1, M_1\) are the year and month of the start date and \(Y_2, M_2\) belong to the end date. Adding months shifts the base date by \(n\) and clamps to the last valid day of a shorter month.
Worked example
From \(2020\text{-}01\text{-}15\) to \(2020\text{-}04\text{-}15\):
$$\text{Months} = (2020 - 2020)\times 12 + (4 - 1) = 3$$The same span in days is \(16 + 29 + 31 + 15 = 91\) days, because 2020 is a leap year with 29 days in February.
More Worked Examples
These examples use the same rule the calculator applies: the full-month count is \((\text{end year} - \text{start year})\times 12 + (\text{end month} - \text{start month})\), and 1 is subtracted when the end day is earlier than the start day (the final month is not yet complete). The total number of days is the exact calendar difference between the two dates.
-
End day earlier than start day (the −1 correction): 2021-03-31 → 2021-06-15.
\((2021 - 2021)\times 12 + (6 - 3) = 3\). Because the end day (15) is earlier than the start day (31), the last month is incomplete, so subtract 1: \(3 - 1 = 2\) full months. Counting the exact calendar difference gives a total of 76 days.
Result: 2 full months (76 days).
-
Adding months that clamps to a shorter month: 2021-01-31 + 1 month.
Adding 1 month to January points at February, but February 2021 has only 28 days, so the day-of-month is clamped to the last valid day: \(\text{Jan 31} + 1\ \text{month} \to \text{Feb 28}\). The result is 2021-02-28, which is 28 days after the base date. In a leap year the same operation clamps to February 29 instead — for example 2024-01-31 + 1 month → 2024-02-29 (29 days).
-
A cross-year span with matching day-of-month: 2019-11-10 → 2022-02-10.
\((2022 - 2019)\times 12 + (2 - 11) = 36 - 9 = 27\). The end day (10) equals the start day (10), so no correction is applied: 27 full months. The exact calendar difference — which includes the leap day of February 29, 2020 — is 823 days.
Result: 27 full months (823 days).
All examples use the proleptic Gregorian calendar; total-day figures count each calendar day exactly, so any leap day inside the span is included automatically.
Result Across Common Scenarios
The table contrasts both modes of the tool: measuring the span between two dates, and adding a number of months to a base date. Notice how a leap-year February, a month-end clamp, and a same-day cross-year span each change the outcome for reasons that are noted in the last column.
| Mode | Inputs | Full months | Total days | Resulting date | Why it differs |
|---|---|---|---|---|---|
| Months between | 2021-03-31 → 2021-06-15 | 2 | 76 | 2021-06-15 | End day (15) is before start day (31), so the last, incomplete month is dropped by the −1 correction. |
| Months between | 2020-02-15 → 2021-02-15 | 12 | 366 | 2021-02-15 | Leap-year span: February 29, 2020 falls inside the range, so the year is 366 days, not 365. |
| Add months | 2021-01-31 + 1 month | — | 28 | 2021-02-28 | Day 31 has no equivalent in February, so it clamps to the last day (Feb 28 in this non-leap year). |
| Add months | 2024-01-31 + 1 month | — | 29 | 2024-02-29 | Same clamp as above, but 2024 is a leap year, so the last valid February day is the 29th. |
| Months between | 2022-06-20 → 2024-06-20 | 24 | 731 | 2024-06-20 | Same-day, cross-year span: the day-of-month matches, so no correction; the 731 days include February 29, 2024. |
Key takeaway: whole-month counts depend only on the calendar year, month, and whether the end day has reached the start day, while total-day figures depend on exactly which months (and leap days) the span covers. When adding months, a start day that exceeds the target month's length is always clamped to that month's final day.
FAQ
Does it count partial months? The month figure counts only complete calendar months; the total days field captures the remainder.
What happens on month-end dates? Adding one month to January 31 returns the last day of the next month, so short months never overflow.
Which date format should I use? Enter dates as year-month-day using the date pickers for reliable results.