Modified formula to account for integer rounding