2026-07-30 8 min

Inspection Sampling Calculator

Determine sample size, acceptance number, and rejection number per ANSI/ASQ Z1.4 (MIL-STD-105) for attribute sampling plans.

Calculator

Lot Size (N)
AQL (%)
Inspection Severity

Results

Normal

Code Letter

H-

ANSI/ASQ Z1.4 code letter based on lot size

Sample Size (n)

50-

Number of units to inspect from the lot

Acceptance Number (Ac)

5-

Maximum allowable defectives for acceptance

Rejection Number (Re)

6-

Minimum defectives for rejection

AQL

1.00%

Acceptable Quality Level

Sampling Plan

50[Ac=5,Re=6]-

Plan notation n[Ac,Re]

Lot Quality Estimate

1.20%

Estimated lot percent defective

Probability of Acceptance

100.00%

OC curve probability at estimated quality

Visualizations

Results Overview

50-Sample Size
5-Acceptance Number
6-Rejection Number
1-AQL
505,000,000-Sampling Plan
1.2-Lot Quality Estimate
100-Probability of Acceptance

Formula

The sampling plan is determined by lot size and AQL. The code letter comes from the lot size range, sample size from the code letter, and Ac/Re from the intersection of code letter and AQL row.

Code_Letter = f(N) per ANSI/ASQ Z1.4 Table 1; Sample_Size = f(Code_Letter)

Alternative Form

P_a = Σ_{x=0}^{Ac} (e^{-np} × (np)^x) / x! (Poisson approximation)

Variables

SymbolNameUnitDescription
NLot Size-Total units in the inspection lot
nSample Size-Number of units inspected
AcAcceptance Number-Maximum defects allowed for lot acceptance
ReRejection Number-Minimum defects for lot rejection
AQLAcceptable Quality Level%Maximum tolerable percent defective
P_aProbability of Acceptance-Probability lot is accepted at given quality level

Explanation

ANSI/ASQ Z1.4 (formerly MIL-STD-105) provides standardized sampling plans for attribute inspection. The standard uses code letters based on lot size and inspection level to determine sample size. Acceptance numbers (Ac) and rejection numbers (Re) come from the AQL table. The OC curve shows the probability of acceptance versus lot quality.

Derivation

The OC curve uses the Poisson distribution to approximate the hypergeometric distribution when n/N < 0.1. P_a = Σ poisson(k; np) for k=0 to Ac, where p is the fraction defective in the lot.

Step-by-Step Calculation

Follow each step to understand how the result is calculated from your inputs.

Step 1

Determine lot size N and select AQL.

Lot Size N:500
AQL:1.0%
Result: N = 500, AQL = 1.0%
Step 2

Look up code letter from ANSI/ASQ Z1.4 Table 1 (General Inspection Level II).

Code Letter:H
Result: Code letter: H
Step 3

Find sample size from code letter, then Ac and Re from AQL table.

Sample Size n:50
Ac:5
Re:6
Result: Plan: n=50, Ac=5, Re=6
Step 4

Evaluate OC curve: probability of acceptance at estimated lot quality.

P_a = Σ Poisson(k; n×p)
Lot Quality Estimate:1.20%
P(a):100.00%
Result: Probability of acceptance: 100.00%
Final Answer
H

Worked Examples

See how the calculator works with different scenarios.

Scenario

A batch of 500 machined shafts. AQL = 1.0%. Determine ANSI/ASQ Z1.4 sampling plan.

Inputs

Lot Size:500
AQL:1.0%
Inspection:Normal

Calculation

Code letter from lot size 281-500 = H Sample size for H = 50 AQL 1.0% with code H: Ac=5, Re=6

Result

Plan: n=50, Ac=5, Re=6

Interpretation

Inspect 50 shafts. Accept lot if ≤5 defective, reject if ≥6 defective.

Understanding Your Result

Your Result: Code Letter: H -

Typical range: Code letters A-Q cover lot sizes 2 to 500,000+. AQL values 0.065-10%. Sample sizes 2-1250 units. Ac values 0-21 typical.

What This Means

