Lesson 20Advanced and capstonesIntermediate

The trial balance (capstone)

Sum all debits, sum all credits, prove they're equal.

By Solomon Ajayi · Free to read, no signup

End of period. You want to PROVE your books are internally consistent before generating any reports. The trial balance is the ritual: sum the balance of every account, debits on one side, credits on the other, demonstrate they are equal. If they are not, you have a bug somewhere, a missing line, a typo, a corrupted insert. The trial balance is what makes double-entry self-checking.

Every entry in this course balanced internally: debits equaled credits, one entry at a time. The trial balance asks the bigger question. If each entry balanced, then summing the balances of every account across the entire ledger must also balance, total debits equal to total credits. This is not a new rule; it is the inevitable consequence of the rule you have followed since lesson one, checked all at once.

That makes it a global integrity check you can run any time. You tally the debit balance of every account, tally every credit balance, and compare. Because every correct transaction preserved the invariant, the two totals have to match. The trial balance is the moment the whole ledger gets to prove it is still consistent, not just each entry in isolation.

When the two sides do not match, that is not an accounting subtlety; it is a bug. A missing line in an entry, a typo, a partial write, a corrupted insert: anything that broke the debit-equals-credit invariant shows up here as a non-zero difference. This is exactly why serious systems run a trial balance check before any report can be exported, because a report built on a ledger that does not balance is a report that lies.

Worked example, step by step

Transaction 1: Owner funds the business ₦10,000

Standard funding. Owner contributes capital.

Owner contributes ₦10,000
AccountDebitCredit
Cash (1100)₦10,000.00
Owner's Equity (3000)₦10,000.00

Cash UP ₦10,000 (asset, debit). Owner's Equity UP ₦10,000 (equity, credit). After this: Cash debit balance ₦10,000, Equity credit balance ₦10,000. Trial balance so far: Dr ₦10K = Cr ₦10K.

Transaction 2: User deposits ₦5,000

A user funds their wallet.

User deposits ₦5,000
AccountDebitCredit
Cash (1100)₦5,000.00
User Wallet (2000)₦5,000.00

Cash UP ₦5,000. User Wallet UP ₦5,000 (liability). Trial balance now: Cash ₦15K + nothing else on debit side = ₦15K debit. Equity ₦10K + User Wallet ₦5K = ₦15K credit. Still balanced.

Transaction 3: Earn ₦2,000 of revenue (charged to user wallet)

You provided a service. User pays from their wallet. Revenue recognized.

Earn ₦2,000 revenue from user wallet
AccountDebitCredit
User Wallet (2000)₦2,000.00
Revenue (4000)₦2,000.00

User Wallet DOWN ₦2,000 (debit). Revenue UP ₦2,000 (credit). After: Cash ₦15K (Dr), User Wallet ₦3K (Cr), Equity ₦10K (Cr), Revenue ₦2K (Cr). Trial balance: ₦15K Dr = ₦15K Cr. Still balanced.

Transaction 4: Pay ₦1,000 of expenses in cash

Office rent, software, whatever. Cash goes out.

Pay ₦1,000 expenses
AccountDebitCredit
Expense (5000)₦1,000.00
Cash (1100)₦1,000.00

Expense UP ₦1,000 (debit). Cash DOWN ₦1,000 (credit). After: Cash ₦14K (Dr), Expense ₦1K (Dr), User Wallet ₦3K (Cr), Equity ₦10K (Cr), Revenue ₦2K (Cr). Trial balance: Dr ₦14K+1K = ₦15K. Cr ₦3K+10K+2K = ₦15K. Still balanced, every transaction has preserved the invariant.

Takeaway

The trial balance is the diagnostic ritual of double-entry: sum every account's debit balance, sum every credit balance, prove they are equal. If they are not, you have a bug, a missing line in an entry, a typo, a corrupted insert. This is what makes the system self-checking. Reports built on a non-balancing ledger lie, and every serious accounting system runs a trial balance check before any report can be exported.

Practice this on a real ledger

Reading is half of it. Open this lesson in the lab to post the entries yourself against a real Postgres-backed double-entry ledger, with the validation on. Free, your sandbox is yours.

More in this section

Search lessons

Type to find any of the 85 lessons. Press Enter to open.