Skip to content

Free tool

Acceptance sampling calculator

Acceptance sampling decides whether to accept a lot after inspecting a sample. A plan is two numbers: inspect n items and accept the lot if no more than c are defective. Enter a plan to see its OC curve and what it protects, enter the risks you can live with to get n and c, or size a test where no failures are allowed.

Chance of acceptance, large lotequalsPa = sum for x = 0 to c of n! divided by x! (n − x)! px (1 − p)n − x

Lot of N with D defectivesequalsPa = sum for x = 0 to c of C(D, x) × C(N − D, n − x) divided by C(N, n)

Risksequalsproducer's risk = 1 − Pa at the AQL; consumer's risk = Pa at the LTPD

Outgoing quality and inspectionequalsAOQ = Pa × p × N − n divided by N; ATI = n + (1 − Pa)(N − n)

Zero defects allowedequalsn = ln(1 − C) divided by ln(1 − X), rounded up

p is the share of defective items in the lot. Definitions and the AOQ and ATI formulas: NIST/SEMATECH e-Handbook, 6.2.2. Choosing a plan from two points on the OC curve: 6.2.3.2. Exact figures for a finite lot and the binomial as its approximation: Ng, Journal of Statistics Education 11(3), 2003. The zero-defect size is the binomial chance of no defects, (1 − X)n, set at or below 1 − C.
What do you want to do?
The plan

How many items you inspect.

The most defectives you accept.

Leave blank for a large lot. Enter it when the sample is a tenth of the lot or more.

Quality levels to read

Lots this good should pass.

Lots this bad should fail.

Pre-filled with a worked example (illustrative). The defaults are examples to try, not recommendations: set the risks and quality levels your contract or your customer needs.

A lot at the AQL is accepted

91.1%

8.9% of lots with 1% defective are still rejected.

Good lot rejected

8.9%

