Skip to main content

Working Ledger Examples

Copy six live, validated Beancount ledger patterns: household finances, envelope budgets, freelance invoicing, rental property, crypto, and stock cost basis.

Copy a proven account structure from one of these six live Beancount ledgers, then rename the accounts and replace the fictional amounts with your own. Every embedded ledger is public, versioned in Git, and validated with bea check. To rebuild a public-company filing the same way, see Model a public company in Beancount.

Start from a downloaded file

Skip copy-paste: the household, envelope, and freelance patterns each ship as a runnable starter ledger with fictional sample data.

  1. Choose one pattern below: household for cash and cards, envelopes for budget targets, freelance for invoices.
  2. Download its file from the link beside that pattern.
  3. Validate the saved file with bea --file <file> check. A clean ledger exits 0 from bea check; errors are listed with a non-zero exit.
  4. Open it with fava and use the printed address in your browser.

Everyday personal finance

Use one asset account per bank, one liability per credit card, and expense accounts for the questions you want your reports to answer. The full example also shows payroll, benefits, transfers, balance assertions, and investment holdings.

Open Everyday personal-finance ledger in a new tab

Copy this structure when you want one set of books for cash, cards, income, and ordinary spending:

option "operating_currency" "USD"
 
2026-01-01 open Assets:Bank:Checking USD
2026-01-01 open Liabilities:CreditCard USD
2026-01-01 open Equity:Opening-Balances USD
2026-01-01 open Expenses:Food:Groceries USD
 
2026-01-01 * "Opening balance"
  Assets:Bank:Checking          3,000.00 USD
  Equity:Opening-Balances      -3,000.00 USD
 
2026-01-18 * "Corner Market" "Weekly groceries"
  Liabilities:CreditCard          -71.90 USD
  Expenses:Food:Groceries          71.90 USD
 
2026-01-25 * "Credit card" "Statement payment"
  Liabilities:CreditCard           71.90 USD
  Assets:Bank:Checking            -71.90 USD

The credit-card account keeps the purchase date separate from the cash-payment date. Add a monthly balance assertion to each real-world account so an import error cannot hide.

Download this pattern as household-starter.bean, then run bea --file household-starter.bean check and fava household-starter.bean. The file matches the fence above: checking ends at 2928.10 USD, groceries at 71.90 USD, and the card at zero. Replace Corner Market, the 3,000.00 opening, and the 71.90 amounts with your own bank, card, and spending.

Envelope budgeting that rolls over

Model each envelope as an equity subaccount layered over the real bank account. Allocating a paycheck moves value inside equity, while a purchase records both the cash movement and the budget decision.

Open Envelope budgeting ledger in a new tab

Copy the Equity:Budget tree and keep the plan separate from the money:

option "operating_currency" "USD"
 
2026-01-01 open Assets:Bank:Checking USD
2026-01-01 open Income:Salary USD
2026-01-01 open Expenses:Groceries USD
2026-01-01 open Equity:Budget:Unallocated USD
2026-01-01 open Equity:Budget:Groceries USD
 
2026-01-05 * "Acme Corp" "January salary"
  Assets:Bank:Checking          4,100.00 USD
  Income:Salary                -4,100.00 USD
 
2026-01-05 * "Budget" "Fund groceries"
  Equity:Budget:Unallocated      -550.00 USD
  Equity:Budget:Groceries         550.00 USD
 
2026-01-08 * "Whole Foods" "Weekly shop"
  Assets:Bank:Checking           -128.44 USD
  Expenses:Groceries              128.44 USD
  Equity:Budget:Groceries        -128.44 USD
  Equity:Budget:Unallocated       128.44 USD

The two pairs in the purchase balance independently. That separation lets you reset or reassign an envelope without changing the reconciled bank balance. For Fava's target-versus-actual display, use the simpler budget directives instead.

