Statistics & probability

Acceptance sampling plan and operating characteristic curve calculator

Design or evaluate a single-sample binomial acceptance plan with explicit producer and consumer risks and an operating characteristic curve.

Your numbers

Design finds the smallest supported sample size; evaluate checks an entered plan.
A better-quality defect fraction, strictly below LTPD.
The worse-quality defect fraction used for consumer protection.
Probability of rejecting at AQL, between 0 and 0.5.
Probability of accepting at LTPD, between 0 and 0.5.
Used in evaluate mode; design searches integer n up to 5000.
Used in evaluate mode; accept when observed defects are ≤c.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Design or evaluate a single-sample binomial acceptance plan with explicit producer and consumer risks and an operating characteristic curve.

THE FORMULAP_accept(p)=P[Binomial(n,p)≤c]; design requires P_accept(AQL)≥1−α and P_accept(LTPD)≤β.

A worked example

The default AQL 0.01, LTPD 0.08, producer risk 0.05 and consumer risk 0.10 give minimum n=65, c=2. Actual risks are about 0.02759341 and 0.09909874.

Good to know

Independent binomial lot-quality model. 0<AQL<LTPD<1, risks in (0,0.5); exhaustive sample sizes 1–5000 with the least feasible acceptance count at each n. Evaluate mode supports 0≤c≤n. No ISO/MIL compliance, finite-lot hypergeometric correction, rectification metrics or guarantee of lot quality after acceptance.

A sampling plan makes a probabilistic decision

A single-sample acceptance plan examines n units and accepts when the observed number of defective units is at most c. It does not prove that an accepted lot has no defects. The operating characteristic curve describes the chance of acceptance as the underlying defect probability varies under the stated independent binomial model.

Designing a plan uses two quality points rather than one target defect percentage. The acceptable quality level represents the better-quality point, while the limiting quality level represents a worse-quality point that should rarely be accepted. Their chosen risks express different protections and should not be interchanged when entering a specification.

Acceptance sampling plan and operating characteristic curve calculator worked examplen = 65 · accept defects ≤ 2Producer risk ≈ 0.02759Consumer risk ≈ 0.09910Acceptance probability falls with defect rate
Scroll across to see the full diagram.
The default AQL 0.01, LTPD 0.08, producer risk 0.05 and consumer risk 0.10 give minimum n=65, c=2. Actual risks are about 0.02759341 and 0.09909874.

Compare this with the Zero failure reliability demonstration sample plan calculator. Choose sample size and acceptance count to bound producer/consumer risks at two defect proportions and inspect the full acceptance curve; the existing reliability page plans a zero-failure demonstration for one confidence target.

Producer and consumer risks use opposite tails

Producer risk is the probability of rejecting at the AQL, so it equals one minus the acceptance probability there. Consumer risk is the probability of accepting at the LTPD. Protecting the producer therefore requires a sufficiently large acceptance count, while protecting the consumer places pressure in the opposite direction.

Enter both quality levels as fractions, not percentage numbers unless converted first. For example, one percent is 0.01. The better-quality fraction must be strictly below the worse-quality fraction, and both risks must be positive and below one half in the supported design interface. Those conditions define the searched mathematical problem.

How minimum sample size is established

The design scans integer sample sizes in ascending order. At each size, acceptance probability increases with the acceptance count, so a binary search finds the smallest count satisfying producer protection. If that count already accepts too often at the worse quality point, every larger count at that sample size is also unsuitable.

The first sample size passing both constraints is therefore the minimum within the supported search range. Its acceptance count is the least producer-feasible count at that size. This monotonicity argument provides an optimality check for the stated binomial objective, rather than relying on a continuous approximation followed by unchecked rounding.

Read the operating characteristic curve

The OC curve plots probability of acceptance against defect fraction for the selected plan. Near zero defects, acceptance is likely; as the defect fraction rises, it becomes less likely. The AQL and LTPD constraints control the curve at two particular points but do not make it a step function at a guaranteed quality threshold.

The page reports actual risks, which may be smaller than the requested maxima because sample sizes and acceptance counts are integers. A large discrete jump can make exact equality impossible. Evaluate mode uses entered n and c and reports whether that supplied plan satisfies the same risk targets, without claiming it is sample-size optimal.

Verify the n equal to 65 example

For AQL 0.01 and LTPD 0.08, the default risk maxima are 0.05 and 0.10. The first feasible sample size is sixty-five, with acceptance count two. Acceptance therefore includes zero, one or two defective observations and rejection begins with three, not with two.

At the better quality point, the rejection probability is approximately 0.0275934075. At the worse point, acceptance probability is approximately 0.0990987385. Both satisfy the requested limits. The complete search checks smaller sample sizes rather than assuming that meeting both inequalities for one plan establishes its minimum-size status.

Match the probability model to sampling

The binomial model treats sampled units as independent with a common defect probability. Sampling without replacement from a small finite lot can require a hypergeometric model instead, particularly when the sampled fraction is substantial. This page does not silently add a lot-size correction because no finite lot size is part of its inputs.

Dependence, clustered defects, inspection mistakes and changing production quality can also alter actual risks. Nor does the page implement a named ISO or military sampling standard: those procedures include their own tables and switching rules. A mathematically valid risk-based plan is not automatically evidence of compliance with such a standard.

Check boundaries without overinterpreting acceptance

For a supplied plan, a defect fraction of zero gives acceptance probability one and a defect fraction of one gives zero unless every possible defect count is accepted. The acceptance CDF includes equality at c. These boundary checks help detect reversed tails or an off-by-one error in another implementation.

The search stops at five thousand sampled units. If no plan is found, that means unresolved within this explicit bound, not mathematical nonexistence of any plan. Inspection cost, destructive testing, rectification and consequences of false decisions are not optimized here. They need a broader design objective than minimum n under two specified binomial risks.

A few questions, answered

When is a sample accepted?

When its defect count is at most c, including equality. A count of c+1 is rejected.

Why are actual risks below the requested values?

Integer sample sizes and acceptance counts create discrete steps, so feasible plans need not achieve exact risk equality.

Does this implement an ISO table?

No. It designs a binomial risk-constrained plan and does not reproduce standard-specific switching rules or compliance requirements.

What if the lot is small?

Without-replacement finite-lot sampling may need a hypergeometric model; the independent binomial model here does not include that correction.

Find your calculator

Start typing to explore the library.