Conditional formula in a formula field

Conditional formula in a formula field

I had the following very simple formula in a formula field:

12 / input.Interval_months     (where input.Interval_months is a decimal)

This works absolutely fine.

However, I want to make this a conditional formula, so I amended it to the following:

 if(Charging_Method == "NO FORMAL AGREEMENT",  0,  12 / input.Interval_months)

Very strangely, this formula now only works if the r esult is a whole number. If 'Interval_months' is 6, the formula correctly shows the value '2'. However, if the 'Interval_months' is changed to 24, the calculation is not made and the formula value does not change from '2'.  The result is the same if 'Interval_months' is any value in which the formula result has decimal places.

Can anyone see where I am going wrong?