Quality & InspectionFree calculatorPDF, Excel, Word exportFood and Beverage

Microbial Sampling Plan Acceptance Probability Calculator

Negative test results are weaker evidence than most people expect. This calculator shows the probability that a zero-positive-allowed sampling plan catches a lot with a given contamination rate.

Your numbers

samples

Count of independent sample units, c=0.

%

Percent of units that are contaminated.

Your results

Chance a contaminated lot passes
29.8%
Probability that all n samples test negative.
Chance the plan detects the lot
70.2%
Samples needed for required confidence
149
Smallest n giving at least the chosen detection confidence at this prevalence.

Assumes random independent sampling from a homogeneous lot. Contamination is often clustered, which lowers real detection. Pathogen sampling gives limited assurance and does not replace preventive controls.

Save results:

Detection probability vs prevalence

Sweeps True contamination prevalence in lot from 0.5 to 20, holding your other inputs fixed.

Connect test results to lot holds

An optional conversation on linking lab results to ERP lot status.

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

How to use it

Enter how many sample units you test and the contamination prevalence you want to be able to detect. The tool returns the chance that a lot at that prevalence still passes, the chance it is detected, and the number of samples needed for your confidence target. Try prevalences from 0.5 to 5 percent to see why finished product testing alone cannot prove a lot is clean.

  • c = 0 means any positive fails the lot
  • Composite samples count as one test unit
  • Combine with environmental monitoring

The math

If a fraction p of units are contaminated and you test n independent units, the chance all are negative is (1 minus p) to the power n. Detection probability is one minus that. To reach confidence C, n equals ln(1 minus C) divided by ln(1 minus p). For 95 percent confidence at 1 percent prevalence that is about 299 samples, the familiar rule of three style result.

Example and cautions

Sixty samples against a 2 percent prevalence lot give a 70 percent chance of detection and 30 percent chance the lot passes. At 0.5 percent prevalence, 60 samples detect less than 30 percent of lots. Cautions: real contamination clusters, sample units are small compared to the lot, and test sensitivity is below 100 percent. Treat sampling as verification of your controls, not a control itself.

Frequently Asked Questions

Why do negative results not prove a lot is safe?

Because low prevalence contamination is rarely hit by a practical number of samples. At 1 percent prevalence, 60 samples only detect it about 45 percent of the time.

What does c = 0 mean?

In a two-class plan, c is the maximum allowed number of positive samples. With c = 0 any positive result rejects the lot, which is typical for pathogens.

How many samples do regulators require?

It depends on the pathogen, product and rule. Plans from ICMSF, FSIS or customer specifications vary, so follow the applicable requirement rather than this calculator.

Does compositing samples change the math?

Compositing pools units into one analytical test. The math then depends on dilution and method sensitivity, so treat the number of composites as n only with caution.

Lot test results, holds and releases usually span the LIMS and ERP. Netray can build a read-only view that links them for traceability reviews.