Pharmaceutical Calculation Suite
Define sampling plans and acceptance criteria for lot inspection. Based on ANSI/ASQ Z1.4 standard.
AQL Sampling in Pharmaceutical QC
Acceptance Quality Level (AQL) sampling is an attributes inspection method (defects: pass/fail) that defines the maximum proportion of defects acceptable in a lot. It is based on ANSI/ASQ Z1.4 (Sampling Procedures and Tables for Inspection by Attributes) and ISO 2859-1, the international equivalents. AQL sampling is widely used in pharmaceutical QC for incoming material inspection, packaging inspection, and final product release.
Key concept: Rather than inspect 100% of a lot (100% inspection), AQL sampling provides risk-managed statistical assurance through strategic sampling. The supplier and customer agree on an AQL (e.g., 0.65% for critical defects, 1.0% for major, 2.5–4.0% for minor). The sampling plan defines: lot size → sample size code → sample size (n) and acceptance number (Ac). If ≤ Ac defects found in n samples, lot is ACCEPTED. If > Ac, lot is REJECTED.
Inspection Levels: Normal (default), Tightened (after failures), and Reduced (after consistent acceptances). Tightened increases stringency; Reduced decreases sample size when supplier is reliable.
ANSI/ASQ Z1.4 Sampling Plan Tables
AQL sampling uses two-stage lookup tables:
Step 1: Sample Size Code Letter — From Table I, based on lot size N and Inspection Level (typically II = Normal):
Step 2: Sampling Plan (n, Ac, Re) — From Table II-A (Normal Inspection), using Code Letter and AQL:
Example: Lot size 2,500, Normal Inspection Level II, AQL = 1.0%:
Severity Switching (Z1.4 rules — severity, not inspection level, is what switches):
Symbols and Descriptions
| Symbol | Name | Description |
|---|---|---|
| N | Lot Size | Total number of units in the lot being inspected |
| Level | Inspection Level | General I, II (default), III — sets the sampling discrimination (relative sample size), fixed by the contract or spec. It is independent of inspection severity (normal / tightened / reduced), which the calculator takes as its own input and which is switched by lot history. |
| Code | Sample Size Code Letter | From Table I (e.g., A–R). Determines sample size. |
| AQL | Acceptance Quality Level (%) | Max acceptable defect rate (0.65%, 1.0%, 1.5%, 2.5%, 4.0%, etc.) |
| n | Sample Size | Number of units to inspect from the lot |
| Ac | Acceptance Number | Max defects allowed to accept lot (≤ Ac → ACCEPT) |
| Re | Rejection Number | Min defects to reject lot (≥ Re → REJECT) |
| d | Actual Defects Found | Number of nonconforming units in sample of n |
| Pa | Probability of Acceptance | Statistical likelihood of accepting the lot at given defect rate |
Worked Example — Incoming Material Inspection
PharmaCalc returns your code letter, sample size and Accept/Reject numbers from the Z1.4 tables. It is computed server-side against the published method and written into a GMP PDF report with the inputs, formula chain, references, document control and signature pages — traceable to the software release that produced it.
Open the AQL Sampling calculator — free demo