AI Agents & AutomationFree calculatorPDF, Excel, Word export

AI Accuracy Validation Sample Size Calculator

Saying an AI agent is ninety percent accurate means little without knowing how many outputs were checked. This calculator gives the sample size needed to measure accuracy within a margin of error at a stated confidence level.

Your numbers

%

Your best guess from a quick trial. Use 50 for the most conservative sample size.

3 points
outputs

Outputs produced during the pilot period that you could sample from.

min

Your results

Sample size to review
273
Finite population correction applied.
Reviewer time needed
27 hrs
Z score
1.96
Sample size, infinite population
315
Share of population reviewed
13.7%

Assumes a simple random sample and independent outputs. Stratify by question type or risk class if error rates differ across them.

Save results:

Sample size vs margin of error

Sweeps Margin of error from 1 to 10, holding your other inputs fixed.

Get help designing the pilot evaluation

Optional: we can help build a graded evaluation set from your ERP data.

Optional. The tool and every export work without this. No spam.

How to use it

Enter the accuracy you expect, the margin you can tolerate and the confidence level, usually ninety-five percent. Enter how many outputs the pilot produced in total; a smaller population needs fewer samples because of the finite population correction. Then randomly select that many outputs, have a domain expert grade them against the ERP source of truth, and compute the observed accuracy with the same margin.

The formula

For a proportion, n0 = z squared x p x (1 - p) / margin squared, where p is expected accuracy as a fraction and z comes from the confidence level (1.96 at ninety-five percent). With a finite population N, n = n0 / (1 + (n0 - 1) / N). Using p = 0.5 gives the largest, most conservative sample. High accuracy needs fewer samples to bound than middling accuracy.

  • Halving the margin roughly quadruples the sample.
  • Random selection matters more than size.
  • Grade against ERP truth, not against plausibility.

Common mistakes

Cherry-picking easy examples, or only reviewing flagged outputs. Treating a pass on a small sample as proof of a rare-event error rate: to show errors are below one percent with confidence you need far more samples than for a headline accuracy. Pooling very different question types into one number. If a workflow has distinct high-risk classes, size and report them separately and set stricter margins for those.

Frequently Asked Questions

What if I do not know expected accuracy?

Use fifty percent for the most conservative sample size, or run a small trial of twenty to thirty outputs to get a rough estimate, then recompute.

Is a bigger population always more samples?

Only up to a point. Above a few thousand outputs the sample size barely changes. The correction matters mainly for small pilots.

Can I show the error rate is below one percent?

That needs a different calculation based on zero or few observed failures. As a rough guide, zero failures in about 300 independent samples supports an error rate under one percent at around ninety-five percent confidence.

Who should grade the outputs?

A domain expert who can check the ERP record, ideally blind to which outputs are from which model or prompt version.

Netray can set up evaluation sets from your ERP data and automate grading against source records. Ask us if you want a pilot measured properly.