Generate Balance and Register Reports in Ledger
Ledger’s two fundamental reports are balance and register.
Balance report — shows account totals:
ledger -f journal.ledger balanceThis shows the balance of every account. Narrow it with account patterns:
ledger -f journal.ledger balance Expenses
ledger -f journal.ledger balance Assets:CheckingRegister report — shows individual transactions:
ledger -f journal.ledger register Expenses:FoodThis shows every transaction that touches Expenses:Food, with a running total.
Common flags:
--period "this month"or-p "2024/03"— filter by date range--monthlyor-M— group by month--yearlyor-Y— group by year--sort dateor--sort amount— change sort order--depth N— limit account hierarchy depth in balance reports--empty— show accounts with zero balance
Income statement (income and expenses for a period):
ledger -f journal.ledger balance Income Expenses --period "2024"Net worth (assets minus liabilities):
ledger -f journal.ledger balance Assets LiabilitiesReports go to stdout, so they can be piped to other tools: ledger balance | grep Food, redirected to files, or processed with scripts.