Sub topic 9
Building the Unadjusted Trial Balance
This chapter assumes you know the accounting equation, how debits and credits work, and how a journal entry is posted to a ledger account. Here you take finished ledger accounts and list them in an unadjusted trial balance.
What you are building
An unadjusted trial balance is a two-column list of every ledger account and its ending balance, prepared before any adjusting entries. Each balance goes in the column that matches its normal side. Debit balances go in the left column and credit balances go in the right column.
The layout follows a fixed pattern:
- A three-line heading: company name, report title, and the "as of" date.
- One row per account, in chart-of-accounts order: assets, liabilities, equity, revenues, expenses.
- A debit column and a credit column.
- A totals row under both columns.
The report covers one moment, so the heading uses "As of January 31". An income statement would say "For the month ended".
The procedure
Place a balance in the column where it naturally falls. A normal asset balance is a debit. A normal liability balance is a credit. Normal means the balance sits on the side that increases the account. An account with a zero balance can be left off or listed with a dash.
Worked example
Example Services Co. ended January with these ledger balances:
| Account | Ending balance | Side |
|---|---|---|
| Cash | 10,700 | Debit |
| Equipment | 4,000 | Debit |
| Accounts Payable | 2,500 | Credit |
| Owner's Capital | 10,000 | Credit |
| Service Revenue | 3,000 | Credit |
| Rent Expense | 800 | Debit |
Cash comes from 10,000 + 3,000 in debits less 1,500 + 800 in credits. The finished trial balance looks like this:
Example Services Co.
Unadjusted Trial Balance
As of January 31
Account Debit Credit
Cash 10,700
Equipment 4,000
Accounts Payable 2,500
Owner's Capital 10,000
Service Revenue 3,000
Rent Expense 800
------ ------
Totals 15,500 15,500The debit total is 10,700 + 4,000 + 800 = 15,500. The credit total is 2,500 + 10,000 + 3,000 = 15,500. The totals agree.
Doing the same thing in code
This script nets each account's debits and credits, assigns each balance to a column, and compares the totals.
from collections import defaultdict
# Each line of a journal entry: (account, debit, credit)
lines = [
("Cash", 10000, 0),
("Owner's Capital", 0, 10000),
("Equipment", 4000, 0),
("Cash", 0, 1500),
("Accounts Payable", 0, 2500),
("Cash", 3000, 0),
("Service Revenue", 0, 3000),
("Rent Expense", 800, 0),
("Cash", 0, 800),
]
# Net balance per account: positive means debit, negative means credit
net = defaultdict(int)
for account, debit, credit in lines:
net[account] += debit - credit
debit_total = sum(b for b in net.values() if b > 0)
credit_total = -sum(b for b in net.values() if b < 0)
for account, balance in net.items():
dr = balance if balance > 0 else ""
cr = -balance if balance < 0 else ""
print(f"{account:<18}{dr!s:>8}{cr!s:>8}")
print(f"{'Totals':<18}{debit_total:>8}{credit_total:>8}")
print("Balanced" if debit_total == credit_total else "Out of balance")The script prints accounts in the order they first appear, not chart-of-accounts order. A real report sorts by account number.
Common mistakes when building the list
- Putting a balance in the wrong column. A credit balance in Accounts Payable entered as a debit makes the totals differ by twice the amount.
- Listing an account's debit and credit postings separately instead of netting them into one balance.
- Leaving out an account that has a balance.
- Copying a balance incorrectly, such as writing 540 as 450.
Exercise
A ledger shows Cash 6,200 (debit), Supplies 400 (debit), Accounts Payable 1,100 (credit), Owner's Capital 5,000 (credit), and Service Revenue 900 (credit). Build the totals. Do the columns agree?
Show answer
Debits are 6,200 + 400 = 6,600. Credits are 1,100 + 5,000 + 900 = 7,000. The columns differ by 400, so the trial balance is out of balance. A debit of 400 is missing or a credit is overstated, and you would search for the cause. For example, an expense account with a 400 debit balance may have been left off.