Acceptance Sampling Plan & OC Curve Calculator

Evaluate a single sampling plan by attributes (OC curve, AOQ, AOQL, ATI), design the smallest n and c for a given AQL, LTPD and risks, or size a zero-failure plan for a confidence and reliability target. Every probability is computed exactly — binomial, hypergeometric or Poisson.

Quality engineeringFreeNo sign-up

Leave N empty for a continuing stream of lots (binomial). With N the tool uses the hypergeometric distribution and also reports ATI.

How to use the acceptance sampling calculator

What a single sampling plan is

In a single sampling plan by attributes you draw n units at random from a lot, count the defective ones (d), and accept the lot if d ≤ c. Because only a sample is inspected, both good and bad lots can be misjudged. The operating characteristic (OC) curve shows the probability of acceptance Pa for every possible incoming fraction defective p, and is the complete description of what a plan does.

The formulas

ModelProbability of acceptanceUse when
Binomial (type B)Pa = Σk=0…c C(n,k) pk(1−p)n−kLots come from a continuing process, or n is under about 10% of N
Hypergeometric (type A)Pa = Σk=0…c C(D,k) C(N−D,n−k) ⁄ C(N,n)An isolated lot of N units containing D defectives — exact
PoissonPa = Σk=0…c e−np(np)k ⁄ k!Approximation for small p and large n; also defects per unit

The calculator evaluates these sums directly in logarithmic space (using the log-gamma function), so they stay accurate for samples of thousands of units. Nothing is read from a table or approximated by a normal curve.

How to read the results

Worked example

Plan: n = 125, c = 3, lot size N = 2000, incoming quality 2% defective (D = 40 defective units).

Hypergeometric: Pa = P(0) + P(1) + P(2) + P(3) with P(k) = C(40,k)·C(1960,125−k) ⁄ C(2000,125), which gives Pa ≈ 76.2%. The binomial model gives 75.9% — close, because the sample is only about 6% of the lot.

AOQ = 0.7624 × 0.02 × (2000 − 125) ⁄ 2000 ≈ 1.43%. ATI = 125 + (1 − 0.7624) × 1875 ≈ 570 units per lot.

Zero-failure plan: for 95% confidence of 99% reliability, n = ln(0.05) ⁄ ln(0.99) = 298.07 → 299 units with no failures.

About ANSI/ASQ Z1.4 and ISO 2859-1

The AQL standards (ANSI/ASQ Z1.4, ISO 2859-1, formerly MIL-STD-105E) are sampling schemes: code letters by lot size and inspection level, plans indexed by AQL, and switching rules between normal, tightened and reduced inspection. This tool does not reproduce those tables. Take the code letter, n, Ac and Re from your copy of the standard, then enter n and c here to see the real OC curve, LTPD and AOQL of that plan — information the tables alone do not show. Note that the AQL in those standards is an index of the scheme; a single lot at the AQL is typically accepted between about 88% and 99% of the time, depending on the sample size.

Assumptions and limitations

The method follows Montgomery, Introduction to Statistical Quality Control (acceptance sampling chapters) and Schilling & Neubauer, Acceptance Sampling in Quality Control.

Frequently asked questions

What is an OC curve in acceptance sampling?

The operating characteristic curve plots the probability of accepting a lot against the incoming percent defective for a given sampling plan. It shows how well the plan discriminates between good and bad lots, including the producer’s risk at the AQL and the consumer’s risk at the LTPD.

What is the difference between AQL and LTPD?

AQL (acceptable quality level) is the poorest quality that is still considered satisfactory as a process average; lots at the AQL should be accepted most of the time, typically 95%. LTPD (lot tolerance percent defective), also called RQL or LQ, is the quality that should be rejected most of the time, typically accepted only 10% of the time.

How do I calculate the sample size for a c = 0 sampling plan?

Use the success-run formula n = ln(1 − C) / ln(R), rounded up, where C is the confidence and R the reliability (fraction conforming). For 95% confidence and 99% reliability, n = ln(0.05) / ln(0.99) = 299 units with zero failures allowed.

What is AOQL?

AOQL is the average outgoing quality limit: the maximum of the average outgoing quality curve over all possible incoming quality levels, assuming rejected lots are 100% inspected and defectives replaced. It is the worst average quality the customer will receive in the long run.

When should I use the hypergeometric instead of the binomial distribution?

Use the hypergeometric distribution for an isolated lot of known size, especially when the sample is more than about 10% of the lot, because sampling without replacement changes the odds from draw to draw. For lots from a continuing process, or small sampling fractions, the binomial gives practically the same answer.

Does this calculator replace ANSI/ASQ Z1.4 or ISO 2859-1 tables?

No. Those standards define sampling schemes with code letters and switching rules, and the plan must be taken from the standard itself. This calculator computes the exact probabilities for any n and c, so you can check the OC curve, LTPD and AOQL of a plan taken from the standard or design a custom plan from two points.