Sampling Plan Calculator
Enter a lot or batch size to get the sample size two ways: the sqrt(n)+1 rule for quick internal checks, and the ISO 2859-1 / ANSI-ASQ Z1.4 General Inspection Level II sample size for a formal AQL-based plan.
The number of units in the batch or lot presented for inspection.
Which method should I use? Use sqrt(n)+1 for quick internal checks and bulk or visual inspection. Use ISO 2859 when a formal AQL-based plan is required by a customer or your SOP.
Result
Method 1: Square root of n plus one
--
Sample size is the ceiling of the square root of the lot size, plus one.
Method 2: ISO 2859-1 / Z1.4, General Level II
Code letter
--
Sample size
--
The acceptance and rejection numbers (Ac, Re) come from the ISO 2859-1 / Z1.4 master table at your chosen AQL. Set your AQL per your quality agreement and read Ac and Re from the standard for the sample size above.
Disclaimer: This tool is a planning aid. Your validated sampling SOP and any customer AQL take precedence over the figures shown here.
How Sample Size Is Determined for Incoming Inspection
When a batch or lot arrives, QA rarely inspects every unit. Instead a representative sample is pulled, and the number of units to pull is set by a sampling plan. Two approaches dominate in pharmaceutical and device quality work. The first is the sqrt(n)+1 rule, a fast heuristic used for visual and attribute checks on bulk deliveries, where the sample size is the ceiling of the square root of the lot size plus one. It is simple, defensible for internal screening, and scales gently as lots grow.
The second is the statistically grounded plan from ISO 2859-1, the international standard mirrored by ANSI-ASQ Z1.4 (formerly MIL-STD-105E). You look up an inspection level, most commonly General Inspection Level II, find the sample-size code letter for your lot size, and read the sample size from the master table. This calculator returns the code letter and the sample size for General Level II single sampling.
Sample size alone does not tell you whether to accept or reject the lot. That decision uses the acceptance number (Ac) and rejection number (Re), which depend on the Acceptable Quality Limit (AQL) you agree with your customer or set in your SOP. This tool deliberately does not print Ac and Re, because they are only meaningful once your AQL is fixed. Read them from the ISO 2859-1 / Z1.4 master table for the sample size shown, at your chosen AQL.
Frequently Asked Questions
About sampling plans and this calculator
What is the sqrt(n)+1 sampling rule?+
What is AQL?+
What is ISO 2859-1 / ANSI-ASQ Z1.4?+
How do I choose a sample size?+
Need a validated sampling and QC plan that passes audit?
We build sampling SOPs, AQL plans, and incoming-inspection controls that hold up in PPB and customer audits, aligned to ISO 2859-1 and your quality agreements.