# Double-entry & journal entries

> The foundation of all bookkeeping — why every transaction has two sides, how debits and credits work, and how AccountFUN records it all behind the scenes.

Source: https://www.accountfun.com/docs/concepts/double-entry/

If bookkeeping has one foundational idea, it’s **double-entry accounting**: every transaction is recorded in **at least two places**, and the books must always **balance**. This guide explains why that is, how it works in plain language, and what it looks like inside AccountFUN. No prior accounting knowledge is assumed.

## The big idea: every transaction has two sides

Think about what happens when you buy office supplies for $50 cash. Two things are true at once:

1. You **gained** office supplies worth $50 (an expense went up).
2. You **lost** $50 of cash (your bank went down).

A single-sided record (“spent $50”) would tell only half the story. Where did the $50 go? What did you get for it? Double-entry records **both halves** so the books always answer *“what came in, and where did it come from?”* and *“what went out, and what did you get for it?”*

Every transaction — every sale, every bill, every payment — is like this. There are always (at least) two effects, and they’re equal and opposite. That’s why it’s called **double-entry**.

## The accounting equation

All of bookkeeping rests on one equation that is always true:

```text
Assets  =  Liabilities  +  Equity
```

* **Assets** are things you *own* — cash, inventory, equipment, money owed to you.
* **Liabilities** are things you *owe* — unpaid bills, loans, tax payable.
* **Equity** is what’s *left over* for the owner — your investment in the business plus accumulated profits, minus any drawings.

If you have a laptop (asset $1,000) bought partly on a credit card (liability $400), then equity must be $600. The equation always balances — and double-entry is the mechanism that keeps it balancing.

Where does profit fit?

Profit increases equity. When you earn more than you spend, the surplus rolls into equity (via an account called **Retained Earnings** at year-end). Losses shrink equity. So the equation holds through good times and bad.

## Debits and credits (the part that trips everyone up)

Each side of a transaction is recorded as either a **debit** or a **credit**. The confusing part is that in everyday English “credit” sounds good and “debit” sounds bad — but in accounting, they’re just two directions, and *which one means “increase”* depends on the type of account.

Here’s the whole secret in one table:

| Account type                                       | To **increase** it | To **decrease** it |
| -------------------------------------------------- | ------------------ | ------------------ |
| **Assets** (cash, inventory, receivables)          | **Debit**          | Credit             |
| **Expenses** (rent, supplies, wages)               | **Debit**          | Credit             |
| **Liabilities** (bills, loans, tax)                | Credit             | **Debit**          |
| **Equity** (owner’s investment, retained earnings) | Credit             | **Debit**          |
| **Revenue** (sales, service income)                | Credit             | **Debit**          |

Two patterns make this memorable:

* **Assets and Expenses** are **debit-natural** (a debit increases them).
* **Liabilities, Equity, and Revenue** are **credit-natural** (a credit increases them).

Why this looks backwards for cash

People expect “cash in” to be a credit because banks *credit* your account. But from *your* books’ point of view, cash is an asset you own — so cash coming in **increases** an asset, which is a **debit**. The bank’s records are the mirror image of yours. Stick with the rule above and it always works.

## What “balanced” means

For every transaction, **total debits must equal total credits**. Always. No exceptions. If they don’t, something is wrong.

```text
∑ Debits  =  ∑ Credits     (for every single transaction)
```

This isn’t an arbitrary rule — it’s a direct consequence of the accounting equation. Because every transaction has two equal-and-opposite effects, and each effect is recorded once as a debit and once as a credit, the totals can’t help but match. AccountFUN enforces this automatically and will not let an unbalanced entry post.

## The journal entry

A **journal entry** is the recorded form of a transaction: a dated note listing the accounts affected and the debit/credit to each. Here’s the anatomy:

```text
Date:        Jun 5
Description: Office supplies purchased with business card
Reference:   Receipt #1042


  Account                   Debit      Credit
  ────────────────────────  ─────────  ─────────
  Office Supplies (expense)   50.00
  Business Checking (bank)              50.00
```

A few terms you’ll see:

* **Line** — one account’s debit or credit. This entry has two lines.
* **Legs** — another word for lines. A two-line entry has “two legs”.
* **Debit/credit columns** — each line has an amount in exactly one column; the other is blank or zero.

The totals match ($50 = $50), so it’s balanced. The description explains *why* the entry exists — that’s required, because a bare debit/credit with no context is meaningless to anyone reading it later.

### More than two lines is fine

Many real transactions need three or more lines. Selling a taxable item, for example, touches revenue **and** tax payable **and** the cash you received — three accounts, still balanced:

```text
Date:        Jun 10
Description: Sold consulting service, paid by card


  Account                   Debit      Credit
  ────────────────────────  ─────────  ─────────
  Business Checking (bank)  1,100.00
  Sales Revenue                          1,000.00
  Tax Payable                              100.00
```

Debits (1,100) = Credits (1,000 + 100 = 1,100). Balanced. The number of lines doesn’t matter; only that debits equal credits.

## Worked examples

Let’s walk through several everyday transactions so the pattern becomes instinctive.

### Example 1 — A cash sale

