Calculation does not work with decimal

Replace the int with float. Int doesn’t allow fractional parts, float does.

HTH
Jeremy