Calculation Issues

Calculate Months Between Dates and Round After the 15th in Excel

Chanuka GeekiyanageChanuka Geekiyanage Dec 2, 2026 868 views

Question details

Calculate the difference between two dates in calendar months, treating each date after the 15th as belonging to the following month.

Calculate Months Between Dates and Round After the 15th in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The start date is in A3 and the end date is in B3, and the user wants to apply the same 15th-day cutoff to both dates.
Observed behavior
The desired result is the difference between the two adjusted calendar months, rather than a count of completed months.
Before you start

Enter valid Excel dates in A3 and B3, with the start date in A3 and the end date in B3. Dates on the 15th remain in their original month; dates on the 16th or later count as the next month.

Solution 1Recommended

Calculate the difference between adjusted calendar months

Use this formula when each date after the 15th should be assigned to the following calendar month.

The formula converts each date to a month number, adds one if its day is greater than 15, and subtracts the adjusted start month from the adjusted end month. It applies the cutoff to each date separately, not to the elapsed days between them.

1
Enter the dates

In the worksheet, enter the start date in A3 and the end date in B3.

2
Enter the formula

Select an empty cell such as C3 and enter =(12*YEAR(B3)+MONTH(B3)+(DAY(B3)>15))-(12*YEAR(A3)+MONTH(A3)+(DAY(A3)>15)).

3
Check the result

Press Enter. If the result appears as a date, select C3 and choose General from the number format menu on the Home tab.

Calculate the difference between adjusted calendar months
Example cutoff: January 15 to February 16 returns 2 because the end date counts as March. January 16 to February 15 returns 0 because both dates count as February.
Calculate dates in WPS Spreadsheet

Calculate adjusted calendar months in WPS Spreadsheet

Use the same YEAR, MONTH, and DAY formula in WPS Spreadsheet to compare dates with the 15th-day cutoff.

  1. 1. Open the worksheet: Open WPS Spreadsheet and create a workbook or open an Excel file.
  2. 2. Enter the dates: Enter the start date in A3 and the end date in B3.
  3. 3. Calculate the months: Select C3, enter =(12*YEAR(B3)+MONTH(B3)+(DAY(B3)>15))-(12*YEAR(A3)+MONTH(A3)+(DAY(A3)>15)), and press Enter.
  4. 4. Format the result: If C3 displays as a date, select the cell and choose General from the number format menu.
Apply the cutoff to both dates with one formulaOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet cells and formulas
microsoft office alternative - wps office

Frequently Asked Questions

Does the 15th count as the next month?

No. The formula uses DAY(date)>15, so the 15th stays in its original month and the 16th is the first day treated as the next month.

Is the cutoff applied to both dates?

Yes. The formula adjusts A3 and B3 independently before subtracting their month numbers. It does not round the elapsed time between the dates.

How do I count completed months instead?

Enter =DATEDIF(A3,B3,"m") in an empty cell, with the earlier date in A3 and the later date in B3. This counts whole elapsed months without the 15th-day rule.

Why does the formula result look like a date?

The result cell may have a date format. Select it and choose General from the number format menu on the Home tab to display the month count.