The income statement, and the issection: / isgroup: tags
The P&L is a stack of boxes, such as Revenue and Expenses. Each line in a box is a group of accounts rather than a raw account, and Ledgeline values it into a single currency so every line is one number. Net income is below the boxes.
By default the statement covers one date range and sets it beside the range of the same length just before it, with a % change for every line. Pick Monthly, Quarterly or Yearly instead and you get one column per period plus a Total, the way QuickBooks lays out a P&L.
If you tag your accounts, the statement expands into the full GAAP multi-step form, with Cost of revenue, Gross profit, EBITDA, Operating income and Income before taxes. If you tag nothing, none of those lines appear, so a personal journal shows only Revenue, Expenses and net income.
The design notes and the reasoning behind each decision are in
plans/13-income-statement-redesign.md
and, for the intervals and Total column,
plans/24-report-intervals-and-totals.md.
The controls
| Control | What it sets | Default |
|---|---|---|
| From | First day of the statement, inclusive | January 1 of the current year |
| To | Last day of the statement, inclusive | December 31 of the current year |
| Interval | Total, Monthly, Quarterly or Yearly | Total |
| Depth | How many account levels a line lists; deeper accounts fold into their ancestor | All levels |
| Budget | Adds an italic Budget column after Total | Off |
Total gives one column for the whole range, compared with the range before it. The other three split the range into periods. The next two sections cover each mode.

