Free Tool

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

--

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?+
The sqrt(n)+1 rule is a quick heuristic for deciding how many units to sample from a lot of size n. You take the square root of the lot size, round up to the next whole number, and add one. It is widely used in GMP settings for visual and attribute inspection of bulk deliveries because it is easy to apply and scales sensibly as lots grow. It is a screening aid rather than a statistically derived acceptance plan.
What is AQL?+
AQL stands for Acceptable Quality Limit. It is the maximum percent of defective units that is still considered acceptable as a process average when sampling a series of lots. Your AQL is agreed with your customer or set in your quality agreement and SOP. It drives the acceptance number (Ac) and rejection number (Re) in the ISO 2859-1 / Z1.4 master table. This tool does not choose an AQL for you, because it is a quality decision specific to the product and contract.
What is ISO 2859-1 / ANSI-ASQ Z1.4?+
ISO 2859-1 is the international standard for sampling procedures for inspection by attributes, indexed by AQL. ANSI-ASQ Z1.4 is the equivalent North American standard, and both trace back to MIL-STD-105E. You select an inspection level, find the sample-size code letter for your lot size, and read the sample size and the Ac/Re values at your AQL from the master table. This calculator uses General Inspection Level II single sampling, the most common default.
How do I choose a sample size?+
Choose based on why you are sampling. For a quick internal or visual check on a bulk delivery, the sqrt(n)+1 rule gives a defensible, easy number. When a customer or your SOP requires a formal AQL-based acceptance plan, use ISO 2859-1 / Z1.4: find the code letter for your lot size at General Level II, read the sample size, then read Ac and Re at your agreed AQL. Whatever you pick, your validated sampling SOP and any customer AQL take precedence.

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.

Was this tool helpful?

Tell us about your experience. Your review helps other teams decide, and helps us improve the tool.

Leave a review

Explore More

Related Tools

View all tools →