Mathematical manipulation of money (adding, subtracting etc.) can be very tricky (floating point precision, etc.). For the reason above, there is a package designed specifically for this purpose. I suggest you consider using it: https://github.com/akaunting/money Thanks