A trial balance is a bookkeeping worksheet that compiles the debit and credit balances of all general ledger accounts. It is prepared periodically, usually at the end of a reporting period, to check that the mathematical totals of debits and credits in the general ledger are equal. It acts as the first step in preparing financial statements and ensures account balances are accurately extracted from ledgers. While a trial balance verifies arithmetic accuracy, some errors may remain undetected if offsetting incorrect debits and credits are made.