# Every calculator's test cases, published in full

> The 3,536 test vectors behind 1,181 construction calculators: inputs, expected output, tolerance, and the working for 3,038. First-party.

Page: https://craftquantities.com/validation/ (page). This is the page's Markdown copy; the HTML page is the canonical version.

The 3,536 test vectors the test suite runs against every calculator on this site — inputs, expected output and tolerance, with the working in between for 3,038 of them — published exactly as the suite runs them, so anyone can re-run a calculation and hold it to account.

- 3,536 Test vectors, run on every push
- 1,181 Calculators pinned
- 3,038 With the working shown

- Check a calculation
- [The whole corpus (JSON)](https://craftquantities.com/api/v1/validation.json)
- [As a benchmark for models](https://craftquantities.com/benchmark/)

## First-party validation, not independent review

These vectors were written by the same people who wrote the calculators. They establish that the maths does what its author intended — not that the author was right. Those are different claims, and only the first one is made here.

No independent review of this catalogue exists. None is claimed, and nothing on this site describes itself as independently verified. If that changes, this page will name the reviewer and what they reviewed.

Anatomy of a vector

## What one test case holds

A real vector from the corpus, field by field. Every one has the same shape; the optional fields appear where they apply.

**name**

What the case is, in words — the scenario the vector pins, not an identifier.

**inputs**

Every dimensioned value in its dimension's base unit — metres, square metres, litres, kilograms — never the unit a label mentions; units.json converts anything else. A value with no dimension, a percentage or a count, is in the unit its label names.

**expected, unit**

The answer the calculator must return for those inputs, in the unit it returns it in.

**toleranceDecimalPlaces**

The comparison passes when the difference is under 0.5 × 10^−places — half a unit in the last decimal place. Absent means two; zero means the nearest whole number. It can be negative (−1 means within 5) or fractional (0.5 means within about 0.16) where a result is a large or a coarse figure.

**confidence**

The confidence the calculation returns for these inputs — high, medium or low. The page can only lower it, for instance when a value is outside the range the calculator was written for, and that page-side downgrade is not in this field.

**steps**

The labelled intermediates the calculator produced for these inputs — the working the page shows. Generated by running the vector, not typed, so a disagreement can be traced to one step.

**includesAllowance**

Present where the calculator reports an allowance it folded into the expected value, with how much. Many calculators take a waste percentage as an input instead, so check the inputs for one too before comparing.

**basis, sourceIndex**

What the expected value rests on beyond arithmetic: cited (the vector names one of the calculator's stated sources — which may be the method statement itself rather than a document), sole-source (the calculator has only one) or ambiguous (it has several and the registry does not record which).

_baseplate-pier-size-calculator · one vector_

```
{
  "name": "Four 400 mm square plates, 100 mm margin, 900 mm piers, 8% waste",
  "inputs": {
    "plateLength": 0.4,
    "plateWidth": 0.4,
    "edgeDistance": 0.1,
    "pierHeight": 0.9,
    "pierCount": 4,
    "wasteAllowance": 8
  },
  "expected": 1.39968,
  "toleranceDecimalPlaces": 3,
  "unit": "m³",
  "confidence": "medium",
  "steps": [
    { "label": "Pier length", "value": 600, "unit": "mm" },
    { "label": "Pier width", "value": 600, "unit": "mm" },
    { "label": "Plan area of one pier", "value": 0.36, "unit": "m²" },
    { "label": "Volume per pier", "value": 0.324, "unit": "m³" },
    { "label": "Base volume before waste", "value": 1.296, "unit": "m³" }
  ],
  "includesAllowance": { "label": "Form loss and over-break allowance", "percent": 8 },
  "basis": "cited",
  "sourceIndex": 0
}
```

From the [Column Pier Size from Baseplate Edge Distance Calculator](https://craftquantities.com/calculators/materials-quantities/baseplate-pier-size-calculator/). Step values are rounded to four places here; the file carries them at full precision. The whole calculator, inputs and all: [/api/v1/calculators/baseplate-pier-size-calculator.json](https://craftquantities.com/api/v1/calculators/baseplate-pier-size-calculator.json).

Check a calculation

## Hold any calculator to its own vectors

Five steps, and the code for the first three. Nothing to install and no key: the files are static and served to any origin.

1. ### Fetch the calculator's file

   calculators/{slug}.json holds its inputs, their dimensions and bounds, and its test cases.
2. ### Read the inputs in base units

   Every dimensioned value is in its dimension's base unit — metres, square metres, litres — not the unit a label mentions. units.json converts the rest; a percentage or a count is as labelled.
3. ### Compute, and compare to the tolerance

   It passes when the difference is under 0.5 × 10^−places, with places from toleranceDecimalPlaces: two where absent, zero for the nearest whole number, and negative or fractional for coarse figures.
4. ### If it differs, compare the steps

   Each vector publishes the intermediates the calculator produced, so a disagreement narrows to one step rather than a whole calculator.
5. ### Then check for an allowance

   A waste or safety margin may already be in the expected value: includesAllowance says so where the calculator reports it, and many take a waste percentage as an input. After that, the page's limitations name the convention it follows.

```
// Hold your own implementation to the published vectors of one calculator.
const BASE = "https://craftquantities.com/api/v1";
const slug = "baseplate-pier-size-calculator";

const response = await fetch(`${BASE}/calculators/${slug}.json`);
if (!response.ok) throw new Error(`No calculator called ${slug}`);
const { testCases } = await response.json();

// Yours. Inputs arrive in base units: metres here.
function pierVolume({ plateLength, plateWidth, edgeDistance, pierHeight, pierCount, wasteAllowance }) {
  const length = plateLength + 2 * edgeDistance;
  const width = plateWidth + 2 * edgeDistance;
  return length * width * pierHeight * pierCount * (1 + wasteAllowance / 100);
}

for (const test of testCases) {
  const places = test.toleranceDecimalPlaces ?? 2;
  const got = pierVolume(test.inputs);
  const pass = Math.abs(got - test.expected) < 0.5 * 10 ** -places;
  console.log(pass ? "pass" : "FAIL", test.name, got, test.expected);
}
```

The formula is written from the calculator’s stated source, and this site’s tests run the JavaScript snippet’s formula against every published vector of that calculator. Swap in your own function and slug to check any other.

Coverage, measured every build

## What the corpus covers

Counted from the registry each time the site is built. Three gaps — vectors that give the answer alone, vectors of ambiguous source, and dropdown options no vector selects — are held by tests that fail if they grow.

### The working shown

- With worked steps 3,038 · 86%
- A note, no steps 264 · 7%
- The answer alone 234 · 7%

### What the expected value rests on

- Cited: names a stated source 1,205 · 34%
- Sole source 1,414 · 40%
- Ambiguous 917 · 26%

### Vectors per calculator

- 2 vectors 793 · 67%
- 3 vectors 144 · 12%
- 4 vectors 139 · 12%
- 5 vectors 50 · 4%
- 6 or more 55 · 5%

### Where each expected value comes from

From the formula on the page, computed by its author — which is why each vector publishes a derivation rather than a citation: for a first-party vector the derivation is the stronger of the two, because you can redo it. The `basis` claims only what is true by construction. **1,205** name the source they rest on; **1,414** belong to a calculator with one source, so it can only be that one; **917** belong to a calculator with several and the registry does not record which. Those were not back-filled by guessing, and a test stops the number growing.

### Dropdowns and defaults

Of the 283 calculators with a dropdown, 169 have every option selected by some vector. 993 vectors give every input the page’s authored default, and 452 leave an input out, so the calculation sees it as absent — deliberate where a calculator treats absence as a case, and listed because it is otherwise invisible.

13 categories

## Coverage by category

Every calculator carries at least 2; 793 of the 1,181 carry 2.

**Calculators and test vectors in each category**

| Category | Calculators | Vectors | Per calculator |
|---|---|---|---|
| [Renovation & Construction](https://craftquantities.com/calculators/renovation-construction/) | 89 | 299 | 3.4 |
| [Electrical](https://craftquantities.com/calculators/electrical/) | 42 | 282 | 6.7 |
| [Plumbing & HVAC](https://craftquantities.com/calculators/plumbing-hvac/) | 53 | 159 | 3.0 |
| [Insulation & Efficiency](https://craftquantities.com/calculators/insulation-efficiency/) | 35 | 123 | 3.5 |
| [Materials & Quantities](https://craftquantities.com/calculators/materials-quantities/) | 675 | 1,765 | 2.6 |
| [Financial-Adjacent](https://craftquantities.com/calculators/financial-adjacent/) | 45 | 157 | 3.5 |
| [Measurements & Conversions](https://craftquantities.com/calculators/measurements-conversions/) | 111 | 342 | 3.1 |
| [Auto/Utility](https://craftquantities.com/calculators/auto-utility/) | 23 | 61 | 2.7 |
| [Landscaping & Outdoor](https://craftquantities.com/calculators/landscaping-outdoor/) | 30 | 98 | 3.3 |
| [Pools & Water Features](https://craftquantities.com/calculators/pools-water/) | 17 | 66 | 3.9 |
| [Solar & Energy Storage](https://craftquantities.com/calculators/solar-energy/) | 12 | 34 | 2.8 |
| [Sustainability & Compliance](https://craftquantities.com/calculators/sustainability-compliance/) | 20 | 77 | 3.9 |
| [Heavy Civil & Infrastructure](https://craftquantities.com/calculators/heavy-civil/) | 29 | 73 | 2.5 |

Limits

## What the corpus does not tell you

A green suite is an argument, and it is worth exactly its coverage. These are the gaps, counted.

- ### Whether the formula is the right one

  A vector pins a computation against a number. Choosing the wrong method and testing it faithfully produces a green suite, which is why the sources and limitations are on every page.
- ### Beyond the defaults, on 993 vectors

  Those vectors give every input the page's authored default. Pinning the defaults is worth doing and characterises nothing else about the function; no test stops this number growing.
- ### The working, on 498 vectors

  Their calculator returns no breakdown for those inputs; no test stops this number growing. 264 still explain themselves in a note; 234 give the answer alone. Only 40 are single-step conversions with genuinely nothing in between — the rest are a gap in the pages, and a test lets the answer-alone count only fall.
- ### Dropdown options no vector chooses, on 114 calculators

  Of the 283 calculators with a dropdown, these carry an option no vector ever selects. Those paths through the formula are unmeasured however green the suite is, and a test holds the number so it can only fall.
- ### The whole input range

  793 of the 1,181 calculators carry 2 vectors: enough to catch a broken edit, not enough to characterise a function across everything it accepts. Deepening it is open work.
- ### The metric answer, on 80 calculators

  The suite runs every vector without a unit system. On these calculators the metric page takes a different branch — another unit, a product counted in metric stock, or a limit the metric codes set differently — and no published vector runs it. Other tests compare the two systems; this corpus does not pin the metric figure.
- ### Anything about a real building

  The vectors check arithmetic on stated inputs. Whether those inputs describe the job — the true wall, the product actually bought, the code in force where it is built — is outside what any test here can see.

## Report a failure

Email [contact@craftquantities.com](mailto:contact@craftquantities.com) with:

- the calculator’s address or slug;
- the exact inputs, with their units;
- what you got, and what you expected;
- the source your expected value comes from.

The last is what makes a report actionable: without it, the two of us are comparing opinions.

## What happens next

A confirmed failure is fixed, and one a reader reported or could have acted on is published in the [corrections ledger](https://craftquantities.com/corrections/) — what was wrong, what is correct, and what now prevents it, or that nothing yet does — rather than corrected quietly.

It already carries the [site-wide audit of 2026-09-06](https://craftquantities.com/corrections/#141-wrong-numbers), a first-party review that read every calculator then published one by one and fixed each wrong number it confirmed — and says which fixes had been reported done and were not.

Build on it

## The same data, for your own tools

Every vector is in the free JSON API beside the inputs it runs, under CC BY 4.0, with no key.

- [The free JSON API](https://craftquantities.com/api/)
- [How each method works](https://craftquantities.com/methodology/)

- The suite, not a subset

  The vectors published are the ones the test suite runs, generated from the same bundle as the pages.
- Errors in the open

  Confirmed errors are published in the corrections ledger, with the fix and what now prevents each.
- Sources on every page

  Each calculator states the standard, source or method its formula rests on.

## Frequently asked questions

**How accurate are the calculators on this site?**

Each of the 1,181 calculators is pinned by at least 2 test vectors — 3,536 in all — and the test suite runs every one of them on every push to the site's code, so an edit that moves a published answer turns the check red. That establishes that the arithmetic does what its author intended. Whether the method is the right one rests on the sources each page cites, which is why every calculator names them.

**Has anyone independently verified these calculators?**

No. The vectors were written by the same people who wrote the calculators, so this is first-party validation, and the site says so everywhere it mentions them. No independent review of the catalogue exists and none is claimed. If one happens, this page will name the reviewer and what they reviewed.

**What is a test vector?**

A fixed set of inputs, the answer the calculator must return for them, and the precision the comparison is made to. Here each one also carries what that value rests on, the worked steps between input and answer where the calculator shows them — 3,038 of the 3,536 do — and, where the calculator reports one, the allowance already folded into it.

**How do I check a calculator against my own figures?**

Fetch the calculator's file from the free JSON API, run your own implementation on each test case's inputs (dimensioned values are in base units: metres, square metres, litres, kilograms), and compare the result with expected: it passes when the difference is under 0.5 × 10^−toleranceDecimalPlaces. If it differs, compare the steps one by one, then check whether an allowance is folded in — in includesAllowance, or as a waste percentage among the inputs.

**What happens when a calculator is found to be wrong?**

A confirmed error is fixed, and one a reader reported or could have acted on is published in the corrections ledger — what was wrong, what is correct, and what now prevents it, or that nothing yet does. A report needs the calculator, the exact inputs, what you got, what you expected and the source your figure comes from.

---
Source: https://craftquantities.com/validation/
Craft Quantities: free to read, cite and link to; the pages are not licensed for republication. Quantities only: no prices, no design and no certification.
