TodayFree forever - no sign-up, no paid plans

How to calculate months between two dates

By Daniel Mercer · Updated November 17, 2026

Open the Months Between Dates Calculator

Counting days between two dates is easy because every day is the same length. Counting months is harder, because months are not. A month can be 28, 29, 30 or 31 days long, so the honest answer to "how many months between these dates" almost always has two parts: a number of full months, plus a handful of leftover days that did not make up another complete month. This guide gives you the rule, a four-step method you can do on paper, and two worked examples to check yourself against.

If you would rather skip the arithmetic, the months between dates calculator does exactly this method for you and shows the leftover days as well. But it is worth learning the rule once, because it explains every answer the calculator gives - and every argument about month counts you will ever have with a landlord, an HR department or a spreadsheet.

The rule: a month completes on the same day of the month

A full month has passed each time the same day of the month comes round again. Start on January 15 and one full month is complete on February 15. Two full months complete on March 15. Three on April 15. The date in the month - the 15th, in this case - is called the anniversary day, and it is the anchor for the whole count. Everything before the next anniversary is a partial month, reported as days.

This is the same rule you already use for birthdays. A baby born on January 15 is exactly 3 months old on April 15, and is 3 months and a few days old on April 20. Nobody says the baby is 3.16 months old, and nobody needs to know how many days February had that year. The month count comes from the calendar, not from dividing days.

Students learning how to calculate months between two dates

The four-step method

Here is the whole method, in the order to do it:

Step 1. Write down the start date and the end date, with the earlier date first. If your end date is earlier than your start date, swap them - the count is the same either way, and a negative answer usually means the dates were typed in the wrong order.

Step 2. Count the whole months between the month numbers. Take the end year and month, subtract the start year and month. From March 2026 to August 2026 is 8 - 3 = 5 months of difference. Across years, multiply the year difference by 12 and add the month difference.

Step 3. Compare the day numbers. If the end day is the same as or later than the start day, the figure from step 2 is your full month count. If the end day is earlier than the start day, the last month never completed - subtract 1.

Step 4. Count the leftover days. Go forward from the last completed monthly anniversary to the end date and count the days. That is your remainder, and the full answer is "X months and Y days".

Worked example 1: an exact answer

How many months from January 15, 2026 to April 15, 2026? Step 2: April minus January is 3 months. Step 3: the end day (15) matches the start day (15), so nothing is subtracted. Step 4: there are no leftover days, because the end date is exactly the third anniversary. The answer is exactly 3 months. For reference, the span is 90 days long - 16 remaining days in January, 28 in February, 31 in March and 15 in April. Notice that 90 days divided by 30 also gives 3 here, but that is luck, as the next example shows.

Worked example 2: leftover days

How many months from March 10, 2026 to August 25, 2026? Step 2: August minus March is 5 months. Step 3: the end day (25) is later than the start day (10), so the count stands at 5 full months, reached on August 10. Step 4: from August 10 to August 25 is 15 days. The answer is 5 months and 15 days. The whole span is 168 days. Divide 168 by 30 and you get 5.6, which tells you almost nothing - the calendar answer of 5 months and 15 days is the one a contract, a lease or a payroll system would use.

The awkward case: the end day is smaller

The step 3 adjustment is where most hand counts go wrong. From January 15 to April 14, the month difference is 3, but April 14 is one day short of the third anniversary on April 15, so the true count is 2 full months plus the days from March 15 to April 14, which is 30 days - 2 months and 30 days, covering 89 days in total. It feels strange to say a span of nearly three months is "2 months and 30 days", but it is correct, and it is exactly how spreadsheet functions like DATEDIF report it too. Our guide on full months vs partial months digs into why counters report it this way.

The other awkward case is the month-end start. If a span starts on January 31, there is no February 31 for the first anniversary to land on. The usual convention - used by Excel's EDATE function and by our months between dates calculator - clamps the anniversary to the last day of the short month, so January 31 plus one month completes on February 28 in 2026. The guide on month-end dates covers the edge cases in full.

Checking your answer

Two quick checks catch most errors. First, add your answer back onto the start date: start date plus your full months, plus your leftover days, should land exactly on the end date. Second, sanity-check the day total. Count the days in the span - our days between calculator on the homepage does this instantly - and confirm it sits between the shortest and longest possible versions of your month count. Five months can be anywhere from 150 to 153 days depending on which months they are, so a 5-month answer attached to a 140-day span is definitely wrong. If your hand count and the tool ever disagree, the disagreement is almost always the step 3 adjustment or a clamped month-end anniversary.

Frequently asked questions

What does full months between two dates mean?

A full month is counted each time the same day of the month comes round again. From January 15, one full month is complete on February 15, two on March 15, and so on. Any days after the last completed monthly anniversary are reported separately as leftover days.

Why is my month count different from dividing the days by 30?

Because real months are not 30 days long. They run from 28 to 31 days, so dividing a day count by 30 gives an estimate, not a calendar answer. Ninety days from January 15 is exactly 3 months, but 90 days from March 15 is 2 months and 29 days, because that span contains two 31-day months.

How do I count months when the end date falls earlier in the month than the start date?

The last month has not completed, so you count one fewer month and measure the leftover days from the previous monthly anniversary. From March 10 to August 5, for example, is 4 full months plus the days from July 10 to August 5, which is 26 days.

Does a leap year change the number of months between two dates?

It changes the number of days, not the number of months. A span from January 15 to April 15 is 3 full months in any year, but it is 90 days in a normal year and 91 when February has 29 days. The monthly anniversaries land on the same dates either way.

Should I include the end date when counting months?

For elapsed time, no. Months between dates measure how much time has passed, the same way age works: a baby born on January 15 is exactly 3 months old on April 15, not 3 months and a day. Counting both ends is a different convention used for things like hotel stays and leave, and it adds one day, which only matters at the day level.

Related guides

Full months vs partial months - how to read the answer

What a counter is really telling you when it reports complete months plus leftover days.

Months between dates by hand - the step-by-step method

One long span worked through slowly, with a check at every step.

How to add months to a date

The reverse job: start from a date, add months, and land on the right day.

Month-end dates - why January 31 plus one month is tricky

Clamping explained: where the anniversary goes when the month has no 31st.

Daniel Mercer

Daniel Mercer builds and maintains the calculators on this site. He spent ten years in payroll and operations roles counting business days, notice periods and deadlines by hand, and writes these guides the way he would explain the count to a colleague - the rule first, a worked example second, and the common mistake called out before it happens.