I'm doing accounting in google sheet so my column C and D are all numbers with 2 decimal points. But somehow when I subtract sum of debit and sum of credit, the result is a small number when it should be 0. Really confused.
This is due to what's known as floating-point calculation. The short version is that numbers calculated in different ways, even if they are equal on paper, will wind up carrying small artifacts way out in the decimal range.
The resolution is simple, which is to just wrap either the initial
SUM formulas or the final
SUM formula in ROUND(...,2), e.g.