Sub topic 6
Working through transactions step by step
What this chapter assumes
You should already know the three elements and the equation from the earlier chapters. Assets are what the business controls. Liabilities are what it owes. Equity is the owners' residual claim. The equation is Assets = Liabilities + Equity. You should also be comfortable reading a small table of running totals.
This chapter turns the equation into a procedure. You will analyze ten transactions for one small business, check the equation after each one, and then automate the check in Python. You will also meet the mistakes that most often break the analysis.
What counts as a transaction
A transaction is an event that changes the business's assets, liabilities, or equity and can be measured in money. Buying equipment, borrowing from a bank, delivering a service, and paying a bill are all transactions.
Many business events are not transactions in this sense. Signing an agreement to buy equipment next month changes nothing yet. Neither does hiring an employee who has not started working. Nothing has been delivered or earned, and no one owes anyone money. The equation stays the same until a measurable change occurs.
Because each recorded transaction is a complete change to the books, it must leave the equation balanced. That follows from how the equation is defined. If a change did not balance, you would have recorded only part of it.
A repeatable method
Use the same four steps for every transaction.
- Identify the accounts. Name each thing that changed, such as cash, equipment, a bank loan, or revenue.
- Classify each account. Decide whether it is an asset, a liability, or part of equity.
- Find the direction and size of each change. Decide whether each account went up or down, and by how much.
- Check the balance. The total change on the left side must equal the total change on the right side.
If step 4 fails, go back to step 1. Almost every failure means you missed an account, such as the other side of a purchase on credit. It rarely means the arithmetic is wrong.
A worked example: Maple Design
Maple Design is a new freelance design studio owned by one person. All amounts are in one currency unit. The equity changes are labeled by cause, which prepares you for the next chapter on the expanded equation.
Transaction 1: the owner invests cash
The owner deposits 20,000 into a new business bank account in exchange for ownership. Cash, an asset, rises by 20,000. The owner's claim, equity, rises by 20,000. No one else has a claim on this money.
Transaction 2: the business borrows
The bank lends 5,000. Cash rises by 5,000, and a new liability, the bank loan, rises by 5,000. Equity does not change. The borrowed cash is not earned and not contributed by the owner, so it belongs to the bank until repaid.
Transaction 3: buying equipment for cash
The studio buys a computer and printer for 6,000 cash. Cash falls by 6,000 and equipment rises by 6,000. Total assets are unchanged. Only the form of the assets changed. Neither liabilities nor equity move.
Transaction 4: buying supplies on account
The studio buys 800 of supplies and agrees to pay the supplier later. Supplies, an asset, rise by 800. Accounts payable, a liability for amounts owed to suppliers, rise by 800. The business gained something it controls and took on a matching obligation.
Transaction 5: earning revenue in cash
The studio finishes a job and is paid 4,000 immediately. Cash rises by 4,000. Equity rises by 4,000 because revenue increases the owner's residual claim.
Transaction 6: earning revenue on credit
The studio finishes another job worth 3,000, and the client will pay later. The studio has earned the revenue now, so equity rises by 3,000. The studio also has a right to collect, which is an asset called accounts receivable. Receivables rise by 3,000.
Transaction 7: paying rent
The studio pays 1,200 of rent in cash. Cash falls by 1,200. The rent used up value without leaving the business with anything it controls, so equity falls by 1,200. This reduction in equity is an expense.
Transaction 8: paying a supplier
The studio pays 500 of what it owes the supplier. Cash falls by 500 and accounts payable fall by 500. Equity does not change, because paying a debt is not an expense. The expense-like cost was already part of the purchase of supplies.
Transaction 9: collecting from a client
The client pays 2,000 of the 3,000 owed. Cash rises by 2,000 and accounts receivable fall by 2,000. Equity does not change, because the revenue was recorded in transaction 6.
Transaction 10: the owner withdraws cash
The owner takes 1,000 out for personal use. Cash falls by 1,000 and equity falls by 1,000. This is a distribution to the owner, not an expense of running the business.
The running totals
| # | Transaction | Assets | Liabilities | Equity |
|---|---|---|---|---|
| 1 | Owner invests 20,000 | 20,000 | 0 | 20,000 |
| 2 | Borrow 5,000 | 25,000 | 5,000 | 20,000 |
| 3 | Buy equipment for 6,000 cash | 25,000 | 5,000 | 20,000 |
| 4 | Buy 800 supplies on account | 25,800 | 5,800 | 20,000 |
| 5 | Earn 4,000 cash revenue | 29,800 | 5,800 | 24,000 |
| 6 | Bill client 3,000 | 32,800 | 5,800 | 27,000 |
| 7 | Pay 1,200 rent | 31,600 | 5,800 | 25,800 |
| 8 | Pay supplier 500 | 31,100 | 5,300 | 25,800 |
| 9 | Collect 2,000 from client | 31,100 | 5,300 | 25,800 |
| 10 | Owner withdraws 1,000 | 30,100 | 5,300 | 24,800 |
After every row, Assets equal Liabilities plus Equity. Transactions 3 and 9 changed the mix of assets without changing any total.
The final account balances are:
- Cash: 22,300 (20,000 + 5,000 − 6,000 + 4,000 − 1,200 − 500 + 2,000 − 1,000)
- Accounts receivable: 1,000
- Supplies: 800
- Equipment: 6,000
- Bank loan: 5,000
- Accounts payable: 300
- Equity: 24,800
Check: 22,300 + 1,000 + 800 + 6,000 = 30,100 in assets. 5,000 + 300 + 24,800 = 30,100 on the other side.
The shapes a transaction can take
Each transaction changes at least two items. You can group the possibilities into a few shapes, and recognizing them speeds up your analysis.
| Shape | Typical example | Effect on totals |
|---|---|---|
| Asset up, asset down | Buy equipment with cash; collect a receivable | Assets unchanged |
| Asset up, liability up | Borrow cash; buy supplies on account | Both sides rise |
| Asset up, equity up | Owner invests; earn cash revenue | Both sides rise |
| Asset down, liability down | Repay a loan; pay a supplier | Both sides fall |
| Asset down, equity down | Pay an expense in cash; owner withdraws cash | Both sides fall |
| Liability up, equity down | Receive a bill for an expense not yet paid | Equity falls, liabilities rise |
| Liability up, liability down | Replace one debt with another | Liabilities unchanged |
A transaction can also combine shapes. For example, if you buy equipment for 10,000 by paying 2,000 in cash and signing a note for 8,000, then equipment rises by 10,000, cash falls by 2,000, and the liability rises by 8,000. On the left side the net change is +8,000, and on the right it is also +8,000.
Checking the equation in code
The same procedure can be automated. The program below keeps one balance per account, labels each account as an asset, a liability, or equity, and rejects any transaction that would leave the equation unbalanced.
For this chapter, each equity account holds its effect on equity. Revenue is positive, and expenses and owner withdrawals are negative. Later chapters will show how debits and credits handle this more cleanly.
from collections import defaultdict
ASSET, LIABILITY, EQUITY = "asset", "liability", "equity"
KINDS = {
"cash": ASSET,
"accounts_receivable": ASSET,
"supplies": ASSET,
"equipment": ASSET,
"bank_loan": LIABILITY,
"accounts_payable": LIABILITY,
"owner_capital": EQUITY,
"revenue": EQUITY,
"rent_expense": EQUITY,
"owner_draws": EQUITY,
}
balances = defaultdict(int)
def totals():
result = {ASSET: 0, LIABILITY: 0, EQUITY: 0}
for account, amount in balances.items():
result[KINDS[account]] += amount
return result
def post(description, changes):
"""Apply changes (account -> signed amount); undo and raise if unbalanced."""
before = dict(balances)
for account, amount in changes.items():
balances[account] += amount
t = totals()
if t[ASSET] != t[LIABILITY] + t[EQUITY]:
balances.clear()
balances.update(before)
raise ValueError(f"Unbalanced transaction rejected: {description}")
print(f"{description:<34}{t[ASSET]:>8}{t[LIABILITY]:>8}{t[EQUITY]:>8}")
post("1 Owner invests", {"cash": 20000, "owner_capital": 20000})
post("2 Borrow from bank", {"cash": 5000, "bank_loan": 5000})
post("3 Buy equipment", {"equipment": 6000, "cash": -6000})
post("4 Buy supplies on account", {"supplies": 800, "accounts_payable": 800})
post("5 Cash revenue", {"cash": 4000, "revenue": 4000})
post("6 Revenue on credit", {"accounts_receivable": 3000, "revenue": 3000})
post("7 Pay rent", {"cash": -1200, "rent_expense": -1200})
post("8 Pay supplier", {"cash": -500, "accounts_payable": -500})
post("9 Collect from client", {"cash": 2000, "accounts_receivable": -2000})
post("10 Owner withdraws", {"cash": -1000, "owner_draws": -1000})
# A deliberately incomplete entry: equipment appears, but nothing pays for it.
try:
post("Bad: equipment with no other side", {"equipment": 500})
except ValueError as error:
print(error)
print(dict(totals()))
# {'asset': 30100, 'liability': 5300, 'equity': 24800}The last line of the table matches the final row of the table above. The rejected entry shows the point of the check. A one-sided change cannot be recorded, because the books would stop balancing. The failed call also leaves the balances untouched, which matters if you keep recording after an error.
The simpler version, which tracks only three totals, is useful for quick checks. Here is a short version that tracks changes to assets, liabilities, and equity directly:
books = {"assets": 0, "liabilities": 0, "equity": 0}
def post(d_assets, d_liabilities, d_equity):
books["assets"] += d_assets
books["liabilities"] += d_liabilities
books["equity"] += d_equity
assert books["assets"] == books["liabilities"] + books["equity"]
post(20000, 0, 20000) # owner invests 20,000 cash
post(5000, 5000, 0) # borrow 5,000 from the bank
post(-2000, -2000, 0) # repay 2,000 of the loan
post(4000, 0, 4000) # earn 4,000 of revenue in cash
print(books) # {'assets': 27000, 'liabilities': 3000, 'equity': 24000}This version hides which accounts changed, so it cannot catch a wrong classification. It can only catch arithmetic that does not balance.
Common errors
Treating a balanced equation as proof of correctness
The equation can balance while the entry is wrong. If you record a 6,000 equipment purchase as a 6,000 reduction in cash and a 6,000 reduction in equity, the equation still holds, but the books are wrong. The balance check finds one-sided entries. It does not find entries that use the wrong accounts.
Confusing cash with revenue and expense
Revenue is recorded when it is earned, and an expense when it is incurred. Neither depends on when cash moves. In transaction 6, equity rose with no cash received. In transaction 9, cash rose with no change to equity.
Treating a loan as income
Borrowed cash raises cash and a liability. Equity does not change. The same applies to repayment. Paying back principal reduces cash and the liability. It is not an expense. Interest on the loan is an expense, because it is the cost of using the money.
Treating asset purchases as expenses
Buying equipment gives the business something it controls that will serve it for years. It is an asset swap, as in transaction 3. The cost reaches equity gradually, through later adjustments you will meet in later chapters.
Mixing up owner investments with revenue
An owner's investment raises equity but is not earned from customers. Keep the two apart, because the expanded equation in the next chapter reports them separately.
Recording owner withdrawals as business expenses
A withdrawal reduces equity, but it is a return to the owner and not a cost of earning revenue. Transaction 10 shows the effect. It reduces cash and equity, and it is tracked on its own.
Edge cases
- Events with no measurable change. Signing a lease or taking a customer order does not change the equation until something is delivered, paid, or owed.
- Prepayments. Paying 1,200 of insurance for a year in advance is an asset swap: cash falls and prepaid insurance, an asset, rises. The cost moves into equity over the year as the coverage is used.
- Receiving cash before earning it. If a client pays 900 in advance, cash rises by 900 and a liability rises by 900, an obligation to perform the work. Equity rises only when the work is done.
- Partial payments. Split a payment into its parts and analyze each part. A 1,000 payment to a supplier that covers 800 of a debt and 200 of a new purchase touches both a liability and an asset or expense.
- Zero net effect on totals. Some transactions leave all three totals unchanged, as in transactions 3 and 9. They are still transactions and still change account balances.
Why every transaction balances
Each transaction records a single event from two angles. Something the business holds changes, and someone's claim on what it holds changes by the same amount. Receiving cash from a loan raises an asset and a creditor's claim together. Selling a service raises an asset and the owner's claim together. Because the equation is a statement that every asset is claimed by someone, any complete change keeps it true.
This is the idea that double-entry bookkeeping is built on. The later chapter on debits and credits gives each side of a transaction a standard name and a standard sign, so that this check can be done mechanically.
Exercise
A studio buys a 9,000 machine by paying 3,000 in cash and signing a note for the remaining 6,000. State the change to each account and show that Assets = Liabilities + Equity still holds. Assume the books balanced before the purchase.
Show answer
Machine (asset) rises by 9,000. Cash (asset) falls by 3,000. Notes payable (liability) rises by 6,000. Equity does not change. Net change in assets is +9,000 − 3,000 = +6,000. Net change in liabilities plus equity is +6,000 + 0 = +6,000. The two sides change by the same amount, so the equation still balances.
Exercise
A client pays Maple Design 900 in advance for a project that has not started. Is this revenue? Show the effect on assets, liabilities, and equity, and say when equity rises.
Show answer
It is not revenue yet. Cash (asset) rises by 900 and a liability for the work owed, often called unearned revenue, rises by 900. Equity does not change, so Assets and Liabilities both rise by 900. Equity rises by 900 when the studio completes the work and the liability is cleared.
Exercise
Starting from the final totals in this chapter (Assets 30,100, Liabilities 5,300, Equity 24,800), record these two transactions and give the new totals. (a) Repay 1,000 of the bank loan in cash. (b) Pay 600 of utilities in cash.
Show answer
(a) Cash falls by 1,000 and the bank loan falls by 1,000. Totals become Assets 29,100, Liabilities 4,300, Equity 24,800. (b) Cash falls by 600 and equity falls by 600, because utilities are an expense. Final totals: Assets 28,500, Liabilities 4,300, Equity 24,200. Check: 4,300 + 24,200 = 28,500.
Exercise
A bookkeeper records the purchase of a 2,500 laptop for cash by decreasing cash by 2,500 and decreasing equity by 2,500. The equation balances. What is wrong, and what is the correct entry?
Show answer
The entry uses the wrong accounts. Buying a laptop is an asset swap, not an expense. The correct entry decreases cash by 2,500 and increases equipment by 2,500, leaving total assets and equity unchanged. The balance check passed because both sides fell by the same amount, so it could not detect the wrong classification.