The primary purpose of the trial balance is to ensure that the individual amounts on the debit and credit sides are correct.
However, it's also worth noting that a trial balance is prepared to check that the total debits equal total credits, which helps confirm the accuracy of the accounting entries before financial statements are prepared.