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. Here you will learn the T-account, the tool that makes the left and right sides of an account visible.
What a T-account is
A T-account is a simplified picture of one ledger account. You draw a large letter T. The account name goes on top. The horizontal bar separates the heading from the amounts. The vertical bar splits the account into two columns.
- The left column is the debit side.
- The right column is the credit side.
That is the whole convention. "Debit" is the word for "left" and "credit" is the word for "right". Neither word says anything yet about increasing or decreasing. Later chapters attach that meaning to each account type.
Cash
Debit (Dr) | Credit (Cr)
-----------+-------------
1,000 |
500 | 300Each account in the business gets its own T. Cash has one, Service Revenue has one, and Rent Expense has one. Together these accounts make up the ledger.
Why two sides are needed
Double-entry bookkeeping requires each transaction to put equal amounts on the left of one or more accounts and on the right of one or more others. The T-account gives you a fixed place for each half. When you record "owner invests $1,000 cash", you write 1,000 on the left of Cash and 1,000 on the right of Owner Capital.
The two Ts below show that transaction.
Cash | Owner Capital
Dr | Cr | Dr | Cr
1,000 | | | 1,000The left total across all accounts (1,000) equals the right total across all accounts (1,000). That equality is the check you will use throughout the tutorial.
Finding a balance
A T-account's balance is the difference between the two columns. Add each column, then subtract the smaller total from the larger one. The balance sits on the side with the larger total.
Take the cash account from the example above. Cash receives 1,000 and 500 on the left, and 300 on the right.
- Left total: 1,000 + 500 = 1,500.
- Right total: 300.
- Difference: 1,500 − 300 = 1,200.
- The larger total is on the left, so the balance is a debit balance of 1,200.
An account can end up with a debit balance, a credit balance, or zero. The side of the balance describes where the net amount sits. It does not say whether the balance is good or bad.
The T-account in code
A T-account is easy to model as two lists. This program computes the balance and reports its side.
from decimal import Decimal
class TAccount:
def __init__(self, name):
self.name = name
self.debits = [] # left column
self.credits = [] # right column
def debit(self, amount):
self.debits.append(Decimal(amount))
def credit(self, amount):
self.credits.append(Decimal(amount))
def balance(self):
"""Return (amount, side) for the net balance."""
net = sum(self.debits, Decimal("0")) - sum(self.credits, Decimal("0"))
if net > 0:
return net, "debit"
if net < 0:
return -net, "credit"
return Decimal("0"), "zero"
cash = TAccount("Cash")
cash.debit("1000")
cash.debit("500")
cash.credit("300")
print(cash.name, cash.balance()) # Cash (Decimal('1200'), 'debit')The code never decides whether the balance is "positive" in the business sense. It records only which side is larger.
Common errors
- Treating left as "increase". Left only means debit. For Cash it happens to increase the account. For Service Revenue, a left entry decreases it.
- Putting the balance on the wrong side. Always compare the totals. The side with more is the balance side.
- Using floating-point numbers for money. Use
Decimalor whole cents, so sums are exact.
Exercise
A Supplies account has debits of 400 and 150 and a credit of 90. What is its balance, and on which side?
Show answer
Left total is 400 + 150 = 550. Right total is 90. The difference is 550 − 90 = 460, and the larger total is on the left, so the balance is a debit balance of 460.
Exercise
A student says, "Credit means the account goes down." Using only what this chapter established, what is wrong with that statement?
Show answer
Credit only means the right side of an account. Whether a right-side entry increases or decreases the account depends on the account type, which later chapters cover.