Whether you are counting the term of a loan, the length of a lease, or how long you have held an investment, converting two calendar dates into a clean number of months is a surprisingly common financial task. This months between dates calculator takes any start date and end date and returns the exact number of calendar months, the leftover days, and the total days between them — so you do not have to count fingers across a wall calendar.
Why months and not just days? Most finance contracts are written in monthly terms: a 36-month auto loan, a 12-month apartment lease, a bond coupon paid every six months, and the IRS one-year holding period that decides whether your investment gain is taxed as short-term or long-term. Dividing raw days by 30 gives a rough estimate, but real months are 28 to 31 days long, which is why this tool uses true calendar math instead of a flat division.
How to Use
- Enter the Start Year, Start Month, and Start Day — the date the period begins. For a loan, this is your closing or origination date.
- Enter the End Year, End Month, and End Day — the date the period ends. For a loan, this is your payoff or maturity date.
- Read the result card: Months Between is the headline figure (whole months plus a fractional remainder), with Total Days, Whole Months, Leftover Days, and Approx. Years shown alongside.
- If your end date falls on an earlier day-of-month than your start date, the calculator automatically borrows from the month count so the result stays intuitive. For example, from March 15 to April 14 is almost one month, not zero.
- Swap the two dates to see the result flip sign. Entering an end date earlier than the start date returns a negative month count, which is useful for projecting how many months remain from today to a future deadline.
The Calendar-Month Formula
Unlike a simple days-divided-by-30 estimate, this calculator counts real calendar months and then expresses the leftover days as a fraction of the ending month's true length. The whole-month count is:
wholeMonths = (endYear − startYear) × 12 + (endMonth − startMonth)
Then the day-of-month difference is added as a fraction. If the end day is on or after the start day, the fraction is (endDay − startDay) ÷ daysInEndMonth; if it falls earlier, one whole month is borrowed and the leftover days are (daysInStartMonth − startDay) + endDay. This is the same relativedelta-style arithmetic used by Python's dateutil library, which is the reference implementation cited on this page.
A concrete example makes it obvious. From January 1, 2024 to December 31, 2024 there are 365 days (2024 is a leap year, but this span runs January-to-December and excludes nothing — the day-of-year difference itself accounts for the extra Feb 29). The whole-month count is 11 (January through December is 11 steps), and the leftover is 30 days out of December's 31 days. So the result is 11 + 30/31 = 11.97 months, not the 12.0 you would get from a flat 365 ÷ 30.4375. The difference is small, but it matters when you are prorating interest or rent to the day. Results are rounded to two decimal places.
A second subtlety is the century-year rule: a year divisible by 100 is a leap year only if it is also divisible by 400. That is why 1900 was not a leap year but 2000 was. This calculator applies that rule correctly, so a span from January 1, 1900 to January 1, 1901 returns 365 days rather than 366.
Examples
Example 1 — A one-year loan term. You close a $25,000 personal loan on March 1, 2024 and it matures on March 1, 2025. The start and end days match exactly, so the calculator returns 12.00 months and 365 days (even though 2024 was a leap year, February 29, 2024 fell before the March 1 start date, so it is not inside this interval). Lenders use this exact month count to multiply the principal by the periodic rate and confirm that 12 monthly payments fully amortize the balance.
Example 2 — A lease that ends mid-month. You sign a 24-month lease on June 15, 2023, and the move-out inspection is on June 30, 2025. The calculator returns 24.50 months (24 whole months plus 15 leftover days out of June's 30) and 746 days (the interval crosses February 29, 2024). Because the rent was quoted at $1,800 per month, the prorated extra half-month between the 15th and 30th comes to roughly $900 — a number you can settle with the landlord without arguing over calendar math.
Example 3 — The one-year investment holding period. You bought stock on August 10, 2023 and plan to sell on July 20, 2024. The calculator shows 11.32 months — 11 whole months plus 10 leftover days out of July's 31 — short of the 12 months the IRS requires for long-term capital-gains treatment. Selling before the 12-month mark means your gain is taxed at your ordinary income rate instead of the lower 0%, 15%, or 20% long-term brackets. Waiting until August 11, 2024 pushes you to just over 12 months and unlocks the lower rate, which can save thousands of dollars on a $100,000 position.
Example 4 — Bond coupon spacing. A corporate bond pays interest every six months. If the last coupon was on November 15, 2023 and the next is May 15, 2024, the calculator confirms 6.00 months and 182 days, helping you accrue interest evenly between payment dates even though the coupon period is a few days shorter than half a year.
FAQ
How many months are between January 1, 2024 and December 31, 2024?
There are 365 days, which equals 11.97 months. The calendar holds 11 whole months from January through December, plus 30 leftover days out of December's 31, giving 11 + 30/31 = 11.97. Because 2024 is a leap year, many people expect a clean 12 months, but the endpoint is New Year's Eve, not New Year's Day.
Does this calculator count the starting day?
No. The total-days figure is the difference between the two dates, so two identical dates give 0 days and 0.0 months. This is the standard convention used by lenders and tax authorities: the origination date itself is not double-counted as a full day of interest.
Why is the result not simply days divided by 30?
Because real months are 28, 29, 30, or 31 days long. Dividing days by 30.4375 gives an average approximation, but contracts are pruned to actual calendar months. This tool counts whole months exactly and only uses the fractional part for the leftover days, matching how banks and landlords actually prorate.
What happens if the end date is earlier than the start date?
The calculator returns a negative month count and a negative day count. This is useful for projecting how many months remain from today until a future maturity date — for example, entering today as the start and a future loan payoff date as the end tells you exactly how many monthly payments you still have left.
How is this different from a days-between-dates calculator?
A days-between tool reports only the raw elapsed days. This calculator converts that span into calendar months first, then reports days as a supporting figure. If your question is "how many months is this loan term?" you want this tool; if your question is just "how many days are between these dates?", the days tool is faster.
Is the one-year holding period for taxes exactly 12 calendar months?
For capital gains, the holding period begins on the day after you buy the asset and runs for 12 full calendar months, ending on the same day-of-month in the next year. Buying on August 10, 2023 means the long-term period starts August 11, 2023 and clears on August 11, 2024. Use this calculator to confirm you clear that exact date before selling.
Disclaimer
This months between dates calculator is provided for informational purposes only and does not constitute financial, tax, legal, or lending advice. Results are based on the dates you enter and standard proleptic Gregorian calendar arithmetic; actual loan terms, lease proration, and tax holding-period rules are defined by your contract or the relevant tax authority, which may count days differently. Always confirm maturity dates, interest proration, and capital-gains holding periods directly with your lender, landlord, or tax professional before making a financial decision.