Guide · Updated November 3, 2026

What Is XBRL, and Why Does AI Get Financial Statements Wrong?

XBRL explained for analysts: the US GAAP taxonomy, extensions, contexts, dimensions, linkbases and Inline XBRL, plus where it breaks and how AI misreads it.

XBRL (eXtensible Business Reporting Language) is the tagging that makes SEC financial statements machine-readable: every number in a 10-K or 10-Q carries a concept, a period, a unit, a scale and the company it belongs to. Kepler builds financial statements straight from those tags in code, with no language model in the path, and fills in what the tags can’t follow, which is why its statements match the filings and every cell opens to its source. We build Kepler. This guide explains XBRL in plain terms, shows where it breaks, and explains why AI tools so often get financial statements wrong even when the data is tagged.

XBRL in one fact

Apple’s fiscal 2025 10-K prints net sales as 416,161 in a table headed “in millions.” Behind that number sits one tagged fact:

Part Value
Concept us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax
Displayed value 416,161
Scale 6 (millions)
Stored value 416,161,000,000
Unit USD
Period Duration, September 29, 2024 to September 27, 2025
Entity Apple Inc. (CIK 0000320193)
Filed October 31, 2025, in the 10-K

You can check it yourself through the SEC’s companyconcept API. Everything an analyst needs to use the number correctly lives in the parts around the digits. Change the period, the scale or the concept and you have a different fact with the same digits. In Kepler, a statement cell points to the fact itself, so all of that context travels with the number. Our note The quieter hallucination shows one filing that tags the same string three times as three different facts.

The building blocks

Block What it does Where it trips people up
Taxonomy The dictionary of standard elements Several elements can plausibly fit one line
Extensions Company-specific elements Not comparable across companies
Contexts Entity, period and dimensions for each fact Instant vs duration; fiscal vs calendar
Units, scale, decimals, sign How the displayed number becomes a value Thousands vs millions; flipped signs
Dimensions Segment, product, geography and class breakdowns The same concept appears with and without them
Linkbases Presentation order, calculations, labels, definitions Labels change while tags don’t, and vice versa

Taxonomies. Most US filers tag with the US GAAP Financial Reporting Taxonomy, which the FASB releases each year, plus the SEC’s dei taxonomy for cover-page facts (company name, shares outstanding, filer status) and the SRT taxonomy for common axes and members. Foreign private issuers reporting under IFRS use the IFRS Taxonomy. The SEC lists the accepted versions on its standard taxonomies page.

Extensions. When a company decides no standard element fits a line, it creates its own with its own prefix. Extensions are legitimate and common, especially for industry-specific lines and company KPIs. They’re also the first thing that breaks a cross-company screen: two companies can report the same economic item under different elements. Kepler places each extension using the filing’s own calculation and presentation relationships, next to the standard lines it rolls into, and keeps the company’s label.

Contexts and periods. Every fact has a context: the entity, the period, and any dimensions. Balance sheet items are instants (as of a date); income and cash flow items are durations (from one date to another). A 10-Q carries the quarter, the year-to-date and the prior-year comparatives, so one concept appears four or more times with different periods.

Units, scale, decimals and sign. The unit is the currency or measure (USD, shares, USD per share). In Inline XBRL, the scale attribute turns a displayed 416,161 into 416,161,000,000; decimals records precision; a sign attribute marks the stored value as negative, which often doesn’t match the parentheses a reader sees: a capital expenditure printed in parentheses on the cash flow statement is normally stored as a positive payment. A wrong attribute produces a fact that is off by 1,000x or flipped, while the page a person reads looks fine.

Dimensions. Segment revenue is the consolidated revenue concept plus an axis (for example, us-gaap:StatementBusinessSegmentsAxis) and a member for the segment. Products, geographies, classes of stock and individual debt instruments work the same way. Software that ignores dimensions adds segment facts into consolidated totals. Kepler keeps the dimensions on every fact, so a segment figure can’t leak into a consolidated one.

