Part IV — Business workflows · Chapter 12

Peer benchmarks from every 10-K

And how often last year's numbers change

Built from the SEC's XBRL extracts of every 10-K, an industry benchmark for fiscal 2025 shows the typical semiconductor company earning 2 cents of operating profit per dollar of revenue while the industry as a whole earned 35. One company in seven later changed a prior-year figure.

On this page
  1. What the SEC extracts contain
  2. From quarterly extracts to a company-year table
  3. The typical company and the industry total
  4. Last year's numbers, reported again
  5. Benchmark any company yourself
  6. Reusing the workflow

In fiscal 2025 the median semiconductor company earned 2.3 cents of operating profit on each dollar of revenue. Add up the whole group and it earned 35 cents, because NVIDIA alone took 67% of the group's operating income. Which of those two numbers a company should be held against depends on the question. Both come out of the same table, built here from the SEC's own extracts of every 10-K, the annual report each US-listed company files.

The table is the starting point of a peer benchmark, the analysis an equity analyst, a CFO's planning team or a board compensation committee runs to place one company among others. The chapter builds it for 2,143 operating companies in 18 industries. Along the way it measures how often the figures it is built on change: 13.7% of companies reported at least one of eight fiscal 2024 figures differently a year later.

The median semiconductor company earned 2.3 cents per dollar of revenue; the industry as a whole earned 35

-10.0%0.0%10.0%20.0%30.0%40.0%Operating margin (%)Semiconductors, median company: 2.3%Semiconductors, median company2.3%Semiconductors, whole industry: 35.1%Semiconductors, whole industry35.1%Software and IT services, median company: 2.6%Software and IT services, median compa…2.6%Software and IT services, whole industry: 28.1%Software and IT services, whole industry28.1%Computers and electronics, median company: 3.1%Computers and electronics, median compa…3.1%Computers and electronics, whole industry: 18.4%Computers and electronics, whole industry18.4%Pharmaceuticals and biotech, median company: -3.8%Pharmaceuticals and biotech, median com…-3.8%Pharmaceuticals and biotech, whole industry: 12.9%Pharmaceuticals and biotech, whole indus…12.9%Utilities, median company: 20.2%Utilities, median company20.2%Utilities, whole industry: 20.7%Utilities, whole industry20.7%
  • Median company
  • Whole industry (pooled)
Median-company and pooled operating margins for semiconductors, software, computers, pharmaceuticals and utilities, fiscal 2025
Semiconductors, median company2.3%
Semiconductors, whole industry35.1%
Software and IT services, median company2.6%
Software and IT services, whole industry28.1%
Computers and electronics, median company3.1%
Computers and electronics, whole industry18.4%
Pharmaceuticals and biotech, median company-3.8%
Pharmaceuticals and biotech, whole industry12.9%
Utilities, median company20.2%
Utilities, whole industry20.7%
Operating income as a share of revenue in fiscal 2025, in percent, for five of the 18 industries: the median company's margin, and the pooled margin (total operating income over total revenue). Companies with at least $50 million of revenue. Where one company earns most of an industry's income, as NVIDIA does in semiconductors (67%), the two diverge; in utilities they agree.SourceSEC Financial Statement Data Sets, 10-K filings for fiscal 2025

What the SEC extracts contain

Since 2011 every 10-K has carried its financial statements in XBRL, a markup in which each number is tagged with a line item from a standard taxonomy (Revenues, NetIncomeLoss, Assets), a date and a unit. Each quarter the SEC publishes every number from that quarter's filings as four tab-separated files. Two are used here: sub.txt, one row per filing with the company, its industry code and the balance-sheet date, and num.txt, one row per number.

