AQL Sample Size Calculator (ANSI/ASQ Z1.4)
ANSI/ASQ Z1.4 turns a lot size into a sample size in two steps: a code letter from Table I, then a sample size from that letter. This calculator does both and also estimates how likely a lot with a given defect rate is to pass.
Your numbers
Number of units in the lot or shipment being inspected.
Level II is used unless the contract or your quality plan says otherwise.
Read the Ac for your AQL and code letter from the standard. It is used here only to estimate the acceptance probability.
The real percentage of nonconforming units in the lot, if you knew it.
Your results
Sample sizes follow ANSI/ASQ Z1.4 (ISO 2859-1) Table I for general inspection levels I, II and III with single sampling. Always read the accept and reject numbers from the standard itself. The acceptance probability is a Poisson approximation and is slightly optimistic for small lots.
Probability of acceptance vs true defect rate (%)
Sweeps True lot defect rate from 0.1 to 10, holding your other inputs fixed.
Automate sampling plan selection from your ERP
Optional: we can review how lot size, supplier history and AQL are stored in your ERP and show how plan selection could run automatically.
Optional. The tool and every export work without this. No spam.
How to use the calculator
Enter the lot size and choose the general inspection level. Level II is the default for most purchase orders. The calculator returns the code letter position, the table sample size and the number of units you actually inspect, which is capped at the lot size. Then look up your AQL and the code letter in Table II-A of the standard to find the acceptance number, choose that value in the Ac field, and try different true defect rates to see how the lot would behave. The chart shows the full operating characteristic curve for that plan.
- Level I samples less, Level III samples more, Level II sits between.
- Lot size is the size of the lot presented, not the size of the whole order.
- Draw the sample at random from the whole lot, not from the top of one pallet.
The method behind it
Table I groups lot sizes into bands, for example 281 to 500, 501 to 1,200 and 1,201 to 3,200. Each band and level maps to a code letter from A to R, skipping I and O. Each letter maps to a fixed sample size: A is 2, B is 3, C is 5, D is 8, E is 13, F is 20, G is 32, H is 50, J is 80, K is 125, L is 200, M is 315, N is 500, P is 800, Q is 1,250 and R is 2,000. The AQL then sets the accept and reject numbers for that sample size. The OC curve here uses the Poisson approximation to the binomial.
How to read the result
A lot of 2,500 units at Level II is code letter K, so you inspect 125 units. With Ac of 5 at a true defect rate of 2.5 percent the expected defects in the sample is about 3.1, and the lot is accepted most of the time. Raise the true defect rate to 6 percent and the acceptance probability falls sharply. That is the point of the plan: it is a screening tool that protects you from poor lots most of the time, not a guarantee that an accepted lot has zero defects.
Common mistakes
The most common error is treating AQL as the maximum acceptable defect rate in a delivered lot. It is the quality level that the plan accepts most of the time. Other frequent errors are using the wrong lot size, forgetting to switch to tightened inspection after two of five consecutive lots are rejected, and mixing major and minor defects in one count. Define the AQL separately for critical, major and minor classes, and record which class each defect belongs to.
- Critical defects are normally inspected at an AQL of 0 or by 100 percent screening.
- Do not re-inspect a rejected lot until the failed units are removed or the supplier has sorted it.
- Record the plan used on every inspection report.
Frequently Asked Questions
What is the sample size for a lot of 1,000 at AQL 1.0, Level II?
A lot of 1,000 falls in the 501 to 1,200 band, which is code letter J at Level II. J has a sample size of 80. For AQL 1.0 the single sampling normal plan accepts on 2 defects and rejects on 3. Confirm against Table II-A of your edition of the standard.
Is ANSI Z1.4 the same as ISO 2859-1?
They are technically aligned. ANSI/ASQ Z1.4 and ISO 2859-1 use the same code letters, sample sizes and accept and reject numbers for lot by lot inspection by attributes. Both descend from MIL-STD-105. Check the current edition your customer cites, since contracts sometimes reference a specific version.
What does it mean when the sample size equals the lot size?
In small lots the table sample size can be larger than the lot. The standard then calls for inspecting the entire lot, which is called 100 percent inspection. The calculator caps the sample at the lot size so you do not plan to inspect more units than exist.
Can I use this for variables data such as measured dimensions?
No. Z1.4 is for attributes, meaning pass or fail counts. Measured data uses a variables plan such as ANSI/ASQ Z1.9, which has different sample sizes and uses the sample mean and standard deviation. Many shops use Z1.4 for visual and go or no-go checks and Z1.9 or SPC for dimensions.
If your ERP already holds lot size, supplier and inspection history, we can wire sampling plan selection and switching rules into your receiving flow so the inspector sees the plan automatically.
Related Tools
AQL Sample Size Code Letter Reference Table
Searchable lot size to code letter and sample size table for general inspection levels I, II and III.
Quality & InspectionSkip Lot Sampling Calculator
Model the savings from inspecting only a fraction of a qualified supplier's lots and the probability the supplier passes qualification.
Quality & InspectionIncoming Inspection Checklist
A practical receiving inspection checklist covering documents, packaging, identification, visual and dimensional checks, certificates and disposition.
Quality & InspectionReceiving Inspection Report Template
A fill-in receiving inspection report with supplier, PO, sampling plan, measurement table and disposition, ready to export.
More Quality & Inspection tools
See all- A3 Problem Solving Report Template
- Rolled Throughput Yield Calculator
- A3 Problem Solving Template
- Rolled Throughput Yield Calculator
- Cpk Confidence Interval and Sample Size Calculator
- X-bar and S Control Chart Limits Calculator
- Individuals and Moving Range (I-MR) Chart Limits Calculator
- Expected PPM Out of Specification Calculator
- Taguchi Loss Function Calculator