When two or more errors are committed and the net effect of these errors on the debits and credits of accounts is nil, such errors are called compensating errors. Such errors do not affect the tallying of the trial balance.
For example, if purchases book has been overcast by Rs. 10,000 resulting in excess debit of Rs. 10,000 in purchases account and sales returns book is under cast by Rs. 10,000 resulting in short debit to sales returns account is a case of two errors compensating each other's effect. One plus is set off by the other minus, the net effect of these two errors is nil and so they do not affect the agreement of trial balance.