When you say you have "8" in a cell and "5" in another cell, for instance, my guess is that those aren't the actual raw numbers in the cells. Instead, you may have set the formatting for those cells to show whole numbers, while the actual underlying numbers are fractional. For instance, if you click on the cell that shows "8" and look in the formula bar up top, you may find that the underlying number is really 8.4; and if you click on the cell that shows "5" and look in the formula bar up top, you may find that the underlying number is really 4.8. Subtracting one cell from the other, then would result in 3.8, which your whole-number formatting would show as 4, not 3.
Formatting only changes what you see, not what the numbers really are. Your best bet, if you want to deal in real whole numbers is to wrap all formulas that show whole numbers in ROUND(). For example, if the formula that results in "8" (but really 8.4) is
=A2 * B2 / C2
then you'd change the formula to
=ROUND(A2 * B2 / C2)
If you do this for every cell that contains a formula somewhere in the chain that leads to your final result, then they should all show what you expect to see.