Round up BigDecimal to Integer value
setScale returns a new BigDecimal with the result, it doesn’t change the instance you call it on. So assign the return value back to value: value = value.setScale(0, RoundingMode.UP); Live Example I also changed it to RoundingMode.UP because you said you always wanted to round up. But depending on your needs, you might want RoundingMode.CEILING … Read more