You sell $200 of pastries, paid in cash. Money came in (cash, an asset, **increases** → debit) and you earned revenue (revenue **increases** → credit).

```text
  Account              Debit    Credit
  Cash                  200.00
  Sales Revenue                  200.00
```

### Example 2 — Buying supplies on credit

You receive a $300 electricity bill you’ll pay next month. You incurred an expense (expense **increases** → debit) and you now owe the supplier (liability **increases** → credit).

```text
  Account              Debit    Credit
  Utilities             300.00
  Accounts Payable               300.00
```

On credit = “not paid yet”

“Buying on credit” means you’ve received the good or service but haven’t paid cash yet. The bill sits in **Accounts Payable** (a liability) until you pay it. That’s exactly what an AccountFUN [bill](https://www.accountfun.com/docs/guides/bills/) does before you pay it.

### Example 3 — Paying that bill

A month later you pay the $300 electricity bill. Cash goes out (asset **decreases** → credit) and the amount you owe drops (liability **decreases** → debit).

```text
  Account              Debit    Credit
  Accounts Payable     300.00
  Cash                           300.00
```

Notice: **example 2 and example 3 together** capture the full reality — first you recognized the expense and the debt, *then* you settled the debt. Neither half alone tells the whole story. That’s the whole point of double-entry.

### Example 4 — The owner invests cash

You put $5,000 of your own money into the business bank account. Cash comes in (asset **increases** → debit) and your stake in the business grows (equity **increases** → credit).

```text
  Account              Debit      Credit
  Cash                  5,000.00
  Owner's Equity                   5,000.00
```

### Example 5 — An owner’s drawing

You take $500 out of the business for personal use. Cash leaves (asset **decreases** → credit) and your stake shrinks (equity **decreases** → debit, posted to an equity or drawings account).

```text
  Account              Debit    Credit
  Owner's Drawings      500.00
  Cash                           500.00
```

### Example 6 — Buying equipment with a loan

You buy a $2,000 laptop using a $2,000 equipment loan. You gain an asset (asset **increases** → debit) and take on a debt (liability **increases** → credit). No cash changed hands, yet the books capture exactly what happened.

```text
  Account              Debit      Credit
  Computer Equipment   2,000.00
  Equipment Loan                  2,000.00
```

## How AccountFUN records all this

You almost never type debits and credits by hand. AccountFUN posts the right journal entry for you whenever you use a dedicated feature:

| When you do this…                                                                    | AccountFUN posts a journal entry of type…             |
| ------------------------------------------------------------------------------------ | ----------------------------------------------------- |
| Approve an [invoice](https://www.accountfun.com/docs/guides/invoices/)               | `invoice` — Dr Accounts Receivable / Cr Revenue + Tax |
| Approve a [bill](https://www.accountfun.com/docs/guides/bills/)                      | `bill` — Dr Expense/Asset + Tax / Cr Accounts Payable |
| [Record a payment](https://www.accountfun.com/docs/guides/payments/)                 | `payment` — Dr/Cr Bank against the receivable/payable |
| Spend/Receive/Transfer money                                                         | `spend_money` / `receive_money` / `transfer`          |
| Issue a [credit note](https://www.accountfun.com/docs/guides/credit-notes/)          | `credit_note` — reverses the original                 |
| Run [fixed-asset depreciation](https://www.accountfun.com/docs/guides/fixed-assets/) | `depreciation` / `amortization`                       |
| Post a [manual journal](https://www.accountfun.com/docs/guides/manual-journals/)     | `manual` — the one time you *do* type debits/credits  |

Every entry lands in the same underlying ledger. Open any transaction’s detail page (`/transactions/{id}`) and you’ll see the full **Journal Entry** table with the Debit and Credit columns — exactly like the examples above. That’s the audit trail, and it’s why any number on a report can be traced back to the entry that created it.

The manual journal is the escape hatch

The one place you write debits and credits directly is the [manual journal](https://www.accountfun.com/docs/guides/manual-journals/). Use it only for adjustments no feature covers (accruals, corrections, owner drawings). For everything else, the feature does the bookkeeping correctly for you.

## Reversals: undoing an entry

Mistakes happen. In double-entry you don’t *delete* a posted entry — you post a **reversal**: a new journal entry on the same date with every debit turned into a credit and vice versa. The two cancel out, leaving your books correct and your audit trail intact.

AccountFUN does this automatically when you void an invoice, reverse a payment, or unreconcile a transaction. You’ll see reversal entries marked clearly on the transaction detail page (struck-through, red) so the history is always honest about what was changed and why.

## The takeaway

* Every transaction has **two equal sides**.
* **Debits = credits**, always.
* Assets and expenses go up with a debit; liabilities, equity, and revenue go up with a credit.
* AccountFUN writes the entries for you — you just use the features, and the books stay balanced.

Once this clicks, the rest of bookkeeping — reports, reconciliation, tax — becomes much less mysterious, because they’re all just different views of these same balanced entries.

Continue with **[Choosing accounts for transactions](https://www.accountfun.com/docs/concepts/coding-transactions/)** to learn how to decide *which* account each side of a transaction should hit.