From quarterly extracts to a company-year table

  1. Read thirteen zips in one query

    A glob inside the zip path reads the same file from every quarter, and filename = true records which quarter each row came from. A few segment descriptions contain a tab, so those fields are quoted; everything is read as text and cast later.

    10_load.sqlSQL
    CREATE OR REPLACE MACRO sec_file(name) AS TABLE
      SELECT regexp_extract(filename, '(\d{4}q\d)', 1) AS quarter, * EXCLUDE (filename)
      FROM read_csv('zip://' || getvariable('raw_dir') || '20*q*.zip/' || name,
                    delim = '\t', quote = '"', all_varchar = true, filename = true);

    87,326 filings, 17,238 of them 10-Kschapters/14-peer-benchmarks/pipeline/10_load.sql

  2. Keep one annual report per company and fiscal year

    Fiscal years follow Compustat's convention: a year ending in June or later is named for that calendar year, one ending January to May for the year before, so Walmart's year to January 2025 and Apple's to September 2024 are both fiscal 2024. Amendments (828 10-K/A filings) are left out.

    10_load.sqlSQL
    SELECT *, fiscal_year(period) AS fy, industry(sic) AS industry
    FROM filings
    WHERE form = '10-K' AND fiscal_year(period) BETWEEN 2023 AND 2025
    QUALIFY row_number() OVER (PARTITION BY cik, fiscal_year(period)
                               ORDER BY filed DESC, accepted DESC) = 1;

    16,807 reportschapters/14-peer-benchmarks/pipeline/10_load.sql

  3. Keep consolidated dollar amounts with standard tags

    A 10-K reports most figures several times: for the whole company, for each segment, sometimes for a subsidiary that co-signs. Leaving out rows with a segment or co-registrant keeps the consolidated figure, and checks.sql confirms that one value remains per report, tag, date and duration.

    10_load.sqlSQL
    WHERE n.uom = 'USD' AND n.version LIKE 'us-gaap/%'
      AND n.segments IS NULL AND n.coreg IS NULL AND n.qtrs IN ('0', '4')

    3,271,421 numberschapters/14-peer-benchmarks/pipeline/10_load.sql

  4. Map tags to line items, then PIVOT

    Revenue appears under several tags. A priority list picks one per report with arg_min, and PIVOT turns the long list of line items into one row per company and year.

    20_model.sqlSQL
    SELECT fy, cik, item, ddate, arg_min(value, priority) AS value
    FROM facts JOIN item_tags USING (tag) GROUP BY ALL;
    
    PIVOT (SELECT fy, cik, item, value FROM item_values WHERE ddate = period)
    ON item IN ('revenue', 'operating_income', 'net_income', 'rd', 'cfo', 'capex', 'assets', 'equity')
    USING any_value(value);

    4,032 reports with revenuechapters/14-peer-benchmarks/pipeline/20_model.sql

Revenue has no single tag

The tag Revenues covers only 30% of fiscal 2025 reports. Since the 2018 revenue-recognition standard, more companies use RevenueFromContractWithCustomerExcludingAssessedTax, which 2,164 reports carry. All five tags in the list together reach 74%. The rest are mostly banks, which report interest income instead, shell companies and drug developers with no sales yet.

A benchmark built on the Revenues tag alone would miss 59% of the companies that report revenue

0%20%40%60%80%100%Reports with a revenue figure (%)Revenues: 30%Revenues30%+ contract revenue, excl. sales taxes: 67%+ contract revenue, excl. sales taxes67%+ contract revenue, incl. sales taxes: 73%+ contract revenue, incl. sales taxes73%+ revenues net of interest expense: 74%+ revenues net of interest expense74%+ regulated and unregulated revenue: 74%+ regulated and unregulated revenue74%
Cumulative share of fiscal 2025 annual reports with a revenue figure as each of five revenue tags is added
Revenues30%
+ contract revenue, excl. sales taxes67%
+ contract revenue, incl. sales taxes73%
+ revenues net of interest expense74%
+ regulated and unregulated revenue74%
Share of fiscal 2025 10-K reports (5,459 in all) with a revenue figure, in percent, as each tag is added in priority order.SourceSEC Financial Statement Data Sets, 10-K filings for fiscal 2025

The typical company and the industry total

A median describes the typical company; a pooled margin (total operating income over total revenue) describes where the industry's money is. In industries with one dominant earner they diverge. Semiconductors is the extreme case, and software is close behind: the median software company's margin was 2.6%, the pooled margin 28.1%, with Alphabet earning 31% of the group's operating income. In utilities, where prices are set by regulators, the two agree to within a point (20.2% and 20.7%).