Why groups instead of accounts
The reason is the same as on the balance sheet. A chart of
accounts is organised for bookkeeping, and a statement is organised for reading. You want to know
what you spent on housing, not the split between expenses:housing:rent and
expenses:housing:insurance. Each line is a group, collapsed by default; expand
one to see the accounts behind it, at full depth.
Groups also make the report easier to scan. The old report printed a rolled-up
income row, then every account under it, then a Total Revenues footer that
repeated the same figure. Groups replace the ancestor rows, and no number is
printed twice.
Depth trims the drill-down, not the groups. At depth 2,
expenses:travel:airfare and expenses:travel:hotel fold into one Travel row,
as hledger is --depth 2 would print them. Group, section and net income totals
never change with depth. The slider stops at the deepest account the statement
lists. An [incomestatement] --depth line in hledger.conf sets the starting
depth. After that, the slider keeps your setting until the config changes.
How accounts inside a line are laid out
The accounts under a group are laid out like a bookkeeper’s statement rather than a list of paths. The same rules apply on the balance sheet and in the cash flow statement:
Travel
Airfare 1,200
Ground Transport 340
Lodging
Hotels 900
Short-term Rentals 410
Total Travel 2,850
- Each level prints once. A parent account becomes a heading only when two or more of the line’s accounts sit under it. A heading has no amount of its own; the line’s total covers everything.
- A lone account isn’t wrapped. If only one account sits under a parent,
it prints on its own, with no heading above it, labelled with the first
level it came through:
assets:bank:wise:eurbeside two other banks reads Wise · Eur. A top-level name (assets,expenses) is never used this way. - The line’s own heading isn’t repeated. Accounts that all sit under
expenses:travelgo directly under the Travel group, not under a second “Travel” heading. - Grouping never crosses lines. A “Professional Services” group that holds
expenses:people-costs:payroll-processing-feesandexpenses:professional-fees:accountingand…:legalshows Payroll Processing Fees on its own and Accounting and Legal under a Professional Fees heading, whatever other groups hold the rest ofpeople-costs. - A parent with its own postings gets a first row,
<name> (other), that holds them, so the rows beneath a heading add up. - Labels are the account’s last segment. A segment that looks like code
(
ground-transport) is title-cased (Ground Transport); one written for people (People Costs,4110 Rental Income) prints exactly as written. If two rows side by side would read the same, each is prefixed with its parent, as inOffice · OtherandTravel · Other. - A
name:tag overrides the label. Use it when the segment is a code, as inaccount assets:bank:fcb ; name: First Community Bank. The tag names that account only; its children keep their own labels. Set it in Settings → Accounts. - Hover any label to see its full account path. In an export, the path is a note on the label’s cell.
The Budget column
Tick Budget to show your budget goals beside the actuals. An italic Budget column appears right after Total (after Amount in Total mode, before Prior), covering the same From–To range. There is one Budget column, not one per period.
Each goal appears on the row it describes:
- A goal on a leaf account appears on that account’s row.
- A goal on a parent that the line shows as a heading adds a Total row under the heading’s children, carrying both the actual and the goal. Without a budget, headings never get Total rows.
- A goal on the account that makes up the whole group appears on the group’s total.
- A goal on an account that depth folded away appears on the row it folded into.
- Group, section, subtotal and net income rows show the sum of the goals beneath them.
A goal whose accounts are split across groups can’t go on any one row, because that row’s actual wouldn’t match it. It is counted only in the section total, and a note under the section says so: “Budget for People Costs spans groups: shown in section total only.”
Goals follow the same rules as the Budget page, including a parent goal collecting its children’s spending. Goals on accounts that aren’t on the P&L are ignored.
The two tags
issection: picks the box. It takes one of seven codes and nothing else:
| Code | Box |
|---|---|
revenue | Revenue |
cogs | Cost of revenue |
opex | Operating expenses (or just “Expenses”, see below) |
depreciation | Depreciation & amortization |
interest | Interest |
tax | Income taxes |
other | Other income & expense |
isgroup: names the line inside that box. It is free text, in any language:
account cogs ; type: X, issection: cogs
account cogs:hosting ; type: X, isgroup: Cloud hosting
account cogs:payments ; type: X, isgroup: Payment processing
account expenses:salaries ; type: X, issection: opex
account expenses:depreciation ; type: X, issection: depreciation
account expenses:interest ; type: X, issection: interest
account expenses:taxes:income ; type: X, issection: tax
account income:grants ; type: R, issection: other
Both tags inherit to sub-accounts, as type: does, so tagging cogs covers
everything beneath it unless a child overrides it. Accounts that share an
isgroup: value share a line, even if they are in unrelated parts of the tree.
Balance-sheet accounts never appear here, whatever they are tagged. An
account whose type is asset, liability or equity (declared or inferred from its
name) is left off the income statement even with an issection: or isgroup:
tag, and Problems warns about
each tag. If the account’s name says expense or revenue and only its type:
disagrees, the type is probably a typo, and Problems
says that instead.
The usual case is a contra-asset such as accumulated depreciation. Its credits
mirror the depreciation expense, so showing it in the same box would cancel that
expense out of net income. Tag the expense account. The balance sheet shows the
contra-asset.
An issection: value that isn’t one of the seven codes is ignored, and the
account falls to its default section. Ledgeline still reports it.
Problems names the account,
the value you wrote and the seven valid codes, because a mistyped classification
tag puts an account in the wrong box.
Two pitfalls from hledger’s tag syntax
A tag value ends at the next comma. This affects isgroup: most, because
group names are often phrases:
account cogs:ops ; type: X, isgroup: Servers, bandwidth ; ✗ group is "Servers"
account cogs:ops ; type: X, isgroup: Servers and bandwidth ; ✓ the whole phrase
The tag name is the last word before the colon, so don’t put a space inside
it. ; income section: cogs declares a tag called section, not issection.
What happens with no tags at all
Everything of declared type R lands in Revenue, everything of type X lands in
Expenses. The statement then has two boxes and a net income figure.
Ledgeline does not guess cogs, tax, interest or depreciation sections.
Any rule that could find them in an untagged journal would have to match English
account names, and when name matching gets it wrong, a section reads zero. A
journal rooted at cogs: with type: X lands in Expenses and reads correctly.
One issection: cogs tag moves it to its own box.
How a line is chosen when there is no isgroup:
Ledgeline groups untagged accounts by dropping the prefix that every account in the box shares and taking the next segment:
| Accounts in the box | Shared prefix | Lines |
|---|---|---|
income:salary, income:dividends | income | Salary, Dividends |
expenses:food:groceries, expenses:housing:rent | expenses | Food, Housing |
cogs:materials, expenses:rent | (none) | Cogs, Expenses |
The shared prefix carries no information. If every expense is under expenses:,
repeating it on every line adds nothing, and the next segment is the category you
chose. When a box holds accounts from different roots, nothing is shared, so the
roots become the lines.
The balance sheet uses the same rule. On a chart where every account is under one root, it gives the balance sheet’s “second path segment” grouping, so the two statements group alike.
As on the balance sheet, grouping never matches account names. It uses only position in the tree. The same small alias table may change how a label reads, but it never moves an account to a different line.
The subtotal ladder
Boxes appear in this order, and a box with nothing in it is omitted entirely. Each subtotal appears only when the sections that give it meaning exist:
Revenue
Cost of revenue if any cogs
Gross profit if any cogs
Operating expenses
EBITDA if any depreciation
Depreciation & amortization if any depreciation
Operating income if the statement is multi-step
Other income & expense if any other
Interest if any interest
Income before taxes if any tax
Income taxes if any tax
Net income
EBITDA is above D&A and Operating income is below it. That is the order a standard statement uses, and it makes every subtotal a running total of everything printed above it. Ledgeline hides EBITDA when there is no D&A box, because it would be the same number as Operating income, and this redesign avoids printing a number twice.
The opex box is titled “Expenses” on a simple statement and “Operating
expenses” once the statement goes multi-step. It is the same box either way.
Only the label changes, so no account moves to another box when you add your first
cogs: tag.
Signs
Every box prints as a positive amount, and the ladder does the subtracting. The exception is Other income & expense, which can hold both income and expense. A grant and a lawsuit settlement can share it, so it shows a net contribution to income and can print negative, in parentheses as on a standard statement.
Total mode: Amount, Prior and % change
With Interval set to Total, every box has three figure columns:
- Amount is the line’s total over From to To.
- Prior is the same line over the window of equal length that ends the day
before From. For a full calendar year that is the year before. For any other
range it is the same number of days, and the line above the boxes names both
sets of dates. Each window is valued at its own end, matching
hledger is -Vrun over that range, so the Prior column agrees with the report you ran last year. A currency move between the two ends shows up as part of the change. - % change is
(Amount − Prior) / |Prior|, to one decimal place. Ledgeline computes it from the exact decimal amounts, not from the rounded figures on screen. Dividing by the absolute value of Prior makes the sign give the direction. A line that goes from −100 to −50 reads50.0%, because it went up. When Prior is zero or the line has no prior figure, the cell shows—.
The net income panel under the boxes shows the same three figures, in the same order: this range, the prior range, and the % change.
Interval mode: one column per period
Set Interval to Monthly, Quarterly or Yearly and the statement
splits From to To into periods, one column each, followed by a Total
column. The first and last periods are cut at From and To, so a range that
starts mid-month gives a partial first month. Column headers read like
Jan 2026. Hover over one to see its exact dates.

