Skip to content

Instantly share code, notes, and snippets.

@chunhualiao
Created March 15, 2025 20:47
Show Gist options
  • Save chunhualiao/edc5ca4daa5cc2223d05d0abb499d22c to your computer and use it in GitHub Desktop.
Save chunhualiao/edc5ca4daa5cc2223d05d0abb499d22c to your computer and use it in GitHub Desktop.

Double-Entry Bookkeeping

Double-entry bookkeeping is an accounting system where every financial transaction is recorded in at least two different accounts. For each transaction, there must be:

  • A debit entry in one account
  • A credit entry in another account
  • The total debits must equal the total credits

For example, when a business purchases equipment for $5,000 in cash:

  • Equipment account is debited $5,000 (asset increase)
  • Cash account is credited $5,000 (asset decrease)

Why It's Needed

  1. Error Detection: Because debits must equal credits, mathematical errors become immediately apparent when accounts don't balance.

  2. Complete Financial Picture: It captures both where money came from and where it went, providing a comprehensive view of financial standing.

  3. Foundation for Financial Statements: It enables the creation of accurate balance sheets and income statements that properly reflect a company's financial position.

  4. Audit Trail: It creates a clear record that can be followed and verified, which is essential for auditing and compliance.

  5. Asset and Liability Tracking: It properly tracks what a company owns (assets) and what it owes (liabilities).

Without double-entry bookkeeping, businesses would struggle to maintain accurate financial records, detect errors, or generate reliable financial statements that investors, regulators, and managers need for decision-making.​​​​​​​​​​​​​​​​

@chunhualiao
Copy link
Author

For example, when a business purchases equipment for $5,000 in cash:

Equipment account is debited $5,000 (asset increase)
Cash account is credited $5,000 (asset decrease)

Why is it not the opposite; cash account is debited and Equipment account is credit?

Great question! This gets to the heart of how debits and credits work in accounting.

In accounting, "debit" and "credit" don't inherently mean increase or decrease. Instead, whether a debit or credit increases or decreases an account depends on the account type.

Here's how it works:

Account Type Debit Effect Credit Effect
Assets Increase Decrease
Liabilities Decrease Increase
Equity Decrease Increase
Revenue Decrease Increase
Expenses Increase Decrease

So in your example:

  • Equipment is an asset account. Assets increase with debits, so we debit Equipment $5,000.
  • Cash is also an asset account. Assets decrease with credits, so we credit Cash $5,000.

This might seem counterintuitive at first, but the system is designed to maintain the accounting equation: Assets = Liabilities + Equity.

Think of it as two sides of a balance scale:

  • Asset accounts normally have debit balances (left side of the equation)
  • Liability and equity accounts normally have credit balances (right side of the equation)

When you record a transaction, you're keeping that scale balanced by making equal entries on both sides.​​​​​​​​​​​​​​​​

@chunhualiao
Copy link
Author

Assets = Liabilities + Equity.​​​​​​​​​​​​​​​​ But we also have expenses and revenue accounts. What are not they included in the formula?

Excellent question! Revenue and expense accounts are actually part of equity, but they're kept separate during the accounting period for better tracking and reporting.

Here's the expanded view:

Complete Accounting Equation:

Assets = Liabilities + (Owner's Capital + Retained Earnings + Revenue - Expenses)

The parenthesized part represents total equity. Revenue and expenses are technically temporary equity accounts that affect the Retained Earnings component.

What happens with Revenue and Expenses:

  1. During the accounting period:

    • Revenue increases equity (credited)
    • Expenses decrease equity (debited)
    • They're kept separate to track performance
  2. At period end (closing process):

    • Revenue and expense accounts are zeroed out
    • Their net impact (Net Income = Revenue - Expenses) is transferred to Retained Earnings
    • This process is called "closing the books"

So while the basic equation Assets = Liabilities + Equity is always true, revenue and expenses are tracked separately throughout the period to measure performance, then absorbed into equity (via Retained Earnings) at period end.

This is why income statements show a specific time period's performance, while balance sheets represent the cumulative position at a specific point in time.​​​​​​​​​​​​​​​​

@chunhualiao
Copy link
Author

Top 10 Beginner Double-Entry Bookkeeping FAQs

1. Why do debits have to equal credits?

Answer: Debits equaling credits maintains the accounting equation (Assets = Liabilities + Equity). This balance ensures that all resources are properly accounted for and the financial position is accurately represented. It's the foundation of the double-entry system that prevents mathematical errors.

2. How do I know which account to debit and which to credit?

Answer: Follow these rules:

  • Assets increase with debits, decrease with credits
  • Liabilities increase with credits, decrease with debits
  • Equity increases with credits, decreases with debits
  • Revenue increases with credits, decreases with debits
  • Expenses increase with debits, decrease with credits
    When in doubt, analyze how the transaction affects the accounting equation.

3. What's the difference between accrual and cash accounting?

Answer: Cash accounting records transactions only when cash changes hands. Accrual accounting records transactions when they occur economically, regardless of when cash moves. Accrual better reflects business performance by matching revenues with related expenses in the same period.

4. What is a journal entry?

Answer: A journal entry is the initial recording of a transaction, showing all accounts affected with their respective debits and credits. It includes the date, accounts involved, amounts, and often a brief description explaining the transaction's purpose.

5. What is a trial balance?

Answer: A trial balance is a worksheet listing all accounts with their debit or credit balances to verify that total debits equal total credits. It's typically prepared at the end of an accounting period to check for mathematical accuracy before creating financial statements.

6. How do adjusting entries work?

Answer: Adjusting entries update accounts at period-end to ensure revenues and expenses are recognized in the correct period. Common adjustments include:

  • Recording depreciation
  • Recognizing prepaid expenses used
  • Accruing unpaid expenses
  • Recording unearned revenue that's been earned

7. What happens when I make an accounting error?

Answer: For errors that don't affect the trial balance (like recording to wrong accounts), make a correcting entry. For errors that do affect the trial balance, find and fix the specific mistake. Never erase or delete entries; always correct with proper documentation.

8. What's the difference between the general journal and general ledger?

Answer: The general journal chronologically records all transactions with debits, credits, and explanations. The general ledger organizes these entries by account, showing running balances. Entries are first recorded in the journal, then posted (transferred) to the ledger.

9. How do closing entries work?

Answer: Closing entries transfer balances from temporary accounts (revenue, expense, dividend) to permanent accounts (retained earnings) at period-end. This process:

  1. Zeros out all revenue/expense accounts
  2. Updates retained earnings with net income/loss
  3. Prepares temporary accounts for the next period

10. What's the difference between a balance sheet and income statement?

Answer: The balance sheet shows the company's financial position (assets, liabilities, equity) at a specific point in time. The income statement shows performance (revenues, expenses, profit/loss) over a period of time. The balance sheet is cumulative, while the income statement covers only the specified period.​​​​​​​​​​​​​​​​

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment