Sub topic 9
Posting to the ledger and finding balances
This chapter assumes you can write a balanced journal entry and know each account type's normal balance. Those topics come from the earlier chapters. Here you take finished journal entries, copy them into accounts, and compute what each account holds. That step is called posting.
From journal to ledger
The journal records transactions in date order. Each entry lists its debit and credit lines together, so you can see why it was made. The journal does not tell you how much cash you have. To find that, you would have to scan every entry and pick out the Cash lines.
The ledger is the collection of all accounts. Each account holds every line that touched it, across all entries. Posting is the act of copying each journal line into the account it names. A debit line goes on the left side of that account. A credit line goes on the right side.
Posting rearranges information and does not change it. The journal is organized by transaction. The ledger is organized by account. Every line appears in both places.
The three entries from this tutorial's running example are:
1) Dr Cash 1,000
Cr Owner Capital 1,000
2) Dr Cash 500
Cr Service Revenue 500
3) Dr Rent Expense 300
Cr Cash 300Entry 1 has two lines, so it is posted to two accounts. The same is true of entries 2 and 3. Six lines are posted in total.
Posting step by step
For each line in each entry, do four things:
- Find the account named on the line. Create it if it does not exist yet.
- Look at the side. Debit goes left, credit goes right.
- Write the amount on that side.
- Record a reference back to the journal entry, such as its number or date.
The reference in step 4 is easy to skip, but it matters. It lets you trace any ledger amount back to the entry that caused it. Auditors and bookkeepers rely on this trail when a balance looks wrong.
Here is the Cash account after posting all three entries. The number in parentheses is the journal entry number:
Cash
Debit | Credit
(1) 1,000 | (3) 300
(2) 500 |
-------------------+------------------
Total 1,500 | Total 300The other accounts look like this:
Owner Capital Service Revenue Rent Expense
Dr | Cr Dr | Cr Dr | Cr
| (1) 1,000 | (2) 500 (3) 300 |Finding a balance
An account's balance is the net effect of everything posted to it. To find it:
- Add up all debits in the account.
- Add up all credits in the account.
- Subtract the smaller total from the larger.
- The balance sits on the side with the larger total.
For Cash, debits total 1,500 and credits total 300. The difference is 1,200, and it falls on the debit side. So Cash has a debit balance of 1,200.
Compare the result with the account's normal balance. Cash is an asset, and assets are debit-normal. A debit balance is therefore the expected direction. The company has 1,200 of cash.
The same method gives the other three balances:
| Account | Total debits | Total credits | Balance | Normal side |
|---|---|---|---|---|
| Cash | 1,500 | 300 | 1,200 Dr | Debit |
| Owner Capital | 0 | 1,000 | 1,000 Cr | Credit |
| Service Revenue | 0 | 500 | 500 Cr | Credit |
| Rent Expense | 300 | 0 | 300 Dr | Debit |
Check the arithmetic against the accounting equation. Assets are 1,200. Equity is owner capital of 1,000 plus revenue of 500 minus expenses of 300, which is 1,200. Liabilities are zero. The equation holds: 1,200 = 0 + 1,200.
Running balances
A T-account shows totals for each side. Many ledgers instead use a running balance format. Each posting is a row, and the account's balance is updated after every row. Here is Cash in that format:
| Entry | Debit | Credit | Balance |
|---|---|---|---|
| 1 | 1,000 | 1,000 Dr | |
| 2 | 500 | 1,500 Dr | |
| 3 | 300 | 1,200 Dr |
The final row matches the T-account result. Running balances are convenient because you can read the balance at any point in time. This is what a bank statement does. Banks write their statements from the bank's own viewpoint. Your deposit is a credit on the bank's books because the bank owes you that money. The bank's liability goes up with a credit.
Posting in code
The program below posts journal entries into a ledger and computes each account's balance in its normal direction. It uses Decimal so that cents never pick up floating-point error.
from collections import defaultdict
from decimal import Decimal
DEBIT_NORMAL = {"asset", "expense"}
ACCOUNT_TYPES = {
"Cash": "asset",
"Owner Capital": "equity",
"Service Revenue": "revenue",
"Rent Expense": "expense",
}
journal = [
(1, [("Cash", "debit", Decimal("1000")),
("Owner Capital", "credit", Decimal("1000"))]),
(2, [("Cash", "debit", Decimal("500")),
("Service Revenue", "credit", Decimal("500"))]),
(3, [("Rent Expense", "debit", Decimal("300")),
("Cash", "credit", Decimal("300"))]),
]
def post(entries):
"""Copy every journal line into the ledger, keeping the entry number."""
ledger = defaultdict(list)
for number, lines in entries:
for account, side, amount in lines:
ledger[account].append((number, side, amount))
return ledger
def balance(account, postings):
"""Return (amount, side). Positive means the balance is on the normal side."""
normal = "debit" if ACCOUNT_TYPES[account] in DEBIT_NORMAL else "credit"
total = Decimal("0")
for _, side, amount in postings:
total += amount if side == normal else -amount
return total, normal
ledger = post(journal)
for account, postings in ledger.items():
amount, normal = balance(account, postings)
print(f"{account:<16}{amount:>8} {normal}")
print()
running = Decimal("0")
for number, side, amount in ledger["Cash"]:
running += amount if side == "debit" else -amount
print(f"entry {number}: cash balance {running}")Running it prints:
Cash 1200 debit
Owner Capital 1000 credit
Service Revenue 500 credit
Rent Expense 300 debit
entry 1: cash balance 1000
entry 2: cash balance 1500
entry 3: cash balance 1200The post function keeps the entry number with each line, which is the code version of the reference column. The balance function reports the amount relative to the account's normal side. A negative result would tell you the account has drifted to the abnormal side.
The posting process as a flow
The diagram shows where posting sits between the entry and the trial balance.
Abnormal balances
Normally an account's balance sits on its normal side. A balance on the other side is an abnormal balance. It is not always an error, but it always deserves a look.
- A Cash account with a credit balance means you wrote more cheques than you had money. A bank would call this an overdraft. In some systems, that amount belongs in a liability account instead.
- A Rent Expense account with a credit balance would mean you recorded a refund larger than all the rent you ever paid. That is almost certainly a mistake.
- An Accounts Receivable account with a credit balance often means a customer overpaid.
Contra accounts, covered in a later chapter, are different. They are meant to carry a balance opposite to their parent account. Treat those as normal.
Posting errors to watch for
Three errors come up often during posting. A trial balance catches only the first.
- One-sided posting. You post the debit line but forget the credit line. Total debits and total credits in the ledger no longer match.
- Wrong side. You post a credit amount on the left. The ledger may still balance if you made a matching error elsewhere, but the account balance is wrong.
- Wrong account. You post a rent payment to Utilities Expense. Debits equal credits, the ledger is balanced, and the answer is still wrong.
Posting from the journal in order, one entry at a time, reduces all three. Checking that each entry's lines were all posted before moving on is the simplest control.
Why the ledger matters
Reports come from account balances. The income statement uses revenue and expense balances. The balance sheet uses asset, liability and equity balances. If the ledger is wrong, every report built on it is wrong. The next chapter takes the four balances computed here and tests them with a trial balance.
Exercise
A ledger account named Equipment (an asset) has these postings: debit 4,000 on 3 March, debit 1,500 on 10 March, and credit 800 on 20 March. What is the balance, which side is it on, and is it normal?
Show answer
Total debits are 4,000 + 1,500 = 5,500. Total credits are 800. The difference is 4,700, and it falls on the debit side because debits are larger. The balance is 4,700 debit. Equipment is an asset, which is debit-normal, so this is a normal balance.
Exercise
You post a 250 rent payment as a debit to Rent Expense and, by mistake, as a debit (not a credit) to Cash. What happens to the ledger totals, and will a balance check detect it?
Show answer
Both lines are debits, so total debits rise by 500 while total credits rise by 0. Total debits no longer equal total credits, so a balance check will detect the problem. The Cash balance is also overstated by 500 compared with the correct figure, because a 250 credit should have reduced it by 250 rather than a debit raising it by 250.