Sub topic 8
Writing Balanced Journal Entries
This chapter assumes you know the five account types and their normal balances. It also assumes you know which side (debit or credit) increases each type. Here you will turn business events into journal entries, including entries with more than two lines, and check each one before you post it.
What a journal entry records
A journal entry is the first formal record of a transaction. It lists the accounts affected, the side of each account (debit or credit), and the amount. The journal is the book of original entry, and entries are recorded there in date order. Posting to the ledger comes afterward, so the ledger is built from the journal.
Every entry must satisfy one rule: total debits equal total credits. This follows from the accounting equation. Assets equal liabilities plus equity, so a change on one side has to be matched by an equal change elsewhere. A balanced entry cannot break the equation.
Layout conventions
Journal entries follow a standard layout:
- The date goes first.
- Debit lines come first, written at the left margin.
- Credit lines come after, indented.
- Amounts for debits sit in a debit column and amounts for credits in a credit column.
- A short description (the narration) explains the event.
In plain text, Dr marks a debit line and Cr marks a credit line. Many accounting systems omit these labels and rely on columns.
A four-step method
Use the same procedure for every transaction:
- Identify the accounts affected, and what happened to each one.
- Classify each account by type: asset, liability, equity, revenue, or expense.
- Decide whether each account goes up or down, and use its normal balance to choose debit or credit.
- Write the lines and confirm that total debits equal total credits.
Step 1 is where most of the thinking happens. Ask "what did the business receive, and what did it give up or owe?" The answer usually names the accounts.
Worked examples
Owner investment, revenue, and rent
Start with the three transactions from the topic's running example. The owner invests $1,000 cash, the business earns $500 of service revenue in cash, and it pays $300 rent in cash.
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: Cash is an asset and increases, so it is debited. Owner Capital is equity and increases, so it is credited. Entry 2: Cash is debited again. Revenue increases equity, and revenue is credit-normal, so it is credited. Entry 3: Rent Expense is debit-normal and increases, so it is debited. Cash decreases, so it is credited.
A purchase paid partly in cash
The business buys equipment for $2,000. It pays $500 in cash and promises to pay the remaining $1,500 later.
Dr Equipment 2,000
Cr Cash 500
Cr Accounts Payable 1,500Equipment is an asset and increases. Cash, an asset, decreases. Accounts Payable is a liability and increases, because the business now owes a supplier. Debits total 2,000. Credits total 500 + 1,500 = 2,000.
A loan
The business borrows $5,000 from a bank.
Dr Cash 5,000
Cr Notes Payable 5,000Both sides of the equation rise by $5,000. Assets increase, and liabilities increase by the same amount. Equity does not change, and a loan is not revenue.
A sale on credit, then the customer pays
The business completes a $800 service and bills the customer. Later, the customer pays.
Dr Accounts Receivable 800
Cr Service Revenue 800
Dr Cash 800
Cr Accounts Receivable 800Revenue is recorded when the service is done, not when cash arrives. The second entry only swaps one asset for another. It does not record revenue again. Recording revenue twice is a common error.
Compound entries
A compound entry has more than two lines. The rule does not change: the debit total must equal the credit total. The equipment purchase above is a compound entry.
Another case is a payment that covers several things. Suppose the business pays $1,100 in cash: $1,000 of rent and $100 toward an earlier supplier balance.
Dr Rent Expense 1,000
Dr Accounts Payable 100
Cr Cash 1,100Here two debit lines balance one credit line. You can also post this as two separate entries. A compound entry is appropriate when the lines belong to one event, such as one payment or one invoice.
Checking an entry in code
A program can enforce the balance rule before it accepts an entry. This example uses Decimal, because floating-point numbers can introduce rounding errors with money (for instance, 0.1 + 0.2 is not exactly 0.3).
from decimal import Decimal
def validate_entry(lines):
"""Raise ValueError unless the entry is valid and balanced."""
if len(lines) < 2:
raise ValueError("an entry needs at least two lines")
for account, side, amount in lines:
if side not in ("debit", "credit"):
raise ValueError(f"bad side for {account}: {side}")
if amount <= 0:
raise ValueError(f"amount for {account} must be positive")
debits = sum(a for _, side, a in lines if side == "debit")
credits = sum(a for _, side, a in lines if side == "credit")
if debits != credits:
raise ValueError(f"unbalanced: debits {debits}, credits {credits}")
return True
equipment_purchase = [
("Equipment", "debit", Decimal("2000.00")),
("Cash", "credit", Decimal("500.00")),
("Accounts Payable", "credit", Decimal("1500.00")),
]
print(validate_entry(equipment_purchase)) # True
try:
validate_entry([
("Cash", "debit", Decimal("100.00")),
("Service Revenue", "credit", Decimal("90.00")),
])
except ValueError as error:
print(error) # unbalanced: debits 100.00, credits 90.00Amounts are always positive. The side, not the sign of the number, carries the direction. This matches how entries are written on paper.
Common errors
- Reversing the sides. An entry can balance and still be wrong. If you credit Cash and debit Rent Expense when rent is received instead of paid, the totals match, but the books are wrong. Always check that each account moves in the direction the event implies.
- Wrong account type. Treating a loan as revenue, or a purchase of equipment as an expense, produces a balanced but misleading entry.
- One-sided entries. Recording only the cash side leaves the entry incomplete. Every entry needs at least one debit and one credit.
- Recording amounts twice. The customer payment on account is an example. Revenue was already recorded when the service was done.
- Transposition. Writing 1,500 on one side and 1,050 on the other makes the entry unbalanced. A difference divisible by 9 often points to swapped digits.
Corrections
Do not erase or overwrite a posted entry. To fix a mistake, record a new correcting entry. One method reverses the wrong entry, then records the right one. If you recorded a $300 rent payment as an equipment purchase, correct it like this:
Dr Cash 300
Cr Equipment 300
Dr Rent Expense 300
Cr Cash 300The first entry reverses the error. The second records the transaction correctly. The history stays visible, which is the reason accountants and auditors prefer it.
Exercise
A business receives a $1,200 electricity bill and will pay it next month. Write the journal entry and say which account types are involved.
Show answer
Dr Utilities Expense 1,200 and Cr Accounts Payable 1,200. Utilities Expense is an expense account, increased by a debit. Accounts Payable is a liability, increased by a credit, because the business owes the amount. No cash moves yet. Debits and credits both total 1,200.
Exercise
The business buys $900 of supplies, paying $400 in cash and putting the rest on account. Write the compound entry and confirm it balances.
Show answer
Dr Supplies 900; Cr Cash 400; Cr Accounts Payable 500. Supplies is an asset and increases with a debit. Cash decreases with a credit. Accounts Payable is a liability and increases with a credit. Total debits are 900. Total credits are 400 + 500 = 900.
Exercise
An entry reads Dr Cash 700, Cr Service Revenue 700. The event was actually a customer paying an invoice that was already billed last month. What is wrong, and what is the correct entry?
Show answer
Revenue was recorded when the invoice was issued, so crediting revenue again counts it twice. The correct entry is Dr Cash 700 and Cr Accounts Receivable 700, which exchanges one asset for another. The wrong entry also balances, which shows that a balanced entry can still be incorrect.