The inspection sampling plan determines how many units to inspect from a lot and the criteria for accepting or rejecting based on the number of defects found.

Why It Matters

Proper sampling balances inspection cost against the risk of accepting bad lots (consumer risk) or rejecting good lots (producer risk). ANSI/ASQ Z1.4 provides internationally recognized standard plans.

Professional Interpretation

The OC curve of the sampling plan shows its discriminating power. Steeper OC curves give better protection. The AQL is the quality level that the producer wants accepted with high probability, while the LTPD (Lot Tolerance Percent Defective) is the quality level the consumer wants rejected with high probability.

Recommendations

  • •Select AQL based on product criticality and customer requirements
  • •Use tightened inspection when quality history is poor
  • •Switch to reduced inspection only after sustained quality performance
  • •Document the sampling plan and switching rules
  • •Consider zero-defect plans (c=0) for critical safety applications
  • •Train inspectors on proper sampling and defect classification

Educational Content

Introduction

Acceptance sampling is a statistical quality control technique where a sample is taken from a lot and inspected to make a decision about the entire lot. ANSI/ASQ Z1.4 (identical to ISO 2859-1 and MIL-STD-105) is the most widely used standard for attribute sampling plans.

Concept Explanation

The standard provides indexed sets of sampling plans that match the discriminating power of the plan to the lot size and AQL. The OC curve shows the probability of accepting lots at various quality levels. Key risks include producer's risk (α) of rejecting good lots and consumer's risk (β) of accepting bad lots.

Applications

▸Incoming material inspection in manufacturing
▸Final product quality verification
▸Supplier quality assessment
▸Process validation
▸Regulatory compliance testing

Benefits

  • •Reduced inspection costs vs 100% inspection
  • •Statistically valid acceptance criteria
  • •Standardized international methodology
  • •Quantifiable producer and consumer risks
  • •Flexible switching rules for changing quality

Limitations

  • •Does not directly improve process quality
  • •Requires proper lot integrity
  • •Sampling error can lead to incorrect decisions
  • •Not suitable for very small lots or destructive testing

Best Practices

  • •Use AQL consistent with process capability
  • •Maintain proper lot segregation and identification
  • •Document all sampling and inspection results
  • •Apply switching rules consistently
  • •Train personnel on standard procedures

Common Misconceptions

Myth: AQL means all lots at AQL quality will be accepted.
Truth: AQL means the plan accepts most lots (typically 95%) at that quality level; some good lots will be rejected.
Myth: Sampling plans guarantee lot quality.
Truth: Sampling only estimates lot quality; there is always sampling error and risk of wrong decisions.
Myth: Tightened inspection always catches more defects.
Truth: Tightened inspection reduces consumer risk but increases inspection cost and producer risk.

Practical Tips

  • •Match AQL to the criticality of the characteristic being inspected
  • •Use zero-acceptance (c=0) plans for safety-critical features
  • •Consider sequential or variable sampling plans for lower cost
  • •Track lot disposition history to apply correct switching rules
  • •Coordinate with suppliers on sampling plan expectations
  • •Review OC curves to understand plan performance
  • •Use statistical process control alongside acceptance sampling

Common Mistakes

Using wrong code letter for lot size
Always verify lot size range against ANSI/ASQ Z1.4 Table 1 to ensure correct code letter assignment.
Confusing AQL with lot quality
AQL is the acceptable process average, not the lot quality. A lot can be worse than AQL and still have a chance of acceptance.
Ignoring switching rules
Apply normal-tightened-reduced switching rules per the standard to maintain plan integrity.
Using sampling plans not matching product risk
Select AQL and inspection level based on product criticality, not arbitrarily.

Assumptions

This calculator makes the following assumptions to provide estimates:

Random Sampling: The sample must be randomly drawn from the lot without bias.
Lot Homogeneity: The lot is assumed homogeneous; stratified or mixed lots may invalidate results.
Attribute Classification: Each unit is classified as defective or non-defective (attribute inspection).
Poisson Approximation: OC curve uses Poisson approximation valid when n/N < 0.1 and p < 0.1.