A lot exactly at the AQL of 1% (producer's risk)

Bad lot accepted

3.4%

A lot exactly at the limiting quality of 10% (consumer's risk)

Accepted 95% of the time

0.72%

defective or better. Lots this good almost always pass

Accepted only 10% of the time

7.6%

defective or worse. Lots this bad nearly always fail

  • Check 50 items. Accept the lot if 1 or none is defective; reject it if more are found.
  • A lot at the AQL (1% defective) is rejected 8.9% of the time. A lot at the limiting quality (10%) is still accepted 3.4% of the time.
0%25%50%75%100%0%3%6%9%12%15%Defective items in the lotChance the lot is accepted
  • AQL 1%: 91.1% accepted
  • LTPD 10%: 3.4% accepted
Each point is the chance the plan accepts a lot with that share of defective items. The higher the curve sits at the AQL and the lower at the limiting quality, the better the plan tells good lots from bad.
  • No lot size entered, so this assumes the lot is large (about ten times the sample or more). For a small lot, enter its size.

Email me my results

Optional. Get these inputs and results in your inbox, with a link back to this calculator.

We may follow up about LeanSuite. See our Privacy Notice.

The working

Plan: check 50, accept 1 or fewer defective, large lot.

The same plan at other defect rates

Chance of acceptance, outgoing quality and inspection for lots at different defect rates. Rejected is 100% minus accepted.
Lot defect rateAcceptedOutgoing quality (AOQ)
0.5%97.4%0.49%
1%AQL91.1%0.91%
2%73.6%1.47%
3%55.5%1.67%
5%27.9%1.4%
8%8.3%0.66%
10%LTPD3.4%0.34%
15%0.3%0.04%
20%<0.1%0%

Outgoing quality (AOQ) is the average defect rate in what ships if rejected lots are fully inspected and defects replaced. Without that step the plan only sorts lots; it does not clean them.

How the chance of acceptance is worked out

Each item in a very large lot is defective with the same chance, so the number of defectives in a sample of 50 follows the binomial distribution. The lot is accepted when 1 or fewer are found, so add the chances of finding 0 up to 1.

At the AQL of 1%: 0.605 (0 found) + 0.3056 (1 found) = 0.9106, so 8.9% of lots at the AQL are rejected.

Outgoing quality at the AQL
0.91% defective after rejected lots are fully inspected and their defects replaced.
Worst outgoing quality (AOQL)
1.67% defective, reached when lots arrive at about 3.2% defective. It holds only if every rejected lot is fully inspected and its defects replaced.

Next step

Want to track this every week?

Bring this result to a 45-minute demo and we will show where it fits in LeanSuite's Supplier Quality Management.

Before you enter numbers

Choosing the inputs

Sample size and accept number. Check n items. If the number of defective items is c or fewer, accept the lot; otherwise reject it. A defective item fails the check. This calculator counts defective items, not the number of defects on an item.

Lot size. Leave it blank for a large lot. Enter it when the sample is a tenth of the lot or more. The calculator then uses the exact lot figures, and gives the average total inspection per lot, which needs the lot size.

AQL and limiting quality. The AQL is the defect rate you are happy to receive. The limiting quality (LTPD, the lot tolerance percent defective) is a defect rate that would be unacceptable to the customer. The distance between them decides how big the sample has to be: a narrow gap needs a big sample.

Risks. The producer's risk is the chance a lot at the AQL is rejected. The consumer's risk is the chance a lot at the limiting quality is accepted. Many guides use 5% and 10%, so the calculator starts there. Set yours from what a rejected good lot and an accepted bad lot cost.

If your contract names a plan. Type its n and c into Check a plan and set the limiting quality to the rate you would refuse. Read the Bad lot accepted figure. That is the protection you actually have, whatever the AQL on the order says.

Worked example

Illustrative numbers, not a benchmark

A buyer is told to check 50 items from each large lot and accept the lot if 1 or fewer is defective. The AQL is 1% and the buyer would refuse lots at 10%. No lot size is entered, so the binomial is used.

  1. 1At 1% defective, the chance of finding none is 0.6050 and of finding exactly one is 0.3056. Added: 0.9106, so 91.1% of lots at the AQL are accepted and 8.9% are rejected (producer's risk).
  2. 2At 5% defective 27.9% of lots are accepted; at 10% defective 3.4% are (consumer's risk).
  3. 3The plan accepts lots at 0.72% defective or better 95% of the time, and lots at 7.6% or worse only 10% of the time. In between, the chance of acceptance falls from 95% to 10% as the lot gets worse.
  4. 4If every rejected lot is fully inspected and its defects replaced, the worst outgoing quality is 1.67% defective (the AOQL), reached when lots arrive at about 3.2% defective.
  5. 5Find a plan instead: an AQL of 1% at 5% risk and a limiting quality of 8% at 10% risk gives check 65, accept 2 or fewer. It accepts 97.2% of lots at 1% and 9.9% of lots at 8%.
  6. 6Zero defects: to be 95% confident the rate is under 1%, test 299 items with none defective. A lot that is really at 0.25% is still rejected 52.7% of the time.
Check 50, accept 1: good lots at 1% fail 8.9% of the time, and bad lots at 10% pass 3.4% of the time. The calculator above is filled in with this plan. The numbers are illustrative.

What a sampling plan does and does not do

It sorts lots; it does not make them better. A rejected lot is returned, sorted or scrapped. The cause is still upstream, so send the defects to an NCR and a supplier corrective action, and watch the supplier's trend on a scorecard.

The accept number matters more than the lot size. When the sample is small against the lot, changing c reshapes the curve far more than changing the lot size does (Ng, 2003).

A narrow gap between the two quality levels needs a big sample. With an AQL of 1% at 5% risk and a limiting quality of 8% at 10% risk, 65 items do it. Pull the limiting quality down to 5% and it takes 132. Try it in Find a plan.

Critical characteristics. Where one defective item can hurt someone or break the product, any sampling risk may be too high. Such characteristics are often checked on every part or error-proofed.

Limits of this calculator

  • Random samples. The figures assume every item has the same chance of being picked. A sample taken from the top of a pallet is not random.
  • One process, one lot. A lot should come from the same process and period. A mixed lot can hide a bad part inside a good average.
  • Defective or not, one sample. It handles single sampling plans for pass or fail checks. It does not do double or multiple sampling, skip-lot plans, defects per unit, or sampling by measurement (variables).
  • No standard tables, no switching rules. It does not contain ISO 2859-1, ANSI/ASQ Z1.4 or MIL-STD-105 tables, and it does not model moving between normal, tightened and reduced inspection. Use your standard for those and this calculator to read the plan it gives you.
  • Whole items. With a lot size, the defect rate is rounded to a whole number of defective items, so a very small lot shows a stepped curve.
  • Outgoing quality assumes rework of rejects. AOQ and AOQL hold only if rejected lots are fully inspected and defects replaced.
  • General statistics, not a standard. Nothing here is legal, contractual or regulatory advice. Your contract, customer requirements and the standard they name decide the plan.

Embed this calculator

Teaching this, or writing about it? Paste this code into your site, course page or intranet and the calculator works right there. It is free, with no sign-up.

<iframe src="https://www.theleansuite.com/tools/acceptance-sampling-calculator/embed" title="Acceptance sampling calculator by LeanSuite" width="100%" height="3300" style="border:0;max-width:1000px" loading="lazy" allow="clipboard-write"></iframe>
<p style="font:13px/1.4 sans-serif"><a href="https://www.theleansuite.com/tools/acceptance-sampling-calculator">Acceptance sampling calculator</a> by LeanSuite</p>

How LeanSuite helps

LeanSuite does not size sampling plans. Its Supplier Quality Management runs inbound inspections as part-specific checklists with required photos, routes a flagged defect as a SCAR and tracks each supplier's defects and costs on a scorecard, which is where a plan you have chosen gets applied.

See Supplier Quality Management

FAQ

Acceptance sampling calculator: common questions

  1. An operating characteristic (OC) curve plots the chance that a sampling plan accepts a lot against the share of defective items in that lot. A plan that checks 50 items and accepts 1 or fewer defectives accepts 91.1% of lots that are 1% defective, 27.9% of lots at 5% and 3.4% of lots at 10%. The curve is the whole truth about a plan: its producer's risk and its consumer's risk are two points read off it.

  2. No. The acceptance quality limit is the worst average defect rate a plan treats as acceptable over a series of lots, and it is used to choose the plan. It does not cap what any one lot can hold. The example plan above (check 50, accept 1) still accepts 1 lot in 4 at 5% defective, five times the AQL.

  3. Pick two points on the OC curve and find the smallest sample and accept number that pass both, which is how NIST describes it. For an AQL of 1% at 5% producer's risk and a limiting quality of 8% at 10% consumer's risk, that is check 65 and accept 2 or fewer: it accepts 97.2% of lots at 1% and 9.9% of lots at 8%. One item fewer does not work, because 64 with an accept number of 2 would accept 10.5% of lots at 8%.

  4. When the sample is a tenth of the lot or more. Without a lot size the calculator uses the binomial, which assumes a very large lot. With one it uses the hypergeometric, which counts the items you take out and so is exact for any lot. Take a lot of 500 and the plan check 50, accept 1: the binomial gives 91.1% at 1% defective, the exact figure for 5 defectives in 500 is 91.9%.

  5. Use n = ln(1 − C) ÷ ln(1 − X), where C is the confidence and X the highest defect rate to rule out. For 95% confidence that the rate is under 1% that is 299 items with none defective, 598 for 0.5% and 230 for 90% confidence at 1%. The table in the calculator lists the common targets. In a small lot the exact lot figure is smaller, so enter the lot size.

  6. Because one defect anywhere in the sample fails the lot, however good the rest is. With 299 items and zero allowed, a lot at a quarter of the limit (0.25% defective) is still rejected 52.7% of the time. If that is too costly, allow one or more defects and pick the plan from its OC curve in the Find a plan mode.

  7. No. Standards such as ISO 2859-1 and ANSI/ASQ Z1.4 give a plan from the lot size, an inspection level and an AQL. The MIL-STD-105D tables that NIST describes also come with rules for switching between normal, tightened and reduced inspection, so check whether your standard does. This calculator never uses their tables. If your contract names a plan, type its sample size and accept number into Check a plan and read the consumer's risk it really gives.

  8. The ones that match what a wrong decision costs you. Many guides use 5% for the producer's risk and 10% for the consumer's risk, so the calculator starts there. NIST says the two usually fall between 1% and 20%. A lower risk needs a bigger sample, so set them as a trade you can afford.

More free lean tools

All tools

Pass it on

We want LeanSuite to be the best place on the internet for lean help. If this was useful, send it to someone on your team or in your network who needs it.