scalpel@labs: ~/glossary/table-detection-confidence.mdx5 sections

Table Detection Confidence: What the Percentage Means

Detection confidence is a 0 to 100 percent score for how table-like a block of markup is. A real `<table>` with two or more rows, two or more columns and a header scores near the top; a loose list of repeated cards scores lower because it might not be data.

extension: Scalpel Tablesupdated: 2026-08-14read_time: 3 min
less table-detection-confidence.mdx

Why it matters

Not every block of data on a page is an actual table. A navigation menu with repeated links can look table-like; a set of pricing cards aligned in a grid has row and column structure but might not be data meant for export. A table detector needs to score how confident it is that a block really is tabular data, not just coincidentally grid-shaped.

That score helps you decide whether to export it. A high confidence tells you the extractor found proper table markup, headers, and rectangular structure. A low confidence means it found repeated card elements but can't be sure they represent data. The number isn't a guarantee, but it's a signal worth checking against before you copy to a spreadsheet.

How it works

Confidence starts with the element type. A real HTML <table> with proper <thead> or <th> cells scores highest because the markup itself declares intent. An ARIA grid with role="table" or role="grid" scores well if it includes column headers. A CSS display:grid or display:table layout scores lower because the browser never saw that as tabular data originally.

The score then factors in structure. More rows and columns suggest real data over a one-off card. Two or more rows and two or more columns becomes a threshold; anything smaller might be a summary or a single record. The presence of a header row is the strongest structural signal. If the first row is marked as a header with <th> or ARIA, the score rises. If there's no header but the first row looks like one (uppercase words, different styling), the score gains a smaller bump.

Finally, consistency matters. A list of identical repeated elements, each laid out the same way, suggests data. Inconsistent rows or columns lower the score because real tables don't usually have ragged structures.

Below a certain threshold (typically around 40 percent), the block is dropped to avoid false positives. Most pages never send blocks below that line to you; the popup shows only candidates the detector thought were worth a look.

What does not matter

A low score doesn't mean the data is broken or wrong. It means the detector was less certain. Maybe it found a loose list of cards that happen to be data, or a table missing obvious headers. The data is probably fine; it's just more likely to be a false alarm. Checking the preview before export is your safeguard.

Also, the score is a static calculation based on markup shape, not on whether the data inside makes semantic sense. Two identical rows of numbers will score the same whether they represent revenue or random numbers. The detector reads form, not meaning.

Code example

A real <table> with a header and two rows might score 95 percent:

<table>
  <thead>
    <tr>
      <th>Product</th>
      <th>Q1 Revenue</th>
    </tr>
  </thead>
  <tbody>
    <tr><td>Shoes</td><td>$45,000</td></tr>
    <tr><td>Hats</td><td>$12,000</td></tr>
  </tbody>
</table>

A repeated list of product cards with no markup headers might score 55 percent:

<div class="product-cards">
  <div class="card">
    <h3>Shoes</h3>
    <p>$45,000</p>
  </div>
  <div class="card">
    <h3>Hats</h3>
    <p>$12,000</p>
  </div>
</div>

Both contain the same data, but only the <table> carries structural markup that the detector can read as intentional tabular data.

How Scalpel shows it

Scalpel Tables displays the confidence percentage at the right of each table card's information row. The percentage sits next to any badges (like "spans" or "truncated"). Hover over the number to see what the detector found: the element type, row and column counts, header status, and whether it spotted any merged cells or structural issues.

Sources