Download this pattern as envelope-budgeting-starter.bean, then run bea --file envelope-budgeting-starter.bean check and fava envelope-budgeting-starter.bean. The file matches the fence above: checking ends at 3971.56 USD, and the Groceries envelope holds 421.56 USD against -421.56 USD Unallocated. Replace Acme Corp, the 4,100.00 salary, and the 550.00 allocation with your own pay and envelopes.

Freelancer invoicing and receivables

Record an invoice when you earn the revenue, then clear the receivable when the client pays. A separate receivable account per client makes unpaid and partially paid invoices visible as ordinary balances.

Open Freelancer invoicing ledger in a new tab

Copy the receivable tree and put the invoice number on both events:

option "operating_currency" "USD"
 
2026-01-01 open Assets:Bank:Business USD
2026-01-01 open Assets:Receivable:Northwind USD
2026-01-01 open Income:Consulting USD
 
2026-01-09 * "Northwind Traders" "January retainer"
  invoice: "2026-001"
  due: 2026-02-08
  Assets:Receivable:Northwind    6,000.00 USD
  Income:Consulting             -6,000.00 USD
 
2026-02-05 * "Northwind Traders" "Payment — invoice 2026-001"
  invoice: "2026-001"
  Assets:Bank:Business           6,000.00 USD
  Assets:Receivable:Northwind   -6,000.00 USD

Add sales tax to a liability, not income, and move estimated-tax cash to a reserve asset before paying it. The live ledger shows both patterns, partial payments, rebilled costs, and a bad-debt write-off.

Download this pattern as freelance-starter.bean, then run bea --file freelance-starter.bean check and fava freelance-starter.bean. The file matches the fence above: Business ends at 6000.00 USD, Consulting at -6000.00 USD, and the receivable at zero. Replace Northwind Traders, invoice 2026-001, and the 6,000.00 amounts with your own clients and invoices.

Rental property and mortgage principal

Treat the property as an asset, the mortgage as a liability, and a tenant's security deposit as money you owe back. Split each mortgage payment among interest, principal, and escrow so the balance sheet and income statement tell different truths.

Open Rental property ledger in a new tab

Copy the property, debt, and operating account groups before adding monthly activity:

option "operating_currency" "USD"
 
1970-01-01 commodity PROP123MAIN
2024-01-01 open Assets:RealEstate:Property PROP123MAIN
2024-01-01 open Assets:Bank:Checking USD
2024-01-01 open Assets:Bank:EscrowImpound USD
2024-01-01 open Liabilities:Mortgage USD
2024-01-01 open Income:RealEstate:Rent USD
2024-01-01 open Expenses:RealEstate:MortgageInterest USD
 
2024-03-15 * "Escrow" "Buy rental property"
  Assets:RealEstate:Property       1 PROP123MAIN {400,000.00 USD}
  Assets:Bank:Checking                       -80,000.00 USD
  Liabilities:Mortgage                      -320,000.00 USD
 
2024-04-01 * "Bank" "Mortgage payment"
  Expenses:RealEstate:MortgageInterest         1,866.67 USD
  Liabilities:Mortgage                           262.39 USD
  Assets:Bank:EscrowImpound                      566.67 USD
  Assets:Bank:Checking                        -2,695.73 USD

Keep land, depreciable building value, capital improvements, accumulated depreciation, and escrow activity distinct. The rental-property guide explains how those balances feed reports.

Crypto lots and cost basis

Give every purchase a cost in braces and identify the same lot when you sell. Beancount then carries acquisition date and basis through wallets, exchanges, and taxable disposals instead of reducing an investment to one blended balance.

Open Crypto cost-basis ledger in a new tab

Copy the commodity, exchange accounts, and explicit realized-gain posting:

option "operating_currency" "USD"
 
1970-01-01 commodity BTC
2024-01-01 open Assets:Crypto:Coinbase:BTC BTC
2024-01-01 open Assets:Crypto:Coinbase:USD USD
2024-01-01 open Expenses:Crypto:Fees:Trading USD
2024-01-01 open Income:Crypto:CapitalGains:ShortTerm USD
 
