Months Between DatesFree online date & time calculator — instant results, no sign-up
Count whole and fractional months between two dates.
About the Months Between Dates
The Months Between Dates calculator compares two dates and reports whole calendar months, approximate fractional months, and elapsed days. It separates calendar-based counting from an average-month estimate because calendar months have different lengths. With Start date 2026-10-23 and End date 2027-10-23, the results are 12 whole calendar months, 11.99 approximate months, and 365 days.
- Start date
- The beginning calendar date of the interval, entered in YYYY-MM-DD format, with a default of 2026-10-23.
- End date
- The ending calendar date of the interval, entered in YYYY-MM-DD format, with a default of 2027-10-23.
Formula and method
For E ≥ S: W = 12 × (Y_e − Y_s) + (M_e − M_s) − I(d_e < d_s); D = elapsed calendar days from S to E; A = round(D / L, 2). Using an assumed average month length L = 30.44 days, the default inputs give W = 12, D = 365, and A = round(365 / 30.44, 2) = 11.99.
- S, EStart date and end date, respectively.
- Y_s, Y_eCalendar years of the start and end dates.
- M_s, M_eCalendar month numbers of the start and end dates.
- d_s, d_eDay-of-month numbers of the start and end dates.
- I(d_e < d_s)An adjustment equal to 1 when the end day-of-month is earlier than the start day-of-month, and 0 otherwise.
- WNumber of completed calendar months under the day-of-month comparison rule.
- DElapsed calendar days, without adding an extra day for inclusive endpoint counting.
- LAssumed average month length of 30.44 days used to reproduce the approximate result.
- AApproximate months, rounded to two decimal places.
Calculate the year-and-month difference, then subtract one month if the ending day-of-month has not reached the starting day-of-month. Separately, calculate elapsed calendar days and divide that total by the assumed average month length. The default dates share the same month and day in consecutive years, giving 12 whole calendar months and 365 days; the average-length conversion gives 11.99 approximate months.
Worked example
These are the calculator's starting values and the results it actually produces for them.
Inputs
- Start date1970-01-01
- End date1971-01-01
Results
- Whole calendar months12
- Approximate months11.99
- Days365
How to use the Months Between Dates
- 1Enter Start date as 2026-10-23 to reproduce the default example.
- 2Enter End date as 2027-10-23, keeping the end date on or after the start date.
- 3Run the calculation to compare the two calendar dates.
- 4Read Whole calendar months = 12 and Days = 365 as separate calendar measurements.
- 5Read Approximate months = 11.99 as an average-length conversion, not as a count of completed calendar months.
Reading your result
Whole calendar months reports completed month intervals according to the day-of-month rule; the default result is 12. Approximate months expresses the elapsed days in average-length months, rounded to two decimals; the default result is 11.99. Days reports the elapsed date difference; the default result is 365. These rows use different definitions, so 12 whole months and 11.99 approximate months are not contradictory.
Limitations
The supplied example does not uniquely identify the average-month divisor: 30.44 days reproduces the stated result, but other common averages can round to the same value. The formula therefore documents an explicit assumption rather than a verified implementation detail. Whole-month counting here uses a strict day-of-month comparison; whether the calculator instead treats the last day of a shorter month as a completed month is not established by the example. The documented method assumes Gregorian calendar dates and an end date on or after the start date. Days are calendar-day differences, not timestamp durations affected by time zones or daylight saving time. Approximate months should not replace contractual billing, interest, or legal month-counting rules.
Common questions
Why do the default dates give 12 whole calendar months but only 11.99 approximate months?+
2026-10-23 to 2027-10-23 completes a full calendar year, so it contains 12 whole calendar months. Its 365 elapsed days divided by the assumed 30.44-day average month rounds to 11.99.
Is Approximate months the whole-month count plus a fraction of the remaining calendar month?+
No. In the documented formula, it is the entire elapsed-day total divided by an average month length. It is calculated independently of the whole-calendar-month count.
Does the Days result include both the start and end dates?+
It measures elapsed days rather than counting both endpoints inclusively. The elapsed difference from 2026-10-23 to 2027-10-23 is 365 days.
How are months of different lengths handled?+
Whole calendar months uses calendar month positions and the day-of-month comparison, while approximate months uses a fixed average length. End-of-month cases require special care because the supplied example does not establish whether shorter-month endpoints receive special treatment.
Does the calculator save my information?+
Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.
You might also like
Date Difference
Count the days, weeks and months between two dates.
Add Days to a Date
Find the date a number of days from a starting date.
Day of the Week
Find out which day of the week any date falls on.
Week Number
Find the ISO week number of any date.
Day of the Year
See which day of the year a date is, and how many days remain.
Leap Year Checker
Check whether any year is a leap year.
Results are estimates for informational purposes and are not financial, medical or legal advice.