Understanding Journal Entries in Beancount
Journal entries are the backbone of double-entry accounting, and in Beancount, every * transaction you write is a journal entry. This guide explains the essentials—debits and credits, adjusting entries, and reversing entries—and shows how they map cleanly to Beancount's plain-text syntax. You'll learn how to keep precise books with minimal ceremony.
A Quick Refresher: What Is a Journal Entry?
A journal entry is the formal, dated record of a financial transaction. It's expressed in terms of debits and credits that keep the fundamental accounting equation in balance:
In a double-entry system, every transaction affects at least two accounts, and the total debits must equal the total credits. This simple rule is what makes downstream financial reports like the Profit & Loss statement and Balance Sheet trustworthy and accurate.
Debits and Credits in One Minute
The concepts of debits and credits can be confusing at first, but they boil down to a few simple rules. Think of it this way: "where did the value come from?" (credit) and "where did the value go?" (debit).
Here's a cheat sheet for how they increase the five core account types:
| Account Type | Increases With |
|---|---|
| Assets | Debit |
| Expenses | Debit |
| Liabilities | Credit |
| Equity | Credit |
| Income | Credit |
How a Journal Entry Looks in Beancount
Beancount uses simple, human-readable text directives to record transactions. Each transaction must balance to zero for every commodity (e.g., USD, EUR, AAPL stock). Beancount will throw an error if it doesn't.
Here is a basic transaction for buying coffee:
2025-09-10 * "Coffee Bar" "Team coffee"
Expenses:Food:Coffee 18.00 USD
Assets:Bank:Checking -18.00 USD
Notice how the two postings (lines with accounts) sum to zero: $18.00 + (-$18.00) = 0.
You can add powerful context directly in the narration using tags (like #clientX) for filtering and links (like ^INV-2025-001) to connect related entries.
For example, here's how you can link an invoice to its payment:
; First, record the invoice you sent to the client
2025-09-15 * "Acme Corp" "Invoice 2025-001 #clientX ^INV-2025-001"
Assets:AccountsReceivable 1000.00 USD
Income:Consulting -1000.00 USD
; Later, record the payment and link it back to the original invoice
2025-09-28 * "Acme Corp" "Payment on ^INV-2025-001"
Assets:Bank:Checking 1000.00 USD
Assets:AccountsReceivable -1000.00 USD
The #clientX tag lets you easily filter all transactions for this client, and the ^INV-2025-001 link creates a connection between the two entries that you can follow in reports.
Common Journal Entries (Ready to Paste)
Here are several common business transactions formatted for Beancount.
Owner Invests Cash
An owner contributes personal funds to start the business.
2025-01-01 * "Owner" "Initial capital contribution"
Assets:Bank:Checking 10000.00 USD
Equity:Owner-Capital -10000.00 USD