The formula below will return the number of months between a Start Date and an End Date. Note that the formula first tests to see whether the Start Date is blank or if the End Date is blank. If the Start Date is empty, then zero months are calculated. If the End Date is empty, then the difference between the Start Date and the current period is calculated using the START() function. Therefore, the Line Item containing this formula must be on a monthly timescale.
IF ISBLANK(Start Date) THEN 0 ELSE IF ISBLANK(End Date) THEN YEAR(START()) *12 + MONTH(START()) - (YEAR(Start Date) * 12 + MONTH(Start Date)) ELSE YEAR(End Date) * 12 + MONTH(End Date) - (YEAR(Start Date) * 12 + MONTH(Start Date)).