Month Counter for Calendar Months and Days
A month counter adds up whole calendar months between two dates, then reports the leftover days. From January 15 to October 27, 2026 the span is 9 months and 12 days, which is 285 days, 9.36 average months and 203 weekdays. Calendar months follow the day of the month, not a fixed 30-day block.
| Months and days | |
| Years, months, days | |
| Months rounded up | |
| Total days | |
| Average months (30.4375 days) | |
| Thirty-day months | |
| Weeks and days | |
| Weekdays, Monday to Friday | |
| Hours | |
| Days in the final month block | |
| Start falls on | |
| End falls on |
Months are counted as real calendar months, not 30-day blocks. Everything runs in your browser and your dates are never uploaded or stored.
Pick two dates to get whole calendar months, leftover days, total days, average months and weekdays, with both end-of-month conventions available.
Key takeaways
- A month counter returns whole calendar months plus leftover days, not a decimal fraction.
- January 15 to October 27, 2026 is 9 months and 12 days, which is 285 days and 9.36 average months.
- The average month is 30.4375 days, while a calendar month runs from 28 to 31 days.
- End-of-month starts need a convention: clamping treats January 31 to February 28 as one month, the strict day rule treats it as 28 days.
- Leap years change the day count inside a range but leave the month count unchanged.
On this page
- What a month counter counts
- Calendar months are not 30 days
- How the count works: anniversaries, not division
- The end-of-month problem: January 31 to February 28
- Leap years and February 29
- Thirty-day conventions in payroll and finance
- Monthly billing, leases and notice periods
- Checking a month count by hand
What a month counter counts
A month counter answers a narrower question than a date difference: how many whole calendar months fit between two dates, and how many days are left over. For January 15 to October 27, 2026 the answer is 9 months and 12 days, which is 285 days in total.
The count is built from anniversary dates rather than from division. January 15 plus one month is February 15, plus two months is March 15, and so on until October 15. That is nine steps, and October 15 to October 27 adds the twelve leftover days.
Dividing instead gives a different answer, and both answers are useful. If 285 days is treated as 9.36 months of 30.4375 days each, the result matches the calendar count to two decimal places, which is why the two methods agree for most purposes and disagree at the edges.
| Measure | Result for January 15 to October 27, 2026 | How it is produced |
|---|---|---|
| Calendar months and days | 9 months 12 days | Nine anniversary steps, then 12 leftover days |
| Total days | 285 days | Day subtraction on the calendar |
| Average months | 9.36 months | 285 divided by 30.4375 |
| Thirty-day months | 9.50 months | 285 divided by 30 |
| Weeks and days | 40 weeks 5 days | 285 divided by 7, remainder kept |
| Weekdays, Monday to Friday | 203 days | Counted from January 16 through October 27 |
Every figure in that table comes from the same two dates. The calculator above returns all of them at once, plus the weekday of each endpoint, so a lease or a billing cycle can be checked against the calendar rather than against a rule of thumb.
Calendar months are not 30 days
Twelve months do not have twelve equal lengths, and that single fact is behind most disagreement about what a month is worth. February is 28 days in a common year and 29 in a leap year, seven months run to 31 days, four run to 30, and the total is 365 or 366.
The averages follow from those totals. A year of 365.25 days divided by 12 gives 30.4375 days, the figure payroll systems and spreadsheet functions use for an average month. The exact Gregorian mean is 30.436875 days, because the calendar year averages 365.2425 days over a 400-year cycle rather than 365.25. Finance often uses a flat 30 days, which is 1.4 percent short of the real average. The NIST time and frequency division keeps the definitions behind those averages, including the length of the second and the structure of the civil day.
| Month | Days, common year | Days, leap year | Days from January 1 to month end |
|---|---|---|---|
| January | 31 | 31 | 31 |
| February | 28 | 29 | 59 or 60 |
| March | 31 | 31 | 90 or 91 |
| April | 30 | 30 | 120 or 121 |
| May | 31 | 31 | 151 or 152 |
| June | 30 | 30 | 181 or 182 |
| July | 31 | 31 | 212 or 213 |
| August | 31 | 31 | 243 or 244 |
| September | 30 | 30 | 273 or 274 |
| October | 31 | 31 | 304 or 305 |
| November | 30 | 30 | 334 or 335 |
| December | 31 | 31 | 365 or 366 |
The cumulative column is the one to check a result against. If a count says a date fell 200 days into a year, the cumulative table narrows it to mid-July, and a result that points at April is wrong by a quarter.
How the count works: anniversaries, not division
The algorithm needs three things: the start date, the end date, and a rule for what to do when the day numbers do not line up. It runs in four moves.
First, take the difference in months between the two month positions: (end year - start year) x 12 + (end month - start month). Second, add that many months to the start date, clamping the day to the length of the target month if the start day does not exist there. Third, compare the result with the end date. If it has overshot, step back one month. Fourth, count the days between the anchor you landed on and the end date.
For January 15 to October 27 the month difference is 9, the anchor lands on October 15, and the remaining days are 12. The anchor chain below shows each step and the number of days it covers.
| Step | Anchor date | Days in the step | Running total |
|---|---|---|---|
| 0 | January 15, 2026 | 0 | 0 |
| 1 | February 15, 2026 | 31 | 31 |
| 2 | March 15, 2026 | 28 | 59 |
| 3 | April 15, 2026 | 31 | 90 |
| 4 | May 15, 2026 | 30 | 120 |
| 5 | June 15, 2026 | 31 | 151 |
| 6 | July 15, 2026 | 30 | 181 |
| 7 | August 15, 2026 | 31 | 212 |
| 8 | September 15, 2026 | 31 | 243 |
| 9 | October 15, 2026 | 30 | 273 |
| leftover | October 27, 2026 | 12 | 285 |
The running total is the check that catches most errors. If the month blocks sum to 273 but the day subtraction says 285, the leftover 12 days were dropped somewhere between the two calculations.
The end-of-month problem: January 31 to February 28
The hard case is a start date at the end of a month. January 31 plus one month has no exact answer, because February has no 31st. Two conventions exist and both are defensible.
The clamping convention says the anniversary of the last day of a month is the last day of the next month. Under that rule January 31 to February 28 is one whole month, and the same logic makes August 31 to September 30 one month. Banks, lease agreements and most date libraries work this way, and the Python dateutil library reports exactly one month for that pair.
The strict convention says a month is only complete when the day number has been reached. January 31 to February 28 is then 0 months and 28 days, because the 31st never arrives in February. Spreadsheet functions that compare day numbers directly return this answer.
| Range | Clamping rule | Strict day rule |
|---|---|---|
| January 31 to February 28, 2026 | 1 month 0 days | 0 months 28 days |
| January 31 to March 1, 2026 | 1 month 1 day | 1 month 1 day |
| January 31 to March 31, 2026 | 2 months 0 days | 2 months 0 days |
| March 31 to April 30, 2026 | 1 month 0 days | 0 months 30 days |
| August 31 to September 30, 2026 | 1 month 0 days | 0 months 30 days |
| February 28 to March 31, 2026 | 1 month 3 days | 1 month 3 days |
The two rules only disagree when the start day is larger than the end day inside a shorter month, so the difference is one month or 28 to 30 days, never more. Pick the rule the document names, and when it names none, say which one you used. The widget above has a selector for both, so the same pair of dates can be read either way.
Leap years and February 29
February 29 is the test case that breaks naive month arithmetic, because it exists in one year out of four and the date has no counterpart in the following year. A lease that starts on February 29, 2024 and runs twelve months ends on February 28, 2025 under the clamping rule, because the anniversary date does not exist.
The leap rule itself is simple to state and easy to get wrong at centuries. A year is a leap year if it is divisible by 4, unless it is divisible by 100, unless it is divisible by 400. That makes 2000 a leap year, 1900 and 2100 common years, and 2024, 2028, 2032 and 2036 leap years. The US Naval Observatory calendar FAQ sets out the same rule and the history behind it. The 400-year cycle holds 97 leap years rather than 100, which is what brings the average year to 365.2425 days.
| Range | Clamping rule | Strict day rule | Note |
|---|---|---|---|
| February 29, 2024 to February 28, 2025 | 12 months 0 days | 11 months 30 days | Anniversary date does not exist |
| February 29, 2024 to March 29, 2025 | 13 months 0 days | 13 months 0 days | Day 29 exists in March |
| February 28, 2024 to February 28, 2025 | 12 months 0 days | 12 months 0 days | No adjustment needed |
| February 28, 2024 to February 29, 2024 | 0 months 1 day | 0 months 1 day | The extra leap day |
| January 30, 2024 to February 29, 2024 | 1 month 0 days | 0 months 30 days | Clamped to 29 days in February |
Leap years also change the day count inside a range without changing the month count. A twelve month span that crosses February 29 is 366 days, and the same twelve month span a year later is 365. The month count stays at 12 in both cases, which is why a monthly figure derived from total days drifts by one day in four years.
Thirty-day conventions in payroll and finance
Payroll, bond markets and mortgage servicing each define a month differently, and the definitions are written into contracts rather than derived from the calendar. Four conventions cover most of it.
The 30/360 convention treats every month as 30 days and every year as 360, with adjustments when a date falls on the 31st. The actual/360 convention counts real days but divides by 360, which inflates the annual figure by about 1.4 percent. Actual/365 divides real days by 365, and actual/actual divides by the real length of the year in question. Only the calendar-month convention follows the day of the month.
| Convention | Days for January 15 to October 27, 2026 | Year basis | Where it is used |
|---|---|---|---|
| 30/360 | 282 | 360 | Corporate bonds, some mortgages |
| Actual/360 | 285 | 360 | Money market instruments |
| Actual/365 | 285 | 365 | Sterling and some government debt |
| Actual/actual | 285 | 365 or 366 | Treasury notes |
| Calendar months | 9 months 12 days | Not applicable | Leases, subscriptions, employment |
Written notation adds a third layer. ISO 8601 encodes a duration as P1M for one month and P1Y2M3D for a year, two months and three days. The standard fixes the notation but not the arithmetic, so adding P1M to January 31 is left to the implementation and libraries disagree. PostgreSQL resolves the same problem by clamping to the end of the target month, so a date plus interval '1 month' moves January 31 to February 28 rather than to March 2. A timestamp in RFC 3339 form avoids the question entirely by pinning an instant, which is why logs and APIs prefer instants while leases and invoices prefer calendar months.
The four day-count figures differ by three days on this range, which is small until the principal is large. On a million dollars at 5 percent, three extra days of accrual is about 417 dollars, and that is the sort of gap an auditor finds a year later.
| Year | Leap? | Reason |
|---|---|---|
| 1900 | No | Divisible by 100, not by 400 |
| 2000 | Yes | Divisible by 400 |
| 2024 | Yes | Divisible by 4 |
| 2028 | Yes | Divisible by 4 |
| 2100 | No | Divisible by 100, not by 400 |
Monthly billing, leases and notice periods
Most month counting is done for a practical reason, and the reason decides which convention applies.
A monthly subscription billed on the 31st hits a wall in February. Under the clamping rule the February charge falls on the 28th, and in a leap year the 29th, then returns to the 31st in March. Under the strict rule the February charge has no anniversary at all, so the service either bills on the 28th anyway or bills 28 days later. The difference is one billing day per year, which is small per customer and large across a subscriber base.
Leases behave the same way but with higher stakes. A one-year lease from January 31, 2026 to January 31, 2027 covers 365 days. The same lease written as twelve monthly terms starting on the 31st has a February term that must be defined, and a lease that does not define it invites a dispute at the end of the term. Write the end date, not the number of months, when the start date is at the end of a month.
Notice periods are counted forwards from a delivery or a letter rather than between two known dates. A 30-day notice given on January 31 expires on March 2 in a common year, because February contributes 28 days and the count needs two more. A 30-day notice and a one-month notice are therefore different things, and a contract that uses the phrases interchangeably has a latent ambiguity.
One industry rejects calendar months on purpose. Retailers on a 4-4-5 calendar divide the year into quarters of 13 weeks, each split into months of 4, 4 and 5 weeks, so every month is 28 or 35 days and every quarter is identical. A 52-week year leaves one or two days over, so a 53-week year is inserted every five or six years. The result compares badly with a Gregorian month and perfectly with last year, which is the point: a merchandising team wants week 12 of this year against week 12 of last year, not March against March. Academic terms take a similar shortcut, with semesters of 15 or 16 weeks and shorter summer sessions squeezed between them.
Law has its own definition, and it is narrower than the everyday one. In England and Wales the Interpretation Act 1978 provides that a month means a calendar month, so a statutory period of one month runs from a date to the corresponding date in the next month rather than across 30 days. A notice served on January 31 therefore expires on February 28, and a notice served on the 30th expires on the 30th of the following month unless that month is shorter. Utility billing takes a third route: the meter is read on a cycle of roughly 28 to 33 days, the tariff is applied to the units used, and the standing charge is applied per day, so the bill for a long cycle is larger without the rate having changed at all.
Payroll runs into the same wall from the other side. A monthly cycle pays 12 times a year, a semi-monthly cycle 24 times, and a biweekly cycle 26 times with two extra paydays in most years. Employers who switch from semi-monthly to biweekly without adjusting the salary divide by 26 instead of 24 and cut each cheque by about 7.7 percent, then hand back the difference in the two three-payday months. None of that is a rounding error, it is the 24 versus 26 periods problem, and it belongs in the offer letter rather than in the payroll system.
Proration for a partial month uses the length of that specific month. A tenant who moves in on October 15 pays for 17 days of a 31-day month, which is 54.8 percent of the rent, not 15 of 30 days, which would be 50 percent. The 4.8 point gap is the same 31 versus 30 problem in a different place.
Checking a month count by hand
Three checks catch almost every bad month count, and each takes a few seconds.
Check the weekday first. Adding a whole number of months changes the weekday by 0, 1, 2 or 3 days depending on the month lengths crossed, so October 15, 2026 should fall on a Thursday and October 27 should fall on a Tuesday. If the endpoint weekday is wrong, the date arithmetic is wrong and the month count cannot be right.
Check the day total second. The month blocks plus the leftover days must equal the plain day subtraction. For the example above the blocks sum to 273 and the leftover is 12, which gives 285, matching the difference between January 15 and October 27.
Check the average third. Divide the total days by 30.4375 and compare with the month count. A result within about 0.6 of the whole-month figure is normal, because the leftover fraction cannot exceed one month. A result that is 1.5 months away means the range or the rule is wrong.
Those three checks are enough for a lease, an invoice or a benefits waiting period. They will not settle a dispute about which convention applies, and no arithmetic will. When two parties disagree about a month count, the disagreement is almost always about a definition rather than about a number.
Frequently asked questions
How many months is January 15 to October 27, 2026?
9 months and 12 days under the clamping rule, which is 285 days in total. The anniversary chain runs from February 15 to October 15, nine steps, and the leftover is 12 days.
Is a month 30 days or 30.4375 days?
Neither is a calendar month. A calendar month is 28, 29, 30 or 31 days depending on which one you mean. The 30.4375 figure is the average of 365.25 divided by 12, used for rough conversions.
How many days are in a year?
365 in a common year and 366 in a leap year. The Gregorian average is 365.2425 days, which comes from 97 leap years in every 400.
Is January 31 to February 28 one month?
It depends on the convention. Under the clamping rule it is exactly 1 month, because the last day of January maps to the last day of February. Under the strict day rule it is 0 months and 28 days.
How do I count months between two dates by hand?
Subtract the month numbers, then check the day. If the end day is smaller than the start day, subtract one month and count the leftover days from the previous anniversary.
Does a leap year change the month count?
It changes the day count but not the month count. A twelve month span that includes February 29 is 366 days, and the same span in a common year is 365.
How many months is 90 days?
About 2.96 average months, or exactly 3 months on a 30-day basis. In calendar terms 90 days from January 15, 2026 lands on April 15, which is exactly 3 months.
How many weeks are in a month?
Between 4 and 4.4. A 28-day February is exactly 4 weeks, while a 31-day month is 4 weeks and 3 days. The average is 4.35 weeks.
Why do banks use 30/360?
It makes interest accrual identical every month, so a bond coupon divides evenly by 12. The cost is that a 30/360 year is 360 days while the calendar year is 365 or 366.
How many months is a 12 week period?
About 2.76 average months. Twelve weeks is always 84 days, which is less than three calendar months because the shortest three-month span, February through April, is 89 days in a common year.
What is the difference between a month and a lunar month?
A calendar month is 28 to 31 days by convention. A synodic lunar month, from one new moon to the next, averages 29.53 days, which is why lunar calendars drift against the Gregorian one.
Does the calculator count the start date?
No. It counts the time between the two dates, so the start date is day zero. Counting both ends adds one day, which matters for hotel nights and rental days but not for month counts.
How many months is 1,000 days?
About 32.85 average months, which is 2 years and 8.85 months. In calendar terms 1,000 days from January 1, 2026 lands on September 27, 2028.
What is a month-end anniversary?
It is the mapping of the last day of one month to the last day of another. January 31 plus one month gives February 28 in a common year and February 29 in a leap year.
Spotted a wrong number or a broken result?
More Date Time tools
- 1 Hour From Now
- 1 Month Notice Period Calculator
- 1/8 Mile Time Calculator
- 10 Hours From Now
- 10 Minutes Ago
- 10 Weeks Ago From Today
- 11 Hours From Now
- 12 Hours From Now
- 120 Days From Today
- 13 Hours From Now
- 14 Days From Today
- 15 Hours From Now
- 16 Hours From Now
- 17 Hours From Now
- 18 Hours From Now
- 180 Days From Today
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.