Utilities have the highest median operating margin, 20.2%, and pharmaceuticals the lowest, -3.8%, with 56% of drug companies running an operating loss

-20.0%0.0%20.0%Operating margin, median company (%)Utilities: 20.2% (25th to 75th percentile 13.0% to 26.1%)Utilities20.2%Other manufacturing: 7.3% (25th to 75th percentile 0.3% to 14.1%)Other manufacturing7.3%Food, beverages, tobacco: 7.1% (25th to 75th percentile 2.1% to 12.3%)Food, beverages, tobacco7.1%Other services: 7.1% (25th to 75th percentile -0.2% to 15.8%)Other services7.1%Oil and gas: 6.8% (25th to 75th percentile 1.5% to 21.0%)Oil and gas6.8%Construction: 6.7% (25th to 75th percentile 1.2% to 10.1%)Construction6.7%Transportation: 6.0% (25th to 75th percentile 2.1% to 15.7%)Transportation6.0%Retail and restaurants: 4.0% (25th to 75th percentile -0.4% to 8.4%)Retail and restaurants4.0%Chemicals: 3.5% (25th to 75th percentile -7.1% to 13.5%)Chemicals3.5%Mining: 3.5% (25th to 75th percentile -3.4% to 18.3%)Mining3.5%Wholesale: 3.5% (25th to 75th percentile 1.3% to 7.3%)Wholesale3.5%Computers and electronics: 3.1% (25th to 75th percentile -3.4% to 11.6%)Computers and electronics3.1%Software and IT services: 2.6% (25th to 75th percentile -9.8% to 13.1%)Software and IT services2.6%Health services: 2.5% (25th to 75th percentile -7.9% to 9.8%)Health services2.5%Semiconductors: 2.3% (25th to 75th percentile -10.6% to 17.0%)Semiconductors2.3%Telecom and media: 2.0% (25th to 75th percentile -15.2% to 12.8%)Telecom and media2.0%Medical devices: 1.2% (25th to 75th percentile -18.5% to 14.5%)Medical devices1.2%Pharmaceuticals and biotech: -3.8% (25th to 75th percentile -68.8% to 14.6%)Pharmaceuticals and biotech-3.8%
Median operating margin and interquartile range by industry, fiscal 2025, for US-listed operating companies with at least $50 million of revenue
Utilities20.2%13.0% to 26.1%
Other manufacturing7.3%0.3% to 14.1%
Food, beverages, tobacco7.1%2.1% to 12.3%
Other services7.1%-0.2% to 15.8%
Oil and gas6.8%1.5% to 21.0%
Construction6.7%1.2% to 10.1%
Transportation6.0%2.1% to 15.7%
Retail and restaurants4.0%-0.4% to 8.4%
Chemicals3.5%-7.1% to 13.5%
Mining3.5%-3.4% to 18.3%
Wholesale3.5%1.3% to 7.3%
Computers and electronics3.1%-3.4% to 11.6%
Software and IT services2.6%-9.8% to 13.1%
Health services2.5%-7.9% to 9.8%
Semiconductors2.3%-10.6% to 17.0%
Telecom and media2.0%-15.2% to 12.8%
Medical devices1.2%-18.5% to 14.5%
Pharmaceuticals and biotech-3.8%-68.8% to 14.6%
Operating income as a share of revenue in fiscal 2025, in percent: the bar is the median company in each industry, the whisker spans the 25th to 75th percentile. Companies with at least $50 million of revenue; banks, insurers and real-estate trusts are left out. The pharmaceutical whisker runs off the scale, marked with an arrow; it reaches -68.8%, where companies with a first product spend more than they sell. 56% of the 174 drug companies had an operating loss.SourceSEC Financial Statement Data Sets, 10-K filings for fiscal 2025, unweighted
Querychapters/14-peer-benchmarks/pipeline/20_model.sqlShow SQL
20_model.sqlSQL
SELECT fy, industry, count(*) AS companies,
       quantile_cont(op_margin, 0.25) AS p25, median(op_margin) AS median,
       quantile_cont(op_margin, 0.75) AS p75,
       sum(operating_income) / sum(revenue) AS pooled