Limitations

Be aware of these limitations when using this calculator:

Single Sampling Plans Only: This calculator covers single sampling plans. Double, multiple, and sequential plans are not included.
General Level II Only: Uses General Inspection Level II. Special levels S-1 through S-4 and Levels I/III are not implemented.
Simplified AQL Table: Uses closest AQL value from standard values. Edge cases may differ from full standard tables.
No Switching Rule Simulation: Normal/tightened/reduced switching rules per the standard are not automatically applied across lots.

Frequently Asked Questions

Answers to common questions about this calculator.

What is ANSI/ASQ Z1.4?
ANSI/ASQ Z1.4 is the US national standard for attribute sampling plans, identical to ISO 2859-1 and formerly MIL-STD-105. It provides indexed sampling plans for inspection by attributes.
How is the code letter determined?
The code letter is determined by the lot size and the inspection level (I, II, or III). General Level II is most common. Larger lots receive higher code letters corresponding to larger sample sizes.
What is AQL?
Acceptable Quality Level (AQL) is the maximum percent defective that, for purposes of sampling inspection, can be considered satisfactory as a process average.
What is Ac (acceptance number)?
Ac is the acceptance number - the maximum number of defectives found in the sample that still allows acceptance of the lot. If defectives found ≤ Ac, accept the lot.
What is Re (rejection number)?
Re is the rejection number - if the number of defectives found in the sample equals or exceeds Re, reject the lot. For single sampling plans, Re = Ac + 1.
What is an OC curve?
The Operating Characteristic (OC) curve shows the probability of accepting a lot as a function of the lot's percent defective. It illustrates the discriminating power of the sampling plan.
What is producer's risk?
Producer's risk (α) is the probability of rejecting a lot at the AQL quality level. Typically α = 0.05 (5%) for standard plans.
What is consumer's risk?
Consumer's risk (β) is the probability of accepting a lot at the LTPD (Lot Tolerance Percent Defective) quality level. Typically β = 0.10 (10%).
When should I use tightened inspection?
Use tightened inspection when recent lots have been rejected or quality has deteriorated. It reduces consumer risk by requiring larger samples or stricter criteria.
When should I use reduced inspection?
Use reduced inspection when quality has been consistently good over a specified number of lots. It reduces inspection cost with smaller samples.
What is the difference between single and double sampling?
Single sampling inspects one sample and makes a decision. Double sampling allows a second sample if the first is inconclusive, potentially reducing average inspection.
Can I use this for variable data?
No, this calculator is for attribute data (defective/non-defective). For variable data, use ANSI/ASQ Z1.9 (MIL-STD-414) for variables sampling plans.
What is MIL-STD-105?
MIL-STD-105 was the original US military standard for attribute sampling. It was cancelled in 1995 and replaced by ANSI/ASQ Z1.4 and ISO 2859-1.
How does lot size affect sample size?
Larger lots receive larger sample sizes through the code letter system, but the relationship is not proportional. The sample size ratio (n/N) decreases as lot size increases.
What are special inspection levels?
Special levels S-1 through S-4 provide very small sample sizes for situations requiring minimal sampling, such as destructive testing or high-cost inspection.
What is the LTPD?
Lot Tolerance Percent Defective (LTPD) is the quality level that the plan rejects with high probability (typically 90%). It represents the consumer's worst-case acceptable quality.
How do I interpret the sampling plan notation?
The plan notation n[Ac,Re] means: inspect n units; accept if ≤ Ac defective; reject if ≥ Re defective. Example: 50[5,6] means inspect 50, accept ≤5, reject ≥6.
What is the AOQL?
Average Outgoing Quality Limit (AOQL) is the worst possible average outgoing quality after inspection with replacement of rejected lots by 100% inspected lots.
Can I use AQL 0%?
AQL 0% is not in the standard tables. For zero-defect requirements, use c=0 sampling plans (Ac=0, Re=1) which require special AQL values.
What is the difference between AQL and AOQ?
AQL is the acceptable process average (input quality). AOQ (Average Outgoing Quality) is the quality after inspection, considering that rejected lots are screened.
How do I choose between attribute and variable sampling?
Attribute sampling (pass/fail) is simpler and widely accepted. Variable sampling requires fewer samples for the same protection but needs measurement data and normality assumptions.
What is the AFI value?
Average Fraction Inspected (AFI) is the average proportion of units inspected, accounting for screening of rejected lots. It increases when quality is poor.
How do switching rules work?
Normal inspection is used at the start. If 2 of 5 consecutive lots are rejected, switch to tightened. If 10 consecutive lots under tightened are accepted, switch back to normal.
What is the sample size code letter?
A letter (A through Q) that represents a range of lot sizes for a given inspection level. The code letter determines the sample size from a corresponding table.
What is a Type I error in sampling?
Type I error (producer's risk) is rejecting a lot that meets the AQL. Type II error (consumer's risk) is accepting a lot that exceeds the LTPD.
How does process average affect sampling?
The process average (historical quality level) should be well below AQL to minimize rejections. Poor process averages trigger tightened inspection and more rejections.
What is the normal-tightened-reduced scheme?
A switching system that adjusts sample size and criteria based on recent quality history: normal for typical quality, tightened for poor quality, reduced for excellent quality.
Can I use MIL-STD-105 tables directly?
Yes, ANSI/ASQ Z1.4 tables are identical to MIL-STD-105E tables. The standard was re-designated when the military cancelled it.
What training is needed for inspection sampling?
Inspectors need training in random sampling techniques, defect classification per specifications, understanding Ac/Re criteria, and proper documentation.
How do I handle nonconforming units found during inspection?
Document each nonconformance, classify by severity, segregate from conforming units, and follow disposition procedures per quality system requirements.
What is the relationship between AQL and process capability?
The process capability (Cpk or Ppk) should be sufficient to produce at quality levels well below AQL. A common rule is process average ≤ AQL/2.