Interval mode has no Prior column and no % change. Net income becomes a row under the boxes with a figure for every period and for the Total.
The Total is the sum of the period columns, which is what QuickBooks does.
Under market valuation each period is valued at its own end date, so the Total
can differ from what Total mode prints for the same range, where everything is
valued once at To. That difference is expected. On fixtures/sample.journal,
Yearly from 2025-01-01 to 2026-12-31 puts Travel at a Total of $1,405.50,
while Total mode for the same two years shows $1,446.36. Cost is the same on
every date, so ?value=cost on the API makes the two agree.
Ledgeline decides which lines and groups exist from all the periods together. A line that only had activity in March still appears in every column, with zeros in the months it was quiet.
The Money in and Money out diagrams do not split by period. In both modes they cover the whole From to To range.
Valuation
By default, Ledgeline values lines at market in your base currency, so
foreign spending and dividends show as one amount instead of a column of
currencies. Prices come only from the journal’s P directives, matching
hledger is -V.
Ledgeline does not drop a commodity that has no usable P directive. It stays
on its line as a secondary figure, and a warning banner above the report names it.
?value=cost and ?value=none are available on the API for the cost basis and
for raw, unvalued commodities.
Why net income here isn’t Retained earnings there
The balance sheet computes its Retained earnings line at cost, and this
statement values net income at market. On fixtures/sample.journal that is
$42,998.91 against $41,916.34. Both are right. The balance sheet’s Valuation
adjustment line holds the difference, so assets = liabilities + equity still
balances. Ask for
?value=cost and the two figures agree.
The money-flow diagrams
The statement has two Sankey diagrams. Money in is directly above the Revenue box, and Money out is directly above the first cost box that prints. Each one breaks down the side of the statement below it. It is not a second statement.
Money in puts the revenue lines on the left and the accounts the money went to on the right. It shows, for example, that a salary arrived partly as cash in the bank and partly as tax withheld from your pay. Money out swaps the columns. The accounts that funded the spending are on the left and the cost lines are on the right, so you can see which card or account paid for each category.
How a posting is attributed
A statement line is one side of a transaction. The other side is where the money came from or went to. With two postings, that is unambiguous. With more, Ledgeline allocates each statement posting across the postings on the opposite side of the ledger in its own transaction, in proportion to their size. Here is a paycheck:
2026-01-27 * Acme Corp | January salary
income:salary $-5,660.00
expenses:taxes:federal $1,150.00
expenses:taxes:state $310.00
assets:bank:checking $4,200.00
This transaction draws Salary to Taxes: Federal at $1,150.00, to Taxes: State at $310.00 and to Bank: Checking at $4,200.00 in Money in, and Salary to Taxes at $1,460.00 in Money out. Gross pay funded the withheld tax, not the cash account, and both diagrams show that.
Ledgeline allocates the statement side rather than the account side, for two reasons. First, each statement posting splits exactly, using integer mantissa arithmetic with the last share taking the remainder. Second, market valuation causes no errors. A transaction balances at cost, not at market, so a valued transaction’s debits and credits may differ, but splitting a known statement amount by proportion doesn’t depend on them balancing.
Other income & expense is in neither diagram. It is the one box the statement lets print negative, because a grant and a lawsuit settlement can share it, so it has no single direction.
When the diagram leaves something out
Ledgeline doesn’t draw links whose net over the window is zero or negative. A category refunded more than it was charged has no width, and a Sankey can’t draw a negative one. The same applies to a statement posting with no counterparty to attribute it to.
When anything is left out, a line under the diagram reads Showing $X of $Y. $X is what the ribbons carry, and $Y is the statement figure they break down. On an ordinary journal the two agree and the line doesn’t appear. Ledgeline never hides the line when they differ, because it is the only place the missing amount shows.
Reading the diagrams
Colour identifies the account, and an account keeps its colour in both diagrams. For example, assets:bank:checking is the same blue wherever it appears. The default theme has fourteen colours, assigned to the biggest accounts first by their combined total across both diagrams. Accounts after the last colour fold into one grey (other) bar, with their links merged. Statement lines never fold and never take a colour, because folding them would hide the spending categories the diagram is meant to show. The panel grows taller instead. Every bar has its own label and figure, and a legend under each diagram names every account, so you never have to rely on colour alone.
Labels never overlap. When bars are too close for their labels, the labels move apart, in bar order, and each label that moved gets a thin line back to its bar. If a column still can’t fit, its smallest bars lose the figure line first and keep the name. The figure is still in the legend. If even names alone don’t fit, the diagram grows taller.
Hover over a bar to see its name, figure and share of its side’s total, or over a ribbon to see where it runs, its figure and its share of the bar it leaves. The box appears at once. Each bar is also a tab stop. Focus one with Tab to see the same box, and press Esc to close it.
Both panels are collapsible, and each remembers its own state across reloads. A collapsed panel also skips its data. The diagrams come from a separate endpoint that makes a second pass over every posting in the window, so with both panels collapsed, Ledgeline fetches nothing. Expanding a panel fetches its data immediately.
A collapsed panel prints its graph total beside the title. An open panel doesn’t, because the bars carry the detail and the box directly below shows the total, so a header figure would repeat it. Where the ribbons and the statement disagree, the open panel says so with Showing $X of $Y.
Export
The Export .xlsx button writes what the screen shows: filled section headers, bold group rows, indented accounts, ruled subtotals, then net income. Every line is valued into one commodity, so the amount cells hold real numbers with a number format rather than text, so you can calculate with them. The export writes groups expanded, whatever is collapsed on screen, laid out as on screen at the screen’s Depth, with each label’s full account path as a cell note. With Budget ticked, an italic Budget column follows Total (or Amount), and the title line adds “with budget”.
The columns depend on the Interval:
| Interval | Columns |
|---|---|
| Total | Account, Amount, the prior window (headed with its dates), % change, Other commodities, and Other commodities for the prior window |
| Monthly, Quarterly, Yearly | Account, one column per period, Total (in the base commodity), and Other commodities for the Total |
In Total mode the export leaves the % change cell empty where the screen shows
—, so the column never shows a 0.0% that wasn’t measured.
The title line names the range and the interval, for example
2026-01-01 to 2026-06-30, monthly, and so does the file name:
income-statement-2026-01-01-to-2026-06-30-monthly.xlsx. Two exports of the
same range at different intervals can’t overwrite each other.
The two diagrams are not in the workbook. A picture has no numbers to calculate with, and the numbers behind it are already in the boxes it breaks down.
API
GET /api/reports/incomestatement/grouped
?from=YYYY-MM-DD (default: Jan 1 of the current year)
&to=YYYY-MM-DD (default: today; both ends inclusive)
&value=market|cost|none (default: market)
&valueIn=$ (default: the journal's base commodity)
&compare=previous|none (default: previous)
&interval=total|monthly|quarterly|yearly
(default: total; daily and weekly also work)
&depth=N (optional; omit for every level, 0 for totals only)
&budget=1 (optional; adds the budget fields)
Each group’s rows are outline rows: {kind, label, level, account, depth, amounts}, where kind is heading, account, other or (with a budget)
total, level is the indent within the group, and account is the full
path. A heading’s amounts is its subtree’s total; the app doesn’t print it.
maxDepth is the deepest account the statement lists.
With budget=1, every row, group, section and subtotal gains budget (a
figure, or null where no goal sits), each section gains budgetUnplaced: [{account, label}] for goals split across groups, and the report gains
netIncomeBudget. Without it, none of these keys appear.
interval=total returns the same bytes it always did. Any other interval
returns interval mode:
bucketslists the columns as[{key, from, to}].priorisnull.- Every figure is
{current, values}, wherevalueshas one entry per bucket andcurrentis their sum, the Total.
Interval mode refuses some requests with a 400:
compare=previous. Leavecompareout or sendcompare=none.fromafterto.- A range that needs more than 1,200 columns (a daily interval over four years, for example).
valueIn is checked against each bucket’s end date, so it has to price
something in at least one of the windows the report values.
The older GET /api/reports/incomestatement is unchanged. It returns the flat, unvalued, hledger is-shaped report, and the hledger parity golden test uses it.
GET /api/reports/incomestatement/flows
?from=YYYY-MM-DD (default: Jan 1 of the current year)
&to=YYYY-MM-DD (default: today; both ends inclusive)
&valueIn=$ (default: the journal's base commodity, else the
single commodity the window is written in)
This endpoint takes no value= and no compare=. A link’s width is one number, so widths are always market-valued, and neither diagram has a comparison column. The response carries both graphs, each with its nodes, its links, the total they carry and the sectionTotal they decompose. base is null when the journal has several commodities and nothing prices them against each other, and both graphs are then empty.