Sub topic 4
T-accounts: a left side and a right side
This chapter assumes you know the accounting equation (Assets = Liabilities + Equity), the five account types, and why every transaction touches at least two accounts. It also assumes you can read short Python snippets. The chapter explains the T-account, the tool that makes the left/right convention concrete, and shows how to read, fill in and balance one.
What a T-account is
A T-account is a simplified picture of one account in the ledger. It is drawn as a capital letter T. The account name sits on top of the horizontal bar. The vertical bar divides the space into a left side and a right side.
Cash
Left (Debit) | Right (Credit)
-------------+---------------
|Every account has exactly these two sides. There is no third column and no sign attached to the numbers. You record each amount as a positive number on one side or the other, and the side carries the meaning.
The names of the sides are fixed by convention:
- The left side is the debit side, abbreviated Dr.
- The right side is the credit side, abbreviated Cr.
"Debit" and "credit" in this context only mean left and right. They do not mean "bad" and "good", and they do not mean "increase" and "decrease". Whether a debit increases or decreases an account depends on the account's type, which later chapters cover. For now, the only fact to hold on to is this: debit = left, credit = right.
Why a two-sided account works
Double-entry bookkeeping records each transaction as equal amounts on opposite sides of the ledger as a whole. The T-account gives each account a left place and a right place so that this can happen.
Suppose a business pays $300 rent in cash. Two accounts are affected, Rent Expense and Cash. The transaction needs one amount on the left side of one account and the same amount on the right side of the other.
Rent Expense Cash
Dr | Cr Dr | Cr
----------+----- ----------+-----
300 | | 300Left-side total across both accounts: 300. Right-side total across both accounts: 300. The totals match, which is what double entry requires. Which account gets the left amount and which gets the right amount is decided by the rules for each account type. Those rules are the subject of a later chapter, so here we only observe that the two amounts sit on opposite sides.
Reading and writing entries in a T-account
Each line in a T-account is one posted amount. A T-account usually shows just amounts, sometimes with a date or a reference to the journal entry that produced it.
Here is a Cash account after the three transactions used throughout this tutorial: the owner invests $1,000, the business earns $500 of service revenue in cash, and the business pays $300 rent in cash.
Cash
Dr | Cr
---------------+---------------
1,000 (invest) | 300 (rent)
500 (revenue)|
---------------+---------------
1,500 | 300The left side holds two amounts, which total 1,500. The right side holds one amount, 300. Nothing has been netted yet. A T-account keeps every posting visible so that you can trace how the balance was reached.
Finding the balance of a T-account
The balance of a T-account is the difference between its two side totals. The procedure is always the same:
- Add up all amounts on the left (debit) side.
- Add up all amounts on the right (credit) side.
- Subtract the smaller total from the larger one.
- The balance sits on the side with the larger total. If the left is larger, it is a debit balance. If the right is larger, it is a credit balance.
For the Cash account above: left total 1,500, right total 300, difference 1,200. The left side is larger, so Cash has a debit balance of 1,200.
Bookkeepers often write this balance beneath the larger side, below a total line, and then repeat it on the other side to show the two sides now match:
Cash
Dr | Cr
---------------+---------------
1,000 | 300
500 |
---------------+---------------
1,200 (bal.) |Writing the balance under the debit side, with nothing under the credit side, is a common shorthand. It says "the account is 1,200 on the debit side".
Now compare the other accounts from the same three transactions:
| Account | Left (Dr) total | Right (Cr) total | Balance |
|---|---|---|---|
| Cash | 1,500 | 300 | 1,200 Dr |
| Owner Capital | 0 | 1,000 | 1,000 Cr |
| Service Revenue | 0 | 500 | 500 Cr |
| Rent Expense | 300 | 0 | 300 Dr |
Add the debit balances: 1,200 + 300 = 1,500. Add the credit balances: 1,000 + 500 = 1,500. The totals agree. That check is the trial balance, covered in a later chapter. It only works because every posting went to the left of one account and the right of another.
The same procedure in code
The next snippet models a T-account as two lists, one for each side. It computes the balance with the same four steps. It uses Decimal because floating-point numbers can introduce rounding errors with money.
from decimal import Decimal
class TAccount:
def __init__(self, name):
self.name = name
self.debits = [] # left side
self.credits = [] # right side
def debit(self, amount):
self.debits.append(Decimal(amount))
def credit(self, amount):
self.credits.append(Decimal(amount))
def balance(self):
"""Return (amount, side) where side is 'Dr', 'Cr' or None."""
left = sum(self.debits, Decimal("0"))
right = sum(self.credits, Decimal("0"))
if left > right:
return left - right, "Dr"
if right > left:
return right - left, "Cr"
return Decimal("0"), None
cash = TAccount("Cash")
cash.debit("1000") # owner invests
cash.debit("500") # service revenue received
cash.credit("300") # rent paid
print(cash.name, cash.balance()) # Cash (Decimal('1200'), 'Dr')The class never decides whether a balance is "positive" or "negative". It only reports which side is larger. That matches how a paper T-account works.
Balance direction and normal balance
An account can end up with a balance on either side, but most accounts have a side they normally end up on. That side is the account's normal balance. Cash normally has a debit balance. Owner Capital normally has a credit balance.
The T-account makes this visible. If you see Cash with a credit balance, the picture itself raises a flag: more has gone out than came in, which for a cash account usually means an overdraft or a posting error. The details of normal balances come in the next chapters. For this chapter, the point is that the T-account lets you read a balance as "which side is bigger", and that reading is the first step before interpreting it.
The diagram below shows how one transaction flows into two T-accounts.
Edge cases and details
A few situations show up often enough to be worth knowing before you start posting.
- An account with both sides filled in. Most real accounts have postings on both sides. Cash receives money (left) and pays money out (right). The balance is the net of the two, not either side alone.
- A zero balance. If the two sides total the same amount, the account balance is zero and belongs to neither side. In the code above,
balance()returnsNonefor the side in this case. - An unexpected side. A balance on the side opposite to the account's normal side is not automatically an error. A customer who overpays can leave Accounts Receivable with a credit balance. It is a reason to investigate, not a proof of a mistake.
- Amounts are never negative. A T-account never records a minus sign. A reduction in an account is recorded by posting on the opposite side. If you find yourself writing a negative number in a T-account, you have probably posted to the wrong side.
- Order does not change the balance. Posting the three Cash transactions in any order gives the same final balance. Order matters for the audit trail, not for the arithmetic.
Why accountants use the T-account at all
The ledger in real software is a table of postings, not a drawing. The T-account remains useful for three reasons:
- It shows the full effect of a transaction on each account at a glance, including which side each amount lands on.
- It separates two questions: which side did this amount go on, and what is the balance now.
- It is quick to sketch when you plan an entry or look for an error.
Because it is the same model as a ledger account, skills built on T-accounts transfer directly to journal entries and to software. A ledger account in a database is a list of postings with a side and an amount, and the balance is the difference between the sides, exactly as in the TAccount class above.
Exercise
A Supplies account has these postings: debit 400, debit 150, credit 200. What are the left and right totals, and what is the balance and its side?
Show answer
The left (debit) total is 400 + 150 = 550. The right (credit) total is 200. The difference is 550 - 200 = 350, and the left side is larger, so the balance is 350 Dr (a debit balance).
Exercise
A student draws a Cash T-account and writes -300 on the left side to show that $300 of rent was paid. What is wrong, and where should the 300 go?
Show answer
A T-account never uses negative amounts. A reduction is shown by posting the positive amount on the opposite side. Because Cash is a debit-normal asset account, paying $300 is a credit, so 300 belongs on the right (credit) side of Cash. The matching debit of 300 goes to Rent Expense.
Exercise
After posting, a Service Revenue T-account has left total 0 and right total 500, and a Rent Expense T-account has left total 300 and right total 0. State each balance's side, and explain why the two T-accounts together do not show equal left and right totals on their own.
Show answer
Service Revenue has a balance of 500 Cr and Rent Expense has a balance of 300 Dr. Equal totals are only guaranteed across all accounts that the transactions touched. Each transaction also posted to other accounts, such as Cash, and those postings supply the opposite sides. Looking at two accounts alone shows only part of each entry.