Sub topic 6
Calculating Each Account's Ending Balance
This chapter assumes you know the accounting equation, how debits and credits work, and how journal entries are posted to ledger accounts. Here you turn posted ledger accounts into one ending balance per account. Those balances become the numbers on the unadjusted trial balance.
What an ending balance is
An ending balance is the net amount left in a ledger account after you total its debits and its credits and subtract the smaller total from the larger. The side with the larger total gives the balance its direction.
- If debits exceed credits, the account has a debit balance.
- If credits exceed debits, the account has a credit balance.
- If they are equal, the balance is zero.
For most accounts the result lands on the normal side. Assets and expenses normally carry debit balances. Liabilities, equity and revenue normally carry credit balances. A balance on the opposite side is possible, but it deserves a second look.
The procedure
- Total all debit postings in the account.
- Total all credit postings in the account.
- Subtract the smaller total from the larger.
- Record the difference on the side with the larger total.
Use the data from Example Services Co. for January. The Cash account holds these postings:
| Posting | Debit | Credit |
|---|---|---|
| Owner investment | 10,000 | |
| Equipment purchase (cash paid) | 1,500 | |
| Service revenue earned | 3,000 | |
| Rent paid | 800 | |
| Totals | 13,000 | 2,300 |
The debit total of 13,000 exceeds the credit total of 2,300. The ending balance is 13,000 − 2,300 = 10,700, a debit.
The other accounts are simpler because each has a single posting:
| Account | Debits | Credits | Ending balance |
|---|---|---|---|
| Equipment | 4,000 | 0 | 4,000 Dr |
| Accounts Payable | 0 | 2,500 | 2,500 Cr |
| Owner's Capital | 0 | 10,000 | 10,000 Cr |
| Service Revenue | 0 | 3,000 | 3,000 Cr |
| Rent Expense | 800 | 0 | 800 Dr |
Automating the calculation
The script nets each account's debits minus credits. A positive result is a debit balance and a negative result is a credit balance. This is the same rule as the manual procedure.
from collections import defaultdict
# Each posting: (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 = defaultdict(int)
for account, debit, credit in lines:
net[account] += debit - credit
for account, balance in net.items():
side = "Dr" if balance > 0 else "Cr" if balance < 0 else "zero"
print(f"{account:<18}{abs(balance):>8} {side}")Running it prints Cash 10,700 Dr, Owner's Capital 10,000 Cr, Equipment 4,000 Dr, Accounts Payable 2,500 Cr, Service Revenue 3,000 Cr and Rent Expense 800 Dr. These match the manual results.
Process overview
Common errors
- Subtracting on the wrong side. Reporting 10,700 as a credit because the account has a credit column is a frequent slip. Always compare the totals first.
- Skipping a posting. A missed line changes the balance by exactly that amount, so check the posting count against the journal.
- Treating the normal side as a fact. The normal balance tells you what to expect. The actual balance comes from the arithmetic. A Cash account with a credit balance signals an overdraft or a posting error.
- Keeping running balances unchecked. If your ledger shows a running balance, confirm the final line equals your own totals-based result.
Exercise
The Supplies account has debit postings of 600 and 250, and credit postings of 120. What is its ending balance, and on which side?
Show answer
Debits total 850 and credits total 120. The difference is 850 − 120 = 730. The balance is 730 on the debit side, which is the normal side for an asset.
Exercise
An Accounts Payable account has debit postings of 900 and credit postings of 2,400 and 700. What is the ending balance?
Show answer
Credits total 3,100 and debits total 900. The difference is 2,200, so the ending balance is 2,200 credit, the normal side for a liability.