As Mario shared that help link should get you where you want.
https://help.apptio.com/en-us/studio/formulas-and-functions/functions/months.htm?Highlight=months
At the bottom of the page
The following example subtracts the number of months from the project start date to the project end date, and then multiplies the result by the cost per month.
=((Months(ProjectEnd)-Months(ProjectStart))*ProjectCostPerMonth)