SEC XBRL Duplicate Facts: Why the First Tag Is Wrong

The consolidated figure in an XBRL filing is the one with no dimensions attached, so the right answer is defined by an absence. A five minute test you can run against your own data to find out which one you have.

The first filing that broke our parser was American Airlines. The code returned total equity as a positive number. The actual figure is negative, and has been for years.

Nothing errored. No exception, no warning, no null. The parser found a tag called StockholdersEquity, read a plausible dollar figure out of it, and handed it back. It was a real number from a real filing. It was just the wrong one: a subsidiary's equity rather than the consolidated deficit that belongs on the face of the balance sheet.

That is the failure mode worth understanding, because it is silent. Bad SEC data almost never arrives as a crash or an obviously broken figure. It arrives as a number that looks exactly like the number you wanted.

Why one filing contains the same figure many times

XBRL lets a filer attach dimensions to a fact. The same concept, tagged repeatedly, each instance qualified: this figure but for the consumer segment, this one for the investment bank, this one for a named subsidiary, this one for a geography.

That is a good design. A bank's consumer arm and its investment arm are genuinely different businesses, and flattening them into a single line would throw away information somebody needs.

The problem is how the consolidated figure is distinguished from the rest. It is not flagged. It is not first. It does not carry a label saying "consolidated". It is the instance with no dimensions attached. The number you want is defined by an absence.

JPMorgan reports Assets twenty-three times in a single filing. Twenty-two of those are dimensioned. One is not, and that one is the bank. If your code takes the first Assets fact it finds, it gets whichever one the document happens to list first, and nothing tells it that a choice was made at all.

Why "take the first tag" fails more than it looks like it should

The reason first-match survives casual testing is that it is right for simple filers. A single-segment company reports Assets once, and the first match is the only match. Test against a handful of mid-cap industrials and the approach looks fine.

It breaks on exactly the filings that matter most. Banks, insurers, conglomerates, REITs with joint ventures, anything with a captive finance arm, anything post-acquisition that still reports the acquired entity separately. The companies with the most segments are also the companies people most want data on, so the error rate on the filings you care about is higher than the error rate across the filer universe.

We are not going to put a percentage on it. Any figure we could quote would depend on which companies were in the sample, which quarters, and how we counted a partial match, and a number with those caveats stripped off becomes a marketing claim rather than a measurement. The failure mode is the point: picking by position picks a segment, and picking a segment is silent.

A five minute test you can run on your own data

You do not have to take our word for any of this. Pick a company you already hold figures for and ask SEC directly. One thing to know first: the companyfacts endpoint is not the filing. It publishes only the undimensioned facts, so the segment copies described above never reach it; they live in the filing's own XBRL instance. What companyfacts does repeat is the same period, once for every filing that reported it: the 10-Q that first filed it, the next 10-Q's comparative column, the 10-K, any amendment. Only one of those rows carries a frame, the one SEC picked for that calendar period.

# JPMorgan. The CIK is zero-padded to ten digits.
curl -H "User-Agent: You you@example.com" \
  https://data.sec.gov/api/xbrl/companyfacts/CIK0000019617.json \
  -o jpm.json
import json
from collections import Counter

facts = json.load(open("jpm.json"))
units = facts["facts"]["us-gaap"]["Assets"]["units"]["USD"]

# Group by period end. More than one row for a period means the same
# balance was reported again by a later filing (or an amendment).
per_period = Counter(f["end"] for f in units)
for end, n in sorted(per_period.items())[-4:]:
    print(end, n, "reported values")
    for f in units:
        if f["end"] == end:
            print("   ", f"{f['val']:>20,}", f["form"], f["fy"], f["fp"],
                  f["accn"], f.get("frame", "(no frame: repeat)"))

# Same period, different values: a restatement or a mis-tag. Look here first.
for end in per_period:
    vals = {f["val"] for f in units if f["end"] == end}
    if len(vals) > 1:
        print("DISAGREES", end, sorted(vals))