Linkbases. The presentation linkbase orders lines the way the statement shows them; the calculation linkbase says which lines sum to which totals, with weights of plus or minus one; the label linkbase holds the company’s own wording for each line; the definition linkbase governs dimensions.

Inline XBRL. The SEC adopted Inline XBRL on June 28, 2018, phasing it in by filer size from 2019. The tags now live inside the HTML document, so the number a person reads and the number a machine reads are the same element.

Where to get XBRL data

  • The EDGAR Inline XBRL viewer. Open any recent 10-K on EDGAR and click a number to see its tag, period and scale.
  • The data.sec.gov APIs. Companyconcept returns one concept’s history for one company; companyfacts returns every fact; frames returns one fact per company for a period. The SEC’s API documentation says frames “aggregates one fact for each reporting entity that is last filed,” with annual frames matching durations of 365 days plus or minus 30.
  • The Financial Statement Data Sets, published quarterly by the SEC, for bulk work.

That frames detail matters. “Last filed” means a restated figure replaces the original, and the plus-or-minus-30-day window means fiscal years ending in different months land in the same calendar frame. Both are reasonable choices for a database, and both will mislead a backtest or a comps sheet that doesn’t know they were made. Apple shows the “last filed” rule at work even when nothing changed: its fiscal 2026 10-K, filed November 3, 2026, repeats fiscal 2025 net sales of $416,161 million, and the CY2025 frame now credits that figure to the new filing rather than the 10-K that first reported it. Kepler keeps every version with its filing date rather than the last one filed.

Where XBRL breaks

XBRL is the best structured financial data the market has. It still leaves an analyst with five problems.

1. Tags change while lines carry on, and lines change while tags carry on. Companies rename, merge, split and move lines between years. Our paper Reclassified to Conform found that 194 of 200 randomly drawn companies reshaped a statement somewhere in their history in ways the tag can’t follow, and that 17% of the boundaries between consecutive annual reports carry at least one such change (22% on cash flow statements).

2. Tags can be wrong when the page is right. The same paper documents Palantir’s fiscal 2021 cash flow statement: printed correctly, with the XBRL tags slipped, so stock-option proceeds sat under the debt tag and debt proceeds under the common-stock tag. A pipeline that trusts the tag gets the wrong history.

3. Scale and sign errors. A fact tagged at the wrong scale or sign looks normal in the filing and wrong in the data. The risk is everywhere because the printed string and the stored value rarely match: our note Stop Paying to Forget counts 934 tagged numbers in Apple’s fiscal 2025 10-K, 909 of which print a string that isn’t the stored value. Software that reads the page instead of the tag has to apply the right scale to each of those 909 numbers.

4. Much of what analysts model isn’t tagged. The same note points out that Disney tags segment information in its notes, while the lines analysts actually model for its businesses live in untagged MD&A. Company KPIs, many non-GAAP measures, and earnings releases filed as Exhibit 99.1 generally carry no financial tags at all; on an earnings 8-K, only the cover page is tagged.

5. The same period has several versions. A year’s revenue appears in that year’s 10-K and again in the next two, sometimes with different values. Tags don’t tell you which version you’re looking at; the filing date does. Our guide to restatements and reclassifications covers how to track them.

How AI tools use and misuse XBRL

Approach What goes wrong
Ignore XBRL and read the HTML or PDF The model retypes numbers, misreads scale and picks the wrong column
Search tagged facts by value Several facts share the same digits; the model picks one without saying which
Pull the “latest” value for each period Restated figures overwrite what was originally reported
Follow each tag across years Histories break wherever a line was reshaped or retagged
Treat tags as complete Untagged MD&A figures, KPIs and release figures go missing

