Validation corpus
First-party · CC BY 4.0
Every calculator's test cases, published in full
The 3,302 test vectors the test suite runs against every calculator on this site — inputs, expected output and tolerance, with the working in between for 2,800 of them — published exactly as the suite runs them, so anyone can re-run a calculation and hold it to account.
- 3,302Test vectors, run on every push
- 1,151Calculators pinned
- 2,800With the working shown

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).
{
"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. 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.
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.
Fetch the calculator's file
calculators/{slug}.json holds its inputs, their dimensions and bounds, and its test cases.
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.
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.
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.
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);
}# Hold your own implementation to the published vectors of one calculator.
import json
import urllib.request
BASE = "https://craftquantities.com/api/v1"
slug = "baseplate-pier-size-calculator"
# Name your client: the CDN refuses urllib's default User-Agent with a 403.
request = urllib.request.Request(f"{BASE}/calculators/{slug}.json", headers={"User-Agent": "vector-check/1.0"})
with urllib.request.urlopen(request) as response:
test_cases = json.load(response)["testCases"]
# Yours. Inputs arrive in base units: metres here.
def pier_volume(i):
length = i["plateLength"] + 2 * i["edgeDistance"]
width = i["plateWidth"] + 2 * i["edgeDistance"]
return length * width * i["pierHeight"] * i["pierCount"] * (1 + i["wasteAllowance"] / 100)
for test in test_cases:
places = test.get("toleranceDecimalPlaces", 2)
got = pier_volume(test["inputs"])
ok = abs(got - test["expected"]) < 0.5 * 10 ** -places
print("pass" if ok else "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 steps2,800 · 85%
- A note, no steps266 · 8%
- The answer alone236 · 7%
What the expected value rests on
- Cited: names a stated source954 · 29%
- Sole source1,436 · 43%
- Ambiguous912 · 28%
Vectors per calculator
- 2 vectors798 · 69%
- 3 vectors141 · 12%
- 4 vectors131 · 12%
- 5 vectors43 · 4%
- 6 or more38 · 3%
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. 954 name the source they rest on; 1,436 belong to a calculator with one source, so it can only be that one; 912 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 249 calculators with a dropdown, 136 have every option selected by some vector. 987 vectors give every input the page’s authored default, and 300 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; 798 of the 1,151 carry 2.
| Category | Calculators | Vectors | Per calculator |
|---|---|---|---|
| Renovation & Construction | 88 | 264 | 3.0 |
| Electrical | 40 | 276 | 6.9 |
| Plumbing & HVAC | 51 | 154 | 3.0 |
| Insulation & Efficiency | 35 | 122 | 3.5 |
| Materials & Quantities | 654 | 1,598 | 2.4 |
| Financial-Adjacent | 44 | 152 | 3.5 |
| Measurements & Conversions | 110 | 338 | 3.1 |
| Auto/Utility | 23 | 54 | 2.3 |
| Landscaping & Outdoor | 29 | 96 | 3.3 |
| Pools & Water Features | 16 | 64 | 4.0 |
| Solar & Energy Storage | 12 | 34 | 2.8 |
| Sustainability & Compliance | 20 | 77 | 3.9 |
| Heavy Civil & Infrastructure | 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 987 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 502 vectors
Their calculator returns no breakdown for those inputs; no test stops this number growing. 266 still explain themselves in a note; 236 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 113 calculators
Of the 249 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
798 of the 1,151 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 79 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 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 — 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, 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 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,151 calculators is pinned by at least 2 test vectors — 3,302 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 — 2,800 of the 3,302 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.