FROM bench GROUP BY fy, industry;

18 industriesRuns at build time in DuckDB 2.0; shown for reading.Open file

In semiconductors and software the industry's pooled margin is more than ten times the median company's

Utilities12113.0%20.2%26.1%20.7%7%CHENIERE ENERGY INC5%
Other manufacturing3830.3%7.3%14.1%8.1%23%CATERPILLAR INC7%
Food, beverages, tobacco582.1%7.1%12.3%12.3%22%PHILIP MORRIS INTERNATIONAL INC.21%
Other services244-0.2%7.1%15.8%15.9%27%VISA INC.15%
Oil and gas801.5%6.8%21.0%7.6%21%MARATHON PETROLEUM CORP18%
Construction381.2%6.7%10.1%7.4%24%TOLL BROTHERS, INC.14%
Transportation702.1%6.0%15.7%10.9%16%UNION PACIFIC CORP10%
Retail and restaurants166-0.4%4.0%8.4%6.4%26%AMAZON COM INC33%
Chemicals65-7.1%3.5%13.5%10.7%38%PROCTER & GAMBLE CO51%
Mining28-3.4%3.5%18.3%16.9%39%SOUTHERN COPPER CORP/42%
Wholesale691.3%3.5%7.3%2.2%16%MCKESSON CORP16%
Computers and electronics127-3.4%3.1%11.6%18.4%32%APPLE INC65%
12 of 18 rows
Fiscal 2025, companies with at least $50 million of revenue. Median and quartiles are of company margins; pooled is total operating income over total revenue. Largest earner is the company with the most operating income, and its share of the industry's total. Click a header to sort.SourceSEC Financial Statement Data Sets, 10-K filings for fiscal 2025

A peer table

The table an analyst would start from for one company is the same query filtered to its industry. For the 60 semiconductor companies, percent_rank() over operating margin places each one: Intel, with a margin of -4.2%, ranks at the 34th percentile of its group, and Texas Instruments, at 34.1%, at the 95th.

Among 60 semiconductor companies, Intel's operating margin ranks at the 34th percentile

NVIDIA215.960.4%55.6%8.6%—100%
BROADCOM63.939.9%—17.2%42.1%98%
INTEL52.9-4.2%-0.5%26.1%-9.4%34%
MICRON TECHNOLOGY37.426.1%22.8%10.2%4.5%86%
ADVANCED MICRO DEVICES34.610.7%12.5%23.4%19.4%63%
APPLIED MATERIALS28.429.2%24.7%12.6%20.1%90%
TEXAS INSTRUMENTS17.734.1%28.3%11.8%14.7%95%
NXP SEMICONDUCTORS12.324.8%16.5%19.2%19.7%83%
ANALOG DEVICES11.026.6%20.6%16.0%38.8%88%
MARVELL TECHNOLOGY8.216.1%32.6%25.3%17.0%75%
AMKOR TECHNOLOGY6.77.0%5.6%2.5%2.8%58%
ON SEMICONDUCTOR6.01.4%2.0%—23.7%44%
12 of 60 rows
Fiscal 2025, SEC industry code 3674 (semiconductors and related devices), companies with at least $50 million of revenue. Free cash flow is operating cash flow less capital spending. Rank is the share of the group with a lower operating margin. Click a header to sort.SourceSEC Financial Statement Data Sets, 10-K filings for fiscal 2025

Last year's numbers, reported again

Each 10-K repeats the prior year's figures as comparatives, so every company-year appears twice: in its own report and in the next one. Matching the two on company, line item and date measures how often a figure changes between them. Of the 4,958 companies with both reports, 678 reported at least one of the eight line items for fiscal 2024 differently in their fiscal 2025 report, and 508 changed one by more than 1%. The year before was similar: 13.5% of companies changed a fiscal 2023 figure.

Operating income is the figure most often reported differently a year later: 8.5% of companies changed it

