Sub topic 12
Proving the Ledger with a Trial Balance
This chapter assumes you know the accounting equation, the five account types, and how to post journal entries to T-accounts. You should also be able to find an account's balance from its debit and credit sides.
What a trial balance is
A trial balance is a list of every ledger account with its balance, split into a debit column and a credit column. You prepare it after posting. If every entry was balanced and posted correctly, the two column totals are equal.
The trial balance checks the arithmetic of double-entry bookkeeping. It does not check that each transaction was recorded in the right accounts.
Building one from the ledger
Follow these steps:
- Calculate the balance of each ledger account: the larger side minus the smaller side.
- Place each balance in the column of the side that is larger. A debit-side balance goes in the debit column. A credit-side balance goes in the credit column.
- Add each column.
- Compare the two totals.
A normal balance is the side where an account's balance usually sits. Assets and expenses normally have debit balances. Liabilities, equity and revenue normally have credit balances. An account in the opposite column, such as a Cash account with a credit balance, is a warning sign. It means an overdraft or an error.
The diagram shows the flow from journal to proof.
A worked example
This script posts four January entries and prints the trial balance. It also stops with an error if any entry is unbalanced or if the final totals differ.
from collections import defaultdict
# Each journal entry: (date, memo, [(account, side, amount_in_whole_dollars), ...])
journal = [
("2026-01-02", "Owner invests cash",
[("Cash", "debit", 10000), ("Owner's Capital", "credit", 10000)]),
("2026-01-05", "Buy supplies on credit",
[("Supplies", "debit", 800), ("Accounts Payable", "credit", 800)]),
("2026-01-09", "Services for cash and on account",
[("Cash", "debit", 1500), ("Accounts Receivable", "debit", 2500),
("Service Revenue", "credit", 4000)]),
("2026-01-15", "Pay rent",
[("Rent Expense", "debit", 1200), ("Cash", "credit", 1200)]),
]
# Post: copy each line to the debit or credit side of its ledger account.
ledger = defaultdict(lambda: {"debit": [], "credit": []})
for date, memo, lines in journal:
total_debits = sum(a for _, side, a in lines if side == "debit")
total_credits = sum(a for _, side, a in lines if side == "credit")
assert total_debits == total_credits, f"Unbalanced entry on {date}: {memo}"
for account, side, amount in lines:
ledger[account][side].append(amount)
# Balance each account and build the trial balance.
debit_column = credit_column = 0
for account, sides in ledger.items():
net = sum(sides["debit"]) - sum(sides["credit"])
if net >= 0:
debit_column += net
print(f"{account:<22}{net:>8}{'':>8}")
else:
credit_column += -net
print(f"{account:<22}{'':>8}{-net:>8}")
print(f"{'Totals':<22}{debit_column:>8}{credit_column:>8}")
assert debit_column == credit_columnThe output lists each account with its balance. Cash is 10,300 (10,000 + 1,500 − 1,200). Both columns total 14,800.
| Account | Debit | Credit |
|---|---|---|
| Cash | 10,300 | |
| Supplies | 800 | |
| Accounts Receivable | 2,500 | |
| Rent Expense | 1,200 | |
| Owner's Capital | 10,000 | |
| Accounts Payable | 800 | |
| Service Revenue | 4,000 | |
| Totals | 14,800 | 14,800 |
What equal totals prove, and what they miss
Equal totals show that total debits equal total credits in the ledger. They do not show that every posting is right. Some errors leave the totals equal:
- A transaction was never journalized or never posted.
- A correct amount was posted to the wrong account, such as rent debited to Supplies.
- A debit and a credit of the same wrong amount were both posted.
- Two errors of equal size offset each other.
Other errors make the totals differ. Examples are posting only one side of an entry, posting a debit as a credit, and a transposition such as 450 written as 540. A difference divisible by 9 often points to a transposition or slide.
Exercise
A trial balance shows debits of 14,800 and credits of 14,300. The 500 difference could come from which kind of mistake, and could a misposted 500 payment to the wrong expense account cause it?
Show answer
A one-sided error could cause it, for example a 500 credit that was never posted, or a 500 debit posted twice. A payment debited to the wrong expense account would not cause it, because the debit and credit totals would still be equal. The trial balance would not reveal that error.