Related Calculators

Explore more calculators related to this topic.

Related Guides

Deepen your understanding with these educational resources.

Glossary

Technical terms used in mortgage calculations explained in plain language.

AQL (Acceptable Quality Level)
The maximum percent defective that can be considered satisfactory as a process average for sampling inspection purposes.
Ac (Acceptance Number)
The maximum number of defectives allowed in the sample for lot acceptance.
Re (Rejection Number)
The minimum number of defectives in the sample that requires lot rejection.
OC Curve (Operating Characteristic Curve)
A curve showing the probability of accepting a lot as a function of the lot's percent defective.
ANSI/ASQ Z1.4
US national standard for attribute sampling plans, identical to ISO 2859-1, providing indexed sampling plans.
MIL-STD-105
Former US military standard for attribute sampling, replaced by ANSI/ASQ Z1.4 and ISO 2859-1.
ISO 2859-1
International standard for attribute sampling plans, equivalent to ANSI/ASQ Z1.4.
Producer's Risk (α)
The probability of rejecting a lot when the lot quality equals the AQL (typically 5%).
Consumer's Risk (β)
The probability of accepting a lot when the lot quality equals the LTPD (typically 10%).
LTPD
Lot Tolerance Percent Defective - the quality level rejected with high probability (typically 90%).
AOQL
Average Outgoing Quality Limit - the worst possible average quality after inspection with screening of rejected lots.
Switching Rules
Procedures for moving between normal, tightened, and reduced inspection based on recent quality history.
Code Letter
A letter (A-Q) assigned based on lot size and inspection level that determines sample size.
Single Sampling Plan
A plan where one sample is taken from the lot and the acceptance decision is based solely on that sample.
Double Sampling Plan
A plan where a second sample may be taken if the results from the first sample are inconclusive.

Authoritative References

Trusted sources and standards referenced by this calculator.

Applicable Standards

ANSI/ASQ Z1.4ISO 2859-1MIL-STD-105EANSI/ASQ Z1.9ISO 2859-2ASTM E2810

Was This Calculator Helpful?

Page Information

Last Updated:

2026-07-30

Version:

2.0.0

License:

Free to use for educational and professional purposes.