Skip to main content
Modules / Tools / Lot sampling plan calculator

Lot sampling plan calculator

Design an attribute sampling plan from AQL, LTPD and the producer and consumer risks, see its operating characteristic curve, and compare zero-acceptance plans.

ReliabilityFree to useHow it worksSourcesWhere it helps

Fills the inputs below with typical figures. Replace any of them with your own.

What to work out

The table also shows the Poisson and binomial figures for comparison.

Changing the unit converts the quality levels already entered.

Used for the hypergeometric model, AOQ and inspection load.

Quality levels and risks

Lots this good should be accepted.

Lots this bad should be rejected. Also called the rejectable quality level.

Chance of rejecting a lot at the AQL.

Chance of accepting a lot at the LTPD.

Your usual lot quality. Used for average outgoing quality and inspection load.

Smallest plan that meets both risks
n = 65, c = 2
Inspect 65 parts; accept the lot with 2 or fewer defectives. That is 0.7% of the lot.
Chance of accepting a lot at the AQL
97.24%
Producer's risk 2.76%
Chance of accepting a lot at the LTPD
9.91%
Consumer's risk 9.91%
Indifference quality
4.093%
Lots at this quality are accepted half the time
Average outgoing quality limit
2.092%
Worst case, at incoming 3.463%
Average outgoing quality at expected incoming
0.9661%
Lot accepted 97.2% of the time
Average total inspection per lot
339 parts
At the expected incoming quality, counting full inspection of rejected lots

Sign in to save your inputs and come back to them later.

Operating characteristic curve: chance of accepting a lot
Line chart of Chance of acceptance (%) against Lot quality (% defective), 2 lines: Binomial, Poisson. The same numbers are in the table under the chart.0204060801000510Lot quality (% defective)Chance of acceptance (%)
  • Binomial (solid line, circles)
  • Poisson (dashed line, squares)
Show the data as a table
Operating characteristic curve: chance of accepting a lot
Lot quality (% defective)BinomialPoisson
0100100
0.32399.999.9
0.64699.199.1
0.9797.597.4
1.2994.894.7
1.6291.291
1.9486.886.6
2.2681.881.6
2.5976.376.2
2.9170.770.6
3.2364.964.9
3.5559.259.3
3.8853.653.9
4.248.248.6
4.5243.243.7
4.8538.439
5.173434.7
5.493030.8
5.8226.327.2
6.142323.9
6.462021
6.7917.418.4
7.111516
7.431314
7.7611.112.1
8.089.5410.5
8.48.159.08
8.736.947.83
9.055.96.75
9.3755.8
9.74.224.98
103.564.27
10.333.65
10.72.523.12
112.112.66
11.31.762.27
11.61.471.93
121.221.64
12.31.021.39
12.60.8441.18
12.90.6991
Average outgoing quality with rectifying inspection
Line chart of Outgoing quality (% defective) against Incoming lot quality (% defective), one line. The same numbers are in the table under the chart.00.511.520510Incoming lot quality (% defective)Outgoing quality (% defective)
Show the data as a table
Average outgoing quality with rectifying inspection
Incoming lot quality (% defective)Outgoing quality (% defective)
00
0.3230.321
0.6460.637
0.970.939
1.291.22
1.621.46
1.941.67
2.261.84
2.591.96
2.912.04
3.232.08
3.552.09
3.882.06
4.22.01
4.521.94
4.851.85
5.171.75
5.491.64
5.821.52
6.141.4
6.461.29
6.791.17
7.111.06
7.430.957
7.760.858
8.080.766
8.40.68
8.730.602
9.050.53
9.370.465
9.70.407
100.355
10.30.308
10.70.267
110.23
11.30.198
11.60.17
120.146
12.30.124
12.60.106
12.90.0898
Acceptance probability, outgoing quality and inspection load by lot quality (% defective)
Lot quality (% defective)MarkerChance of acceptance, chosen modelBinomialPoissonOutgoing quality (% defective)Average total inspection (parts)
0100.00%100.00%100.00%065
0.323299.87%99.87%99.87%0.320778
0.646399.12%99.12%99.10%0.6365152
0.969597.45%97.45%97.38%0.9386318
1AQL; Expected incoming quality97.24%97.24%97.17%0.9661339
1.29394.78%94.78%94.66%1.217584
1.61691.17%91.17%91.02%1.464942
1.93986.78%86.78%86.61%1.6721,379
2.26281.78%81.78%81.62%1.8381,876
2.58576.35%76.35%76.24%1.9612,415
2.90970.67%70.67%70.63%2.0422,979
3.23264.90%64.90%64.95%2.0843,552
3.55559.17%59.17%59.32%2.094,121
3.87853.59%53.59%53.85%2.0654,676
4.093Indifference quality (accepted half the time)50.00%50.00%50.34%2.0335,032
4.20148.23%48.23%48.61%2.0135,208
4.52443.16%43.16%43.66%1.945,712
4.84838.42%38.42%39.02%1.856,183
5.17134.02%34.02%34.73%1.7486,620
5.49430.00%30.00%30.79%1.6377,020
5.81726.33%26.33%27.20%1.5227,384
6.1423.02%23.02%23.94%1.4047,713
6.46320.04%20.04%21.01%1.2878,009
6.78717.39%17.39%18.38%1.1738,272
7.1115.04%15.04%16.04%1.0628,506
7.43312.96%12.96%13.96%0.95718,712
7.75611.14%11.14%12.12%0.8588,894
8LTPD9.91%9.91%10.88%0.78769,015
8.0799.54%9.54%10.50%0.76569,052
8.4028.15%8.15%9.08%0.68019,191
8.7266.94%6.94%7.83%0.60169,310
9.0495.90%5.90%6.75%0.53019,414
9.3725.00%5.00%5.80%0.46539,504
9.6954.22%4.22%4.98%0.40699,580
10.023.56%3.56%4.27%0.35469,646
10.343.00%3.00%3.65%0.3089,702
10.662.52%2.52%3.12%0.26679,750
10.992.11%2.11%2.66%0.23029,790
11.311.76%1.76%2.27%0.19819,825
11.631.47%1.47%1.93%0.179,854
11.961.22%1.22%1.64%0.14559,878
12.281.02%1.02%1.39%0.12429,899
12.60.84%0.84%1.18%0.10579,916
12.930.70%0.70%1.00%0.089779,931
What each extra allowed defect costs: the smallest sample that protects the consumer at the LTPD, by acceptance number
Acceptance number cSmallest n for the consumer's riskChance of accepting at the AQLProducer's riskMeets your producer's risk
02875.47%24.53%no
14891.66%8.34%no
26597.24%2.76%yes
38299.06%0.94%yes
49899.69%0.31%yes
511499.89%0.11%yes
613099.96%0.04%yes
714599.99%0.01%yes
8160100.00%0.00%yes
9175100.00%0.00%yes
10190100.00%0.00%yes