Run on 2 November 2026, JPMorgan's 31 December 2025 balance shows up three times, all 4,424,900,000,000: in the 10-K (fy 2025, FY), in the Q1 2026 10-Q and in the Q2 2026 10-Q, and only the last carries the frame CY2025Q4I. Note that fy and fp describe the filing that reported the row, not the period of the fact, so a 2025 balance can sit under fy 2026; the fy, fp and frame note covers that trap. Code that takes the first row is reading whichever filing happens to sort first. Usually the values agree. The DISAGREES lines are the periods where they do not: for JPMorgan the same run printed DISAGREES 2009-12-31 [2031989000000, 2119673000000] and a run of smaller revisions through 2014 and 2015. Those are the periods to check against your current data source.

For the dimensioned copies, the test is the one your data source should already pass: compare its figure with the companyfacts value for the same period and accession number. If they differ, your source picked a segment instead of the consolidated fact, and you have found it on one company out of however many you are carrying.

The check that actually resolves it

Heuristics do not fix this. "Take the largest" fails on a company whose parent is smaller than a consolidated subsidiary line. "Take the one without dimensions" is closer but depends on every filer tagging cleanly, which they do not.

Arithmetic fixes it. A balance sheet balances, and that gives you a test rather than a guess:

Assets = Liabilities + Equity

Pull every candidate for assets, every candidate for liabilities, every candidate for equity, and find the combination that reconciles. Consolidated figures balance against each other. A segment's assets do not balance against the whole company's liabilities. The arithmetic identifies the right set without needing to know anything about the company.

Three adjustments make it hold in the real world.

Noncontrolling interests belong in equity. When a parent consolidates a subsidiary it does not wholly own, the outside shareholders' stake sits in equity as NCI. StockholdersEquity excludes it; StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest includes it. Use the wrong one and the identity misses by exactly the minority stake, which reads as a reconciliation failure when the filing is fine.

Mezzanine is neither, and it is not optional for SPACs. Redeemable preferred and redeemable NCI sit between liabilities and equity on the face of the sheet. A SPAC with shares subject to possible redemption carries most of its balance sheet there. Ignore the mezzanine line and the identity fails on every one of them.

The tolerance is a fraction, not a constant. Filers round. Half a percent of assets absorbs that at any size. A fixed dollar tolerance either rejects every large bank or accepts anything at a small cap.

When it still does not balance

Sometimes no combination reconciles. The tempting move is to return the closest match, and it is the wrong one. A figure that is wrong by a segment is worse than a missing figure, because a gap gets investigated and a plausible number does not.

So we do not hide the failures, we name them. A filing that does not reconcile is drawn on the site with a red warning saying so, rather than quietly adjusted until it agrees. If a company filed something that does not add up, that is a fact about the company and it should reach you as one. The same goes for missing components: if a filer does not break out receivables, you get a labelled remainder rather than a zero, because a zero is a claim and "they did not say" is not.

This is also why we publish the method and not a rate. The methodology page shows what is checked, how, and what is currently failing, with live counts read off the database rather than a figure written down once. A single accuracy percentage is the easiest thing in the world to quote and the hardest to verify, and we would rather hand you something you can check.

What to do with this

Run the companyfacts test above against three companies you have data for. Pick a bank, a REIT and something with a recent acquisition, because those are where it breaks. If the figures agree, your source is doing the reconciliation and you can stop worrying about it. If they do not, you now know which direction the error goes.

If you would rather not maintain that yourself, BalanceProof runs the check above over every filing before storing anything, across 6,277 companies and 1.3M data points. You can look up any company on the site with no key and no account. The comparison with Intrinio covers how that differs from a general-purpose financial data feed, and pricing has the tiers. For code, one call such as curl -H "X-API-Key: YOUR_KEY" https://balanceproof.dev/api/company/JPM returns the consolidated figures with a check.identity_status field; the fields are in the API reference, and a free key is on the dashboard.

And if you find a figure that disagrees with the filing, tell us. That is the bug report we actually want.

See it on a real filing

Every figure on these pages is as reported, drawn at true proportion. No account needed.