2024-02-15 * "Coinbase" "Buy 0.10 BTC"
  Assets:Crypto:Coinbase:BTC     0.10 BTC {43,800.00 USD, 2024-02-15}
  Assets:Crypto:Coinbase:USD   -4,380.00 USD
 
2024-08-20 * "Coinbase" "Sell the February lot"
  Assets:Crypto:Coinbase:BTC    -0.10 BTC {43,800.00 USD, 2024-02-15}
  Assets:Crypto:Coinbase:USD    5,900.00 USD
  Expenses:Crypto:Fees:Trading      8.85 USD
  Assets:Crypto:Coinbase:USD       -8.85 USD
  Income:Crypto:CapitalGains:ShortTerm -1,520.00 USD

Transfers between your own wallets preserve the lot instead of creating income. The live ledger continues through staking, mining, decentralized finance, and NFTs; the inventory guide explains booking methods and lot reduction.

The crypto example uses static dated prices so you can reproduce its reports. For your own supported holdings in a hosted ledger, set up Live Prices to maintain valuation quotes automatically. Matching symbols and quote currencies matter; feeds do not alter these transaction examples.

Stock lots, dividends, and splits

A share is not a number, it is a lot: a quantity held at a known cost acquired on a known date. Write every brokerage purchase with an explicit {cost, date} and a later sale can name the exact lot it disposes of, so Beancount computes the realized gain and its holding period instead of averaging two lots together. A dividend stays visible as income rather than disappearing into an adjusted share price.

Open Stock cost-basis and dividend ledger in a new tab

Copy the brokerage chart, the dated lot, and the specific-lot sale:

option "operating_currency" "USD"
option "booking_method" "STRICT"
 
1970-01-01 commodity ACME
2024-01-01 open Assets:Brokerage:Cash USD
2024-01-01 open Assets:Brokerage:ACME ACME
2024-01-01 open Equity:Opening USD
2024-01-01 open Income:Dividends:Qualified USD
2024-01-01 open Income:CapitalGains:LongTerm USD
2024-01-01 open Expenses:Brokerage:Commissions USD
 
2024-01-08 * "Broker" "Wire funding to taxable brokerage account"
  Assets:Brokerage:Cash                  50,000.00 USD
  Equity:Opening                        -50,000.00 USD
 
2024-06-18 * "Broker" "Buy 150 ACME @ $68.20"
  Assets:Brokerage:ACME                        150 ACME {68.20 USD, 2024-06-18}
  Expenses:Brokerage:Commissions              4.95 USD
  Assets:Brokerage:Cash                 -10,234.95 USD
 
2025-03-14 * "Broker" "ACME quarterly cash dividend"
  Assets:Brokerage:Cash                      63.00 USD
  Income:Dividends:Qualified                -63.00 USD
 
2026-02-20 * "Broker" "Sell 60 ACME from the 2024 lot — long-term gain"
  Assets:Brokerage:ACME                        -60 ACME {68.20 USD, 2024-06-18}
  Assets:Brokerage:Cash                   5,778.00 USD
  Expenses:Brokerage:Commissions              4.95 USD
  Assets:Brokerage:Cash                      -4.95 USD
  Income:CapitalGains:LongTerm           -1,686.00 USD
 
2026-02-21 balance Assets:Brokerage:ACME              90 ACME
2026-02-21 balance Assets:Brokerage:Cash      45,601.10 USD

The gain posting is the arithmetic, not a plug: 60 shares sold for 96.30 USD each is 5,778.00 USD of proceeds against 4,092.00 USD of basis, and the lot's 2024-06-18 date is what makes it long-term. The live ledger continues through a reinvested ETF distribution, a 4-for-1 split that preserves total basis, a short-term sale out of a second lot, and year-end share-count assertions. option "booking_method" "STRICT" is what turns "sell 40 ACME" into an error rather than a silent average; the options guide covers the alternatives.

The stock example uses fictional symbols such as ACME and static price files. Do not substitute a real ticker feed for a fictional commodity. Choose supported pairs for your own holdings with Live Prices, while retaining manual prices for this reproducible example.

Source: https://beancount.io/docs/examples