How it works

A sampling plan decides whether to accept a lot from a sample. This tool designs the smallest single sampling plan that meets a producer's risk at an acceptable quality level and a consumer's risk at a lot tolerance percent defective, sizes zero-acceptance plans, and shows the operating characteristic, average outgoing quality and inspection load of any plan you enter.

  1. Define the plan. A single sampling plan is a pair (n, c): inspect n parts from the lot and accept the lot if no more than c are defective. Quality levels can be entered as a fraction, a percentage or parts per million.accept the lot if the number of defectives in the sample <= c
  2. Chance of accepting a lot. The operating characteristic (OC) curve is the chance of acceptance, Pa, at each lot fraction defective p. The binomial model treats each sampled part as independently bad with chance p. The hypergeometric model draws the sample without replacement from a lot of N with D = round(p x N) bad parts and is exact for small lots. The Poisson model is the limit for small p and large n.binomial: Pa = sum for k = 0 to c of C(n, k) p^k (1 − p)^(n − k); Poisson: Pa = sum for k = 0 to c of e^(−n p) (n p)^k / k!; hypergeometric: Pa = sum for k = 0 to c of C(D, k) C(N − D, n − k) / C(N, n)
  3. Design from two points. Choose the AQL (a quality the producer wants accepted) with producer's risk alpha, and the LTPD (a quality the consumer wants rejected) with consumer's risk beta. The plan must pass both conditions. For each acceptance number c the tool finds the smallest n that satisfies the consumer's condition, then checks the producer's. The first c that passes gives the smallest plan.Pa(AQL) >= 1 − alpha; Pa(LTPD) <= beta
  4. Zero-acceptance plans. With c = 0 the lot is accepted only if the sample is clean. The sample size depends on the LTPD and the consumer's risk alone, and a clean sample says that the lot is below the LTPD with confidence 1 − beta. The producer's risk at the AQL is then whatever the plan gives, and is shown.binomial: n = ceiling(ln(beta) / ln(1 − LTPD)); Poisson: n = ceiling(−ln(beta) / LTPD)
  5. Outgoing quality and inspection load. If rejected lots are inspected in full and defectives are replaced, the average outgoing quality (AOQ) is the quality that reaches the customer. Its maximum over all incoming quality is the average outgoing quality limit (AOQL). The average total inspection (ATI) is the parts inspected per lot, counting the full inspection of rejected lots.AOQ = Pa x p x (N − n) / N; AOQL = maximum of AOQ over p; ATI = n + (1 − Pa) x (N − n)
  6. Indifference quality. The indifference quality is the fraction defective at which the plan accepts half the lots. It marks the middle of the OC curve and is found by solving for the p where Pa = 0.5.Pa(p) = 0.5

Assumptions

  • The lot is homogeneous and the sample is random. A sample taken from one end of a tray or one wafer lot corner is not a random sample.
  • A part is either defective or not (attribute inspection); measurements against limits are counted as pass or fail.
  • The AQL here is the quality at which the producer wants a 1 − alpha chance of acceptance. It is a point on the OC curve, not an index into a standard's tables.
  • AOQ and ATI assume rectifying inspection: rejected lots are fully inspected and defectives are replaced with good parts.
  • The hypergeometric model rounds the defectives in the lot to a whole number, so its OC curve moves in small steps for a small lot.

Limits and warnings

  • Standards such as ANSI/ASQ Z1.4 (attribute sampling indexed by AQL, with normal, tightened and reduced inspection and switching rules between them) and MIL-STD-1916 (a zero-defect-oriented scheme with verification levels) are schemes with their own tables and rules. This tool computes plans from first principles; it does not reproduce either scheme. Follow the standard named in your contract.
  • A passed sampling plan does not prove that every part is good. A plan accepts bad lots with the chance the OC curve gives.
  • Search is capped at an acceptance number of 300 and, outside the hypergeometric model, a sample of 1,000,000.
  • Variables sampling (measuring a characteristic and using its mean and spread) needs fewer samples for the same risks and is not covered here.
  • The plans assume the producer's process is stable. Sampling cannot repair a process that drifts; use control charts for that.

Sources

The methods and default figures rest on these public sources. The wording here is our own; read the source for its full text.

  • 6.2. Test Product for Acceptability: Lot Acceptance Sampling (opens in a new tab), NIST/SEMATECH e-Handbook of Statistical Methods, Online edition, section 6.2. The (n, c) plan, OC curve, AQL, LTPD, AOQ, AOQL and ATI. Section 6.2.3.2 works through a plan with n = 52 and c = 3.
  • Zero Acceptance Number Sampling Plans, sixth edition (opens in a new tab), N. L. Squeglia, ASQ Quality Press, 2023. The case for c = 0 plans. Named for reference; its tables are not reproduced.
  • ANSI/ASQ Z1.4, Sampling Procedures and Tables for Inspection by Attributes, American Society for Quality and ANSI, Current edition. Cited by name only. The tool does not use its tables.
  • MIL-STD-1916, DoD Preferred Methods for Acceptance of Product, US Department of Defense, Current edition. Cited by name only. The tool does not use its tables.

Where it helps

The lifecycle stages this tool serves: 3 stages in 2 lifecycles.

Method notev1Formula, ranges, sources and limits

Designs the smallest single sampling plan from an AQL, an LTPD and the producer's and consumer's risks, and gives the acceptance probabilities, average outgoing quality and inspection load of any plan.

Formula

accept the lot if the number of defectives in the sample <= c; binomial: Pa = sum for k = 0 to c of C(n, k) p^k (1 − p)^(n − k); Poisson: Pa = sum for k = 0 to c of e^(−n p) (n p)^k / k!; hypergeometric: Pa = sum for k = 0 to c of C(D, k) C(N − D, n − k) / C(N, n); Pa(AQL) >= 1 − alpha; Pa(LTPD) <= beta; binomial: n = ceiling(ln(beta) / ln(1 − LTPD)); Poisson: n = ceiling(−ln(beta) / LTPD); AOQ = Pa x p x (N − n) / N; AOQL = maximum of AOQ over p; ATI = n + (1 − Pa) x (N − n); Pa(p) = 0.5

Inputs
InputUnitRange it holds forComes from
What to dochoicedesign, zero, evaluateYour figure
Probability modelchoicebinomial, hypergeometric, poissonYour figure
Unit for quality levelschoicefraction, percent, ppmYour figure
Lot sizepartsfrom 1Your figure
Sample size n, for a plan you enterpartsfrom 1Your figure
Acceptance number c, for a plan you enterdefectives0 to 1000Your figure
Acceptable quality levelper the unit chosenfrom 0Your figure
Lot tolerance percent defectiveper the unit chosenfrom 0Your figure
Producer's risk%0.01 to 50Your figure
Consumer's risk%0.01 to 50Your figure
Expected incoming qualityper the unit chosenfrom 0Your figure

Outputs: Sample size n (parts); Acceptance number c (defectives); Chance of accepting a lot at the AQL (fraction); Chance of accepting a lot at the LTPD (fraction); Average outgoing quality limit (fraction); Average total inspection at the expected incoming quality (parts).

Assumptions

  • The lot is homogeneous and the sample is random. A sample taken from one end of a tray or one wafer lot corner is not a random sample.
  • A part is either defective or not (attribute inspection); measurements against limits are counted as pass or fail.
  • The AQL here is the quality at which the producer wants a 1 − alpha chance of acceptance. It is a point on the OC curve, not an index into a standard's tables.
  • AOQ and ATI assume rectifying inspection: rejected lots are fully inspected and defectives are replaced with good parts.
  • The hypergeometric model rounds the defectives in the lot to a whole number, so its OC curve moves in small steps for a small lot.

Uncertainty: The probabilities are exact for the model chosen. The result is as good as the assumption of a random sample from a homogeneous lot; a real lot with clustered defects is accepted more often than the OC curve says.

Known limits

  • Standards such as ANSI/ASQ Z1.4 (attribute sampling indexed by AQL, with normal, tightened and reduced inspection and switching rules between them) and MIL-STD-1916 (a zero-defect-oriented scheme with verification levels) are schemes with their own tables and rules. This tool computes plans from first principles; it does not reproduce either scheme. Follow the standard named in your contract.
  • A passed sampling plan does not prove that every part is good. A plan accepts bad lots with the chance the OC curve gives.
  • Search is capped at an acceptance number of 300 and, outside the hypergeometric model, a sample of 1,000,000.
  • Variables sampling (measuring a characteristic and using its mean and spread) needs fewer samples for the same risks and is not covered here.
  • The plans assume the producer's process is stable. Sampling cannot repair a process that drifts; use control charts for that.

Where the method comes from

Follows NIST/SEMATECH e-Handbook of Statistical Methods, section 6.2, Lot Acceptance Sampling (opens in a new tab). The platform's version departs from it as follows.

  • Plans are designed by search over the acceptance number, and the hypergeometric and Poisson models are offered beside the binomial Why: The handbook solves the two OC conditions numerically with the binomial model; small lots need the exact hypergeometric model, and many quality teams still quote Poisson.
  • Zero-acceptance sizing and a table of plans by acceptance number are added Why: High-reliability and outgoing-audit work is done with c = 0 plans, and the table shows what each extra allowed defect costs in sample size.

Reference example, checked by test: NIST/SEMATECH e-Handbook of Statistical Methods, section 6.2.3.2: the plan n = 52, c = 3 for a lot of 10,000, hand-checked in the tool's unit test. Sample size n 52; Acceptance number c 3; Chance of accepting a lot at the AQL 0.998153; Chance of accepting a lot at the LTPD 0.223187; Average outgoing quality limit 0.037189; Average total inspection at the expected incoming quality 752.96.

Versions

  • v1 (2026-10-25): First version, built from the tool idea.

All models in the register

Terms on this page

Lot
The unit of material movement in a fab: a group of wafers, conventionally up to 25, that travel together through the process flow and share a lot number, run card and dispatch priority.
PPM
A general rate unit meaning one in a million, used for defect levels, contamination concentrations and impurity limits.
Wafer lot
A group of wafers, classically twenty-five, that travels through the fab together and shares a common process history.
ANSI
The private non-profit that accredits US standards developers and approves their work as American National Standards, and that represents the United States at ISO and IEC.
MIL
The earliest simulation stage, where the control algorithm exists only as an executable model, typically in Simulink or a similar environment, and is validated against a plant model before any code...

The full glossary

Need help acting on this?

Tell us what you're after and leave your email: we'll connect you with the right person on the Hub.