A frontier model on its own usually takes the first route: it reads a filing’s text and writes the numbers itself, which is why scale and period errors survive into answers that look well cited. Tools that use XBRL directly avoid retyping, then often take the third or fourth route without telling you. Before you trust a tool’s statements, ask it for one restated year as filed and as restated, and for a line you know was reclassified. Our 10-K analysis guide and the best AI for SEC filing analysis both have tests to run, and how to check AI-generated numbers has a ten-point checklist that works on any tool, Kepler included.

How Kepler does this

Statements are assembled from the filing’s own XBRL, in code. Kepler reads each filing’s tagged facts and builds the income statement, balance sheet and cash flow statement with no model in the path. Each cell is keyed to the fact the company itself filed, with its period, unit, scale and dimensions intact, and the model can only point at a fact, never type one. Ask for the same statement twice and you get the same numbers with the same sources.

Every version is kept, with its filing date. Kepler keeps each figure as every filing stated it, so any table is available as first reported, as last reported, or as it stood on any past date. Histories follow lines across renames, merges and retags using the method in our Reclassified to Conform paper, and every break in a line is marked. Agents watch your coverage and flag a retagged, reclassified or restated line the day the filing lands.

What isn’t tagged gets read. Extraction models we train read every page of 26M+ SEC filings at ingest, MD&A, exhibits and earnings releases included, and keep each figure with its scale and unit: 99.4% of tagged facts were read at the right scale across 40 held-out filings. The same models read your firm’s documents, decks, LP reports and models that will never carry a tag.

Your definitions sit on top. Kepler ships with an ontology of public companies built from SEC filings, and our engineers build your firm’s ontology on top of it, mapping your KPI names and adjusted metrics to the right concepts so every company is measured your way. Click any number to land on its line; calculated figures open to their formula and inputs. Your engineers can pull the same cited facts through our API and MCP server, and analysts get them in Excel, Claude or ChatGPT. Permissions mirror your firm’s, and every query is logged. Our engineers built this layer before at Palantir.

Open any company’s statements on app.kepler.ai and click a cell to see its fact, or book a demo to see restated and as-filed histories side by side.

Frequently asked questions

What is XBRL in simple terms?

XBRL, eXtensible Business Reporting Language, is the machine-readable tagging behind SEC financial statements: each reported number carries a concept, a period, a unit, a scale and the company it belongs to. Kepler builds financial statements directly from those tags in code, with no language model in the path, and fills the gaps the tags leave from the filing itself, so every number arrives without retyping and opens to its source.

Does the SEC require XBRL?

Yes. The SEC has required XBRL financial data from operating companies since 2009, phased in by company size. In June 2018 it adopted Inline XBRL, which embeds the tags in the human-readable filing itself, phased in from 2019. Today the financial statements and cover pages of 10-Ks and 10-Qs carry Inline XBRL tags.

What is the difference between XBRL and Inline XBRL?

Traditional XBRL was a separate data file filed alongside the HTML document, so the two could drift apart. Inline XBRL puts the tags inside the HTML a person reads, so one document serves both. Each tagged number keeps its displayed form, such as 416,161, plus attributes for scale and sign that turn it into the stored value, such as 416,161,000,000.

What is an XBRL extension or custom tag?

An extension is an element a company creates when it decides no standard element in the US GAAP taxonomy fits a line item. It carries the company's prefix rather than us-gaap. Extensions make a filing complete but harder to compare, because no other company uses the same element, and software has to work out what each one means.

Where can I get XBRL data for free?

From the SEC. The EDGAR viewer shows the tag behind any number in an Inline XBRL filing, and the APIs on data.sec.gov return every fact a company has filed (companyfacts), one concept's history (companyconcept), or one fact per company for a period (frames). The SEC also publishes quarterly Financial Statement Data Sets. None of these reconcile restatements or reclassifications for you.

Why doesn't XBRL data always match the statements?

Usually for one of four reasons: the tag was applied at the wrong scale or sign, the company tagged a line with a different element than last year, the figure you want isn't tagged at all (many MD&A and KPI figures aren't), or a later filing restated or reclassified the period. Check the tagged fact in the EDGAR viewer against the printed table.