Months Between Dates Calculator
Count complete calendar months between dates using an explicit end-of-month anniversary rule.
Result for the values shown.
Calculations run in your browser.
What to enter
| Input | Meaning and units |
|---|---|
| Start | Gregorian calendar date in YYYY-MM-DD format; years 0001 through 9999. |
| End | Gregorian calendar date in YYYY-MM-DD format; years 0001 through 9999. |
Understanding your result
Calendar results use the stated counting and anniversary convention. Complete months and years differ from fixed day counts.
Common mistakes
- Counting both end dates when the method excludes a boundary, or assuming all months have equal length.
Check your calculation
- Test a short known interval and a leap-day boundary; for working days, verify your holiday list.
Calculation checks, sources and review limits
How many complete calendar months are between these dates?
Count complete calendar months between dates using an explicit end-of-month anniversary rule.
Common uses
- Count complete calendar months between dates using an explicit end-of-month anniversary rule.
How it works
m=12*(y2-y1)+(month2-month1); subtract 1 if addMonthsClamped(start,m)>end. Calendar arithmetic uses the proleptic Gregorian calendar. Explicit calendar dates are independent of local daylight-saving changes. Month/year additions clamp to the last valid day of the destination month. Timestamp arithmetic requires a stated UTC offset and excludes leap seconds.
Worked example
Enter Start: 2024-01-31; End: 2024-02-29. The result is Complete months: 1.
FAQ
How many complete calendar months are between these dates?
m=12*(y2-y1)+(month2-month1); subtract 1 if addMonthsClamped(start,m)>end. Calendar arithmetic uses the proleptic Gregorian calendar. Explicit calendar dates are independent of local daylight-saving changes. Month/year additions clamp to the last valid day of the destination month. Timestamp arithmetic requires a stated UTC offset and excludes leap seconds.
What assumptions and limits apply?
Product convention: anniversaries clamp to last day of month; fractional months are not a fixed duration. Display convention.