0.0%2.0%4.0%6.0%8.0%10.0%Companies reporting a different figure (%)Operating income: 8.5%Operating income8.5%R&D expense: 6.8%R&D expense6.8%Revenue: 6.2%Revenue6.2%Operating cash flow: 5.5%Operating cash flow5.5%Shareholders' equity: 4.7%Shareholders' equity4.7%Net income: 4.5%Net income4.5%Total assets: 4.5%Total assets4.5%Capital spending: 3.8%Capital spending3.8%
Share of companies whose fiscal 2024 figure changed in the next year's 10-K, by line item
Operating income8.5%
R&D expense6.8%
Revenue6.2%
Operating cash flow5.5%
Shareholders' equity4.7%
Net income4.5%
Total assets4.5%
Capital spending3.8%
Share of companies whose fiscal 2024 figure in the fiscal 2025 10-K differs from the figure in their fiscal 2024 10-K, in percent, by line item. Revenue pairs where the company moved to a different tag (86 of them) are left out.SourceSEC Financial Statement Data Sets, 10-K filings for fiscal 2024 and 2025
Querychapters/14-peer-benchmarks/pipeline/20_model.sqlShow SQL
20_model.sqlSQL
SELECT o.fy, o.cik, o.item, o.value AS original, l.value AS later,
       o.tag = l.tag AND o.value <> l.value AS changed
FROM item_values o
JOIN item_values l ON l.cik = o.cik AND l.item = o.item
                  AND l.ddate = o.ddate AND l.fy = o.fy + 1
WHERE o.ddate = o.period;

3,684 operating-income pairsRuns at build time in DuckDB 2.0; shown for reading.Open file

Most of these changes are presentation, not error. Operating income changes almost twice as often as net income (8.5% against 4.5%), and 227 companies changed revenue or operating income while leaving net income as it was, which is what moving a cost between lines or a business out of continuing operations does. 118 of the companies with a change reported a discontinued operation for fiscal 2024 in the later report that the earlier one did not have. Telling a reclassification from a correction of an error takes the text of the filing, which these extracts do not hold.

For a benchmark the consequence is practical. A peer table built from each company's latest report and one built from each year's original report can disagree for roughly one company in seven, and a rank near a cutoff, such as the median in a pay comparison, can move with it. Stating which vintage the table uses settles that.

Benchmark any company yourself

The dashboard below runs the chapter's benchmark table in your browser. The pipeline writes two Parquet extracts (the company-year table with its ratios and peer ranks, and every line item as first filed and as filed a year later) to public storage, 1.4 MB in all, and DuckDB-Wasm reads them over HTTP range requests. Pick an industry, a year and a ratio; search the peer table for a company. Every panel shows its SQL. The Ask box at the bottom hands your question to an AI model that writes the SQL; the query runs here, on the same files, and the model only sees the small result. Its answers are live and unaudited, unlike the numbers above.

Live · runs in your browser

10-K benchmarks for 2,000 companies, fiscal 2023 to 2025

Engine
DuckDB 2.0.1 · Wasm
Data read
0 B of 1.3 MB

The chapter's data sits in 2 Parquet files on public storage, 1.3 MB in all. Start the engine and DuckDB runs inside this page: each chart below is a SQL query that reads only the row groups and columns it needs over HTTP range requests.

  • companiesCompany-years: revenue, income, cash flow, margins, peer rank
  • revisionsEach figure as first filed and as filed a year later

Queries this chapter's published snapshot; the data does not update in real time. No account, nothing uploaded.

Reusing the workflow

Shell
DOWNLOAD=1 SEC_USER_AGENT="<name> <email>" bash chapters/14-peer-benchmarks/pipeline/run.sh

Peer benchmarking from XBRL is a long-to-wide problem. Read every quarter's zip with one glob, keep the consolidated standard-tag rows, map several tags to one line item with a priority list and arg_min, PIVOT to one row per company and year, and rank within groups with percent_rank(). Then join the table to itself one year on to see which figures moved before relying on any of them. Full pipeline: chapters/14-peer-benchmarks.