commands.sh

hledger balance

all

A flexible, general purpose "summing" report that shows accounts with some kind of numeric data. This can be balance changes per period, end balances, budget performance, unrealised capital gains, etc.

More info →

Options (15)

boolean

Show the balance change in all accounts from all postings over all time

Example: hledger {{[bal|balance]}}
-t, --treeboolean

Show the balance change in accounts whose name contains `expenses`, as a tree, summarising the top two levels only

Example: hledger {{[bal|balance]}} {{expenses}} {{[-t|--tree]}} {{[-2|--depth 2]}}
-2boolean

Show the balance change in accounts whose name contains `expenses`, as a tree, summarising the top two levels only

Example: hledger {{[bal|balance]}} {{expenses}} {{[-t|--tree]}} {{[-2|--depth 2]}}
-M, --monthlyboolean

Show expenses each month, and their totals and averages, sorted by total; and their monthly budget goals

Example: hledger {{[bal|balance]}} {{expenses}} {{[-M|--monthly]}} {{[-T|--row-total]}} {{[-A|--average]}} {{[-S|--sort-amount]}} --budget
-T, --row-totalboolean

Show expenses each month, and their totals and averages, sorted by total; and their monthly budget goals

Example: hledger {{[bal|balance]}} {{expenses}} {{[-M|--monthly]}} {{[-T|--row-total]}} {{[-A|--average]}} {{[-S|--sort-amount]}} --budget
-A, --averageboolean

Show expenses each month, and their totals and averages, sorted by total; and their monthly budget goals

Example: hledger {{[bal|balance]}} {{expenses}} {{[-M|--monthly]}} {{[-T|--row-total]}} {{[-A|--average]}} {{[-S|--sort-amount]}} --budget
-S, --sort-amountboolean

Show expenses each month, and their totals and averages, sorted by total; and their monthly budget goals

Example: hledger {{[bal|balance]}} {{expenses}} {{[-M|--monthly]}} {{[-T|--row-total]}} {{[-A|--average]}} {{[-S|--sort-amount]}} --budget
boolean

Similar to the above, matching accounts by `Expense` type, as a two level tree without squashing boring accounts

Example: hledger {{[bal|balance]}} type:{{X}} {{[-MTAS|--monthly --row-total --average --sort-amount]}} --budget {{[-t|--tree]}} {{[-2|--depth 2]}} --no-elide
-H, --historicalboolean

Show end balances (including from postings before the start date), quarterly in 2024, in accounts whose name contains `assets` or `liabilities`

Example: hledger {{[bal|balance]}} {{[-H|--historical]}} {{[-p|--period]}} '{{quarterly in 2024}}' {{assets}} {{liabilities}}
-p, --periodboolean

Show end balances (including from postings before the start date), quarterly in 2024, in accounts whose name contains `assets` or `liabilities`

Example: hledger {{[bal|balance]}} {{[-H|--historical]}} {{[-p|--period]}} '{{quarterly in 2024}}' {{assets}} {{liabilities}}
boolean

Similar to the above, also show zero balances, sort by total and summarise to three levels

Example: hledger {{[bal|balance]}} {{[-HQ|--historical --quarterly]}} date:{{2024}} type:{{AL}} {{[-ES|--empty --sort-amount]}} {{[-3|--depth 3]}}
boolean

Similar to the above, also show zero balances, sort by total and summarise to three levels

Example: hledger {{[bal|balance]}} {{[-HQ|--historical --quarterly]}} date:{{2024}} type:{{AL}} {{[-ES|--empty --sort-amount]}} {{[-3|--depth 3]}}
-3boolean

Similar to the above, also show zero balances, sort by total and summarise to three levels

Example: hledger {{[bal|balance]}} {{[-HQ|--historical --quarterly]}} date:{{2024}} type:{{AL}} {{[-ES|--empty --sort-amount]}} {{[-3|--depth 3]}}
boolean

Show investment assets' market [V]alue in base currency at the end of each quarter

Example: hledger {{[bal|balance]}} {{[-HVQ|--historical --market --quarterly]}} {{assets:investments}}
-Q, --quarterlyboolean

Show unrealised capital gains/losses from market price changes in each quarter, for non-cryptocurrency investment assets

Example: hledger {{[bal|balance]}} --gain {{[-Q|--quarterly]}} {{assets:investments}} not:{{cryptocurrency}}

Examples (8)

Show the balance change in all accounts from all postings over all time

hledger [bal|balance]

Show the balance change in accounts whose name contains `expenses`, as a tree, summarising the top two levels only

hledger [bal|balance] expenses [-t|--tree] [-2|--depth 2]

Show expenses each month, and their totals and averages, sorted by total; and their monthly budget goals

hledger [bal|balance] expenses [-M|--monthly] [-T|--row-total] [-A|--average] [-S|--sort-amount] --budget

Similar to the above, matching accounts by `Expense` type, as a two level tree without squashing boring accounts

hledger [bal|balance] type:X [-MTAS|--monthly --row-total --average --sort-amount] --budget [-t|--tree] [-2|--depth 2] --no-elide

Show end balances (including from postings before the start date), quarterly in 2024, in accounts whose name contains `assets` or `liabilities`

hledger [bal|balance] [-H|--historical] [-p|--period] 'quarterly in 2024' assets liabilities

Similar to the above, also show zero balances, sort by total and summarise to three levels

hledger [bal|balance] [-HQ|--historical --quarterly] date:2024 type:AL [-ES|--empty --sort-amount] [-3|--depth 3]

Show investment assets' market [V]alue in base currency at the end of each quarter

hledger [bal|balance] [-HVQ|--historical --market --quarterly] assets:investments

Show unrealised capital gains/losses from market price changes in each quarter, for non-cryptocurrency investment assets

hledger [bal|balance] --gain [-Q|--quarterly] assets:investments not:cryptocurrency
made by @shridhargupta | data from tldr-pages