Home » Calculators » Fibre & Raw Material » Fiber Testing, Bale Management & Laboratory Sampling » Statistical Sampling Plan, OC Curve & Average Outgoing Quality
Jump to a calculator 618 tools

Inspection by Attributes

Statistical Sampling Plan, OC Curve & Average Outgoing Quality

Put this calculator on your own site

Paste this where you want the calculator to appear. It works on any site — WordPress, Squarespace, Webflow, Ghost or plain HTML — and needs no JavaScript of yours. It carries a link back here, which is the only thing we ask for it.

See what it looks like

A sampling plan does not measure quality. It sorts lots, and the OC curve says how well.

The Lot Size and inspection severity
units

Level II unless the contract says otherwise

The Plan Acceptance criterion and the process it will meet
%
defects

Take from ISO 2859-1 Table 2-A for contractual work

%

Sample Size

— units

ISO 2859-1 code letter for this lot size and level

Operating Characteristic & Inspection Load

Acceptance Probability at the AQL
— %
Producer's Risk
— %
Quality Rejected 9 Times in 10 (LTPD)
— %
Indifference Quality (50% Accept)
— %
Average Outgoing Quality
— %
Average Outgoing Quality Limit
— %
Average Total Inspection
— units
Rejection Number Re
— defects

The sample size comes from the ISO 2859-1 general inspection level code letters, with Level I and Level III taken as one code letter either side of Level II - which is how the general levels are laid out in Table 1. Special levels S-1 to S-4, used for destructive or expensive tests, are not covered and must be taken from the standard. The acceptance number is an input, not a lookup: Table 2-A contains arrow cells that redirect to a different sample size, and reproducing those without the table in front of you is how plans get misquoted. The operating characteristic is exact binomial for a single sampling plan under normal inspection; double, multiple and sequential plans have different curves. Where the sample would exceed the lot it is capped at the lot size, which is 100% inspection. Switching rules between normal, tightened and reduced inspection are a separate mechanism and change the effective protection substantially.

Using this calculator

About the Statistical Sampling Plan, OC Curve & Average Outgoing Quality

The formula

This is the expression the tool evaluates. Every term is named underneath, with the unit it must be supplied in.

The operating characteristic
Pa = sum over k = 0 to Ac of C(n,k) x p^k x (1-p)^(n-k)

The probability a lot of quality p is accepted. Everything else on this page is one point read off this curve: the AQL point, the 10% point, the 50% point. The binomial is used rather than the Poisson approximation because sample sizes here can be a large fraction of small lots.

Sample size is looked up, not derived
n from lot size and level, per ISO 2859-1 Table 1 code letters

Sample size grows roughly as the cube root of lot size, not in proportion to it. That is why a 5,000 unit lot and a 50,000 unit lot are inspected at 200 and 500 pieces - a fact that consistently surprises people who expect a fixed percentage.

Quality that survives inspection
AOQ = Pa x p x ( N - n ) / N

Bad lots are mostly caught and screened; good lots pass with their defects intact. The product of the two has a maximum - the AOQL - which is the worst average quality the scheme can deliver no matter how bad the incoming process becomes.

What inspection actually costs
ATI = n + ( 1 - Pa ) x ( N - n )

Assumes a rejected lot is screened 100%. A plan close to its acceptance boundary is expensive not because the sample is large but because rejections trigger full inspection of the remainder.

Symbols used above
SymbolStands forUnit
nSample size drawn from the lotunits
AcAcceptance number - defects at or below which the lot is accepted—
AQLAcceptable quality limit, the process level the plan is built to pass%
LTPDLot tolerance percent defective, accepted only 10% of the time%
AOQLThe maximum of the average outgoing quality curve%

How the result is derived

Step by step, from the values you type to the figure on screen.

  1. The 5 inputs are read from the form on every keystroke: Lot Size, General Inspection Level, Acceptable Quality Limit, Acceptance Number Ac and Actual Process Defect Rate.
  2. Each value is checked against the accepted range in the input table below. A value outside its range stops the calculation rather than producing a misleading figure — the results blank out and a message appears.
  3. The validated values are substituted into the expression above, which resolves Sample Size together with every supporting figure in one pass — no value is carried over from a previous entry.
  4. The supporting outputs — Acceptance Probability at the AQL, Producer's Risk, Quality Rejected 9 Times in 10 (LTPD), Indifference Quality (50% Accept), Average Outgoing Quality, Average Outgoing Quality Limit, Average Total Inspection and Rejection Number Re — come from the same pass, so they always describe the same case as the headline figure.
  5. Results are rounded for display only. The full-precision value is used throughout the chain, so reading a rounded intermediate figure back into the tool by hand can shift the last digit.

What each input means

Where to read each value on the floor, the unit it must be in, and the range the tool accepts.

InputUnitAccepted rangeDefaultWhat it means
Lot Sizeunits2 to 5000000 units5000
General Inspection Level—Level I - reduced discrimination · Level II - normal, the default · Level III - tightened discrimination0Level II unless the contract says otherwise
Acceptable Quality Limit%0.01 to 15 %1.5
Acceptance Number Acdefects0 to 40 defects5Take from ISO 2859-1 Table 2-A for contractual work
Actual Process Defect Rate%0.01 to 20 %1

What the tool returns

The headline figure and every supporting value it is built from.

OutputUnitWhat it tells you
Sample Size (headline result)unitsISO 2859-1 code letter for this lot size and level
Acceptance Probability at the AQL%
Producer's Risk%
Quality Rejected 9 Times in 10 (LTPD)%
Indifference Quality (50% Accept)%
Average Outgoing Quality%
Average Outgoing Quality Limit%
Average Total Inspectionunits
Rejection Number Redefects

Worked example

Given

0
Lot of 5,000 garments, General Inspection Level II
1
AQL 1.5%, acceptance number 5
2
Process actually running at 1.0% defective

Substituting

lot 3,201 - 10,000 at Level II gives code letter L, n = 200Pa( p = 0.015 ) with n = 200, Ac = 5 gives 0.917608solve Pa( p ) = 0.10 gives p = 4.5879%AOQ = Pa( 0.01 ) x 1.0 x 4,800 / 5,000 = 0.9446%ATI = 200 + ( 1 - 0.9834 ) x 4,800 = 276.91

Answer

0
Sample size 200, reject on 6 defects
1
91.7608% acceptance at the AQL, so 8.2392% producer's risk
2
LTPD 4.5879%, indifference quality 2.8303%
3
Outgoing quality 0.9446%, with an AOQL of 1.5233%
4
276.91 units inspected on average per lot

The gap between 1.5% and 4.5879% is the honest reading of this plan: a lot at the AQL passes nine times in ten, and a lot three times worse still passes one time in ten. A sampling plan is a sorting device with a wide grey band, not a guarantee. Anyone promising that AQL 1.5 means no more than 1.5% defective in delivered goods has read the label and not the curve.

How to use it

  1. Work through the input groups in order — The Lot and The Plan. The defaults are a realistic case, so you can change one value at a time and watch what moves.
  2. There is no calculate button. Every figure recalculates as you type or drag, which is what makes this usable for a what-if sweep rather than a single answer.
  3. Read Sample Size in the dark results panel — that is the headline figure, expressed in units.
  4. Check the supporting rows underneath (Acceptance Probability at the AQL, Producer's Risk, Quality Rejected 9 Times in 10 (LTPD), Indifference Quality (50% Accept), Average Outgoing Quality, Average Outgoing Quality Limit, Average Total Inspection and Rejection Number Re) before acting on the headline — they are where an implausible input usually shows itself first.
  5. Reset to defaults returns every field to the reference case, which is the quickest way to check whether a surprising result came from the tool or from an input you had changed earlier.

Where this is used

  • Process planning — establishing Sample Size before a trial is booked, so machine time and material in Fiber Testing, Bale Management & Laboratory Sampling are committed against a calculated figure rather than an estimate.
  • Costing and quotation — Sample Size is an input to the cost sheet, and quoting from a worked number rather than a remembered one is what keeps a margin intact.
  • Troubleshooting — when the floor result drifts from plan, entering the measured values (starting with Lot Size) shows how much of the gap in Sample Size each variable explains.
  • Teaching and study — the accepted ranges bracket normal Fiber Testing, Bale Management & Laboratory Sampling practice, so moving one variable at a time shows the shape of the relationship rather than a single answer.

Reading the result

Typical bands and what each one is telling you.

ValueWhat it indicates
Producer's risk 5 - 10%Normal. ISO 2859-1 plans are indexed at roughly 95% acceptance at the AQL.
LTPD near 3x the AQLTypical discrimination for a mid-size lot at Level II.
AOQL close to the AQLThe screening of rejected lots is doing real work.
ATI approaching lot sizeThe process is far off the plan; sampling has become 100% inspection with extra steps.

Assumptions and limits

  • The sample size comes from the ISO 2859-1 general inspection level code letters, with Level I and Level III taken as one code letter either side of Level II - which is how the general levels are laid out in Table 1. Special levels S-1 to S-4, used for destructive or expensive tests, are not covered and must be taken from the standard. The acceptance number is an input, not a lookup: Table 2-A contains arrow cells that redirect to a different sample size, and reproducing those without the table in front of you is how plans get misquoted. The operating characteristic is exact binomial for a single sampling plan under normal inspection; double, multiple and sequential plans have different curves. Where the sample would exceed the lot it is capped at the lot size, which is 100% inspection. Switching rules between normal, tightened and reduced inspection are a separate mechanism and change the effective protection substantially.
  • Every input is bounded to the range normal practice occupies (Lot Size 2 to 5000000 units, General Inspection Level Level I - reduced discrimination · Level II - normal, the default · Level III - tightened discrimination and Acceptable Quality Limit 0.01 to 15 %, and so on for the rest). Those bounds are guard rails against typing errors, not a claim that the formula fails one unit outside them.
  • The calculation is deterministic: the same inputs always give the same result. It carries no allowance for machine condition, operator skill, ambient conditions or lot-to-lot material variation unless an input above explicitly represents one.
  • Nothing is sent anywhere. The maths runs in your browser, so the numbers you type never leave the page.

Standards and further reading

  • ISO 2859-1 - sampling procedures for inspection by attributes, indexed by AQL.
  • ANSI/ASQ Z1.4 - the North American equivalent scheme.
  • ISO 2859-2 - sampling plans indexed by limiting quality (LQ) for isolated lots.
  • ISO 3951-1 - sampling procedures for inspection by variables, where a measured characteristic is available.

Questions people ask

Why does the acceptance number have to be entered rather than looked up?

Because reproducing ISO 2859-1 Table 2-A honestly means reproducing its arrows too - cells where the tabled plan does not exist and the scheme sends you to a different sample size entirely - and a calculator that silently guessed those would be worse than one that asks. The sample size here comes from Table 1, which is unambiguous, and the acceptance number is yours to take from the standard for contractual work. What this tool then gives you is the part the tables do not print: the actual operating characteristic of the plan you are about to sign up to. For reference, plans indexed at an AQL sit near 95% acceptance at that AQL, so if the producer's risk shown here is far from 5 to 10% the acceptance number is probably not the tabled one.

Does AQL 1.5 mean the buyer accepts 1.5% defective goods?

No, and the confusion causes real commercial disputes. The AQL is the process quality at which the plan is designed to pass lots almost always - it is a property of the sampling scheme, not a contractual defect allowance. Two things follow. A supplier running exactly at the AQL still has roughly one lot in twelve rejected, which feels unfair and is not. And a lot at three times the AQL still slips through about one time in ten, which is why buyers who rely on AQL inspection alone are periodically surprised. The correct statement is that the plan discriminates between a process at the AQL and a process at the LTPD; individual lots are sorted, not certified.

Why is the sample size the same for a 5,000 and a 9,000 unit lot?

Because both fall in the 3,201 to 10,000 band, which maps to one code letter and one sample size. The bands exist because the discriminating power of a sample depends almost entirely on the sample size and hardly at all on the lot size it came from - the finite population correction only matters when the sample is a large fraction of the lot. Doubling a lot from 5,000 to 10,000 barely changes what 200 pieces can tell you about it, so the standard does not change the sample. The consequence people find counter-intuitive is that inspecting a large lot is proportionally much cheaper, which is a genuine incentive to present goods in large lots and a genuine reason buyers cap lot sizes contractually.

What does the average outgoing quality limit protect against?

Against the process getting much worse without the buyer noticing lot by lot. AOQ is the quality that reaches the customer after inspection has done its work, and it behaves unexpectedly: at very low incoming defect rates almost everything is accepted but there is little to accept wrongly, and at very high rates almost everything is rejected and screened clean. The worst case sits in between, and the AOQL is that peak. It matters because it is a guarantee that holds regardless of the supplier: whatever the incoming quality, long-run average outgoing quality cannot exceed the AOQL, provided rejected lots really are screened 100% and the defective units really are replaced rather than reshuffled into the next presentation.

Scroll to Top