operations-quality · quality-six-sigma · acceptance-sampling

Acceptance Sampling Calculator

Builds a binomial acceptance-sampling plan with its operating characteristic curve, producer and consumer risks and average outgoing quality. Use it to design or check a lot inspection plan.

Last updated
Decision Canvas

Calculator overview

Inputs and outputs

This summary comes from the calculator's published input and output contract.

Inputs

Acceptable Quality Level
About this input

The quality level a good lot is expected to meet, as a percent defective. The producer wants lots at this level accepted most of the time.

Unit % Default 1 Range 0 to 100
Acceptance Number
About this input

The largest number of defective items allowed in the sample for the lot to be accepted, in defectives. Finding more than this rejects the lot.

Unit defectives Default 3 Range 0 to 10 (conditional)
Lot Size
About this input

The number of items in the lot the sample is drawn from, in units. It is used for the average outgoing quality limit; the acceptance probabilities themselves come from the binomial and do not depend on it.

Unit units Default 5000 Range At least 1
Rejectable Quality Level
About this input

The poor quality level the plan should reject, as a percent defective, sometimes called the lot tolerance percent defective. The consumer wants lots at this level rejected most of the time.

Unit % Default 6.5 Range 0 to 100
Sample Size
About this input

The number of items drawn from the lot and inspected, in units. Together with the acceptance number it defines the sampling plan.

Unit units Default 125 Range At least 1
Target Consumers Risk
About this input

The largest chance you will accept, as a percent, of passing a lot that is actually at the rejectable quality level. The plan finder searches for a sample size that keeps the consumer's risk at or below this.

Unit % Default 10 Range 0 to 100

Outputs

Average Outgoing Quality Limit
About this output

The worst average defect rate that reaches the customer after rejected lots are screened and corrected, as a fraction between 0 and 1. It is the peak of the average outgoing quality curve, searched across the full range of incoming quality up to a completely defective lot.

Unit fraction
Consumers Risk
About this output

The chance a poor lot at the rejectable quality level is wrongly accepted, as a percent. It equals the acceptance probability at the rejectable quality level.

Unit %
Incoming Rate At That Limit
About this output

The incoming defect fraction, between 0 and 1, at which the average outgoing quality reaches its worst value. It tells you which incoming quality is the most damaging.

Unit fraction
Its Acceptance Probability At Rql
About this output

The chance the recommended sample size accepts a lot at the rejectable quality level, as a probability between 0 and 1, confirming the target risk is met.

Unit probability
Meets The Target Consumers Risk
About this output

Whether the plan holds the consumer's risk at or below the target you set. If it reads no, increase the sample size or lower the acceptance number.

Unit yes/no
Model Status
About this output

The overall check on your entries, shown above the results. It reads OK when the inputs are usable, NOT VALID with a reason when an entry makes the model meaningless, or CHECK with a reason when a result is valid but worth a second look. Read it before you trust the numbers below.

No unit declared
Probability Of Acceptance At Aql
About this output

The chance the plan accepts a lot running at the acceptable quality level, as a probability between 0 and 1, computed from the binomial distribution. The binomial model treats draws as independent, which is accurate while the sample is a small fraction of the lot; above 10% the status says so.

Unit probability
Probability Of Acceptance At Rql
About this output

The chance the plan accepts a lot running at the rejectable quality level, as a probability between 0 and 1.

Unit probability
Producers Risk
About this output

The chance a good lot at the acceptable quality level is wrongly rejected, as a percent. It equals one minus the acceptance probability at the acceptable quality level.

Unit %
Recommended Sample Size
About this output

The smallest sample size from the plan ladder that both meets the target consumer's risk for the current acceptance number and fits inside the lot. Use it as a starting plan rather than a final one; if no ladder size qualifies, it says so instead of answering.

Unit units

What it is

The Acceptance Sampling Calculator builds a single-sampling attribute plan and tells you how it will behave. You give it a sample size and an acceptance number, together with the quality levels you consider good and bad, and it reports the chance the plan accepts a lot at each of those levels, the resulting producer's and consumer's risks, the worst average outgoing quality the plan can let through, and the smallest sample size that would meet the consumer's risk you asked for.

Quality levels are entered as percent defective, sample and lot sizes in units, and risks come back as percentages or probabilities.

Use it to design or check an attribute inspection plan. It builds the plan from the binomial distribution directly rather than looking one up from a published sampling scheme, and it treats the lot as effectively unlimited.

Methodology

Purpose and model boundary

This calculator evaluates a single-sample attributes plan: inspect n items from a lot of N, accept the lot when no more than c defectives are found, and otherwise reject it. It reports the plan's operating-characteristic probabilities at an acceptable quality level (AQL) and rejectable quality level (RQL), the associated producer's and consumer's risks, a rectifying-inspection average outgoing quality limit (AOQL), and the first qualifying sample size from the workbook's candidate ladder.

The result describes the mathematical plan entered. It does not select an inspection level, claim conformance to an ANSI/ASQ/ISO sampling standard, determine whether a supplier process is stable, or replace an agreement between producer and consumer.

Inputs and units

  • Lot size, N and sample size, n are integer item counts. Both must be positive and the sample cannot exceed the lot.
  • Acceptance number, c is an integer defective count from 0 through 10 and cannot exceed n.
  • AQL, p_A, RQL, p_R, and target consumer's risk, beta_target are entered as percentages and converted to fractions for calculation. The RQL must exceed the AQL.

The probability model treats an inspected item as defective or non-defective. It does not model defect counts per item or severity classes.

Governing relationships

For incoming defective fraction p, the workbook computes the cumulative binomial acceptance probability

Pa(p; n, c) = sum from k=0 to c of C(n,k) * p^k * (1-p)^(n-k).

The terms are built recursively through c = 10, avoiding factorial overflow. The principal risks are

  • producer risk = 1 - Pa(p_A; n, c);
  • consumer risk = Pa(p_R; n, c).

For rectifying inspection, the average outgoing quality at incoming rate p is

AOQ(p) = p * Pa(p; n, c) * (N - n) / N.

The workbook evaluates this relationship on its authored incoming-quality grid over the full 0-to-1 domain and reports the greatest grid value as AOQL together with the corresponding incoming rate. This is a discrete grid search, not a continuous optimizer.

Calculation sequence

  1. Convert the three percentage inputs to fractions and constrain c to the implemented 0-to-10 binomial term chain.
  2. Evaluate Pa at AQL and RQL, then derive producer's risk, consumer's risk, and whether the entered plan meets beta_target.
  3. Evaluate the operating-characteristic and AOQ grids used by the chart and AOQL search.
  4. Test the candidate sample sizes 5, 8, 13, 20, 32, 50, 80, 125, 200, 315, 500, 800, 1250, 2000 in ascending order. The recommendation is the first candidate that is no larger than N and has Pa(p_R) <= beta_target; otherwise it reports that none in the ladder is large enough.

Outputs and interpretation

Pa at AQL is the chance of accepting a lot at the good-quality point; Pa at RQL is the chance of accepting a lot at the poor-quality point. These are probability-model results, not observed frequencies. Producer's risk measures rejection of a lot at AQL, while consumer's risk measures acceptance of a lot at RQL. The recommended sample size is a ladder result for the current c, RQL, target risk, and lot size; it is not a published sampling-table plan.

Validation and status logic

The workbook evaluates status in this order:

Condition Returned status
n <= 0 NOT VALID: sample size must be greater than zero
n > N NOT VALID: the sample cannot be larger than the lot
c > n NOT VALID: the acceptance number cannot exceed the sample size
p_R <= p_A NOT VALID: the rejectable level must exceed the acceptable level
Entered plan has Pa(p_R) > beta_target CHECK: this plan does not meet the target consumer risk; see the recommended sample size
Producer's risk exceeds 10% CHECK: producer risk exceeds 10%, good lots will often be rejected
n / N > 0.10 CHECK: the sample is more than 10% of the lot, so the binomial model overstates the risks; treat them as indicative
None of the above OK

The published limits also reject percentages outside 0% to 100%, an acceptance number outside 0 to 10, and nonpositive integer counts before a workbook calculation is submitted.

Assumptions and limitations

The OC probabilities use independent binomial trials. Sampling without replacement is better represented by a hypergeometric model when the sample is a material share of the lot; the workbook flags a sampling fraction above 10% but does not switch distributions. AOQ assumes rejected lots are screened and defectives corrected or replaced. The result depends on representative random sampling, a consistent definition of defective, and quality levels that are meaningful for the product. AOQL is limited to the workbook's authored search grid, and the sample-size recommendation is limited to the fixed ladder.

Restrictions and non-computing states

The workbook does not switch to a hypergeometric model, search outside its authored AOQL grid, or recommend sample sizes outside its fixed ladder. Rows with invalid lot, sample, acceptance-number, or quality-level inputs do not produce a decision-ready result; consult the status message before using the reported quantities.

Errors and warnings

A rejected entry means a submitted type or value did not satisfy the published input rules and no workbook decision was made. A workbook NOT VALID status means the plan relationships prevent a meaningful result. A CHECK status preserves a computable result but identifies a risk or approximation requiring review. A network, sign-in, or calculation-service error is a delivery failure, not a sampling conclusion.

References

The workbook derives its relations rather than reproducing any table, chart or figure from a specification, standard or agency publication. Acceptance probabilities are cumulative binomial sums computed directly, and the average outgoing quality limit is found by scanning a grid of incoming rates rather than read from a published curve.

Published sampling schemes such as ANSI/ASQ Z1.4 and ISO 2859 define plans by lot size, inspection level and acceptable quality level, along with switching rules between normal, tightened and reduced inspection. This tool implements none of them. It computes the behaviour of a plan you specify. If you are required to follow a published scheme, take the plan from that scheme and use this tool only to understand how it behaves.

Additional source notes migrated from Methodology

The workbook uses the cumulative binomial distribution and the rectifying-inspection AOQ relationship shown above. It computes plans rather than reproducing a published ANSI, ASQ, AIAG, or ISO sampling table; the page's References section carries the licensing and non-endorsement statement.

Frequently asked questions

Why does the tool assume an unlimited lot when I entered a lot size?
Because the acceptance probabilities are computed from the binomial distribution, which treats each item drawn as independent of the last. That is a good approximation while the sample is a small fraction of the lot, conventionally under about ten percent. The lot size you enter is used for the average outgoing quality calculation, where the screened portion of rejected lots matters, but it does not change the acceptance probabilities. If your sample is a large fraction of the lot, the hypergeometric distribution is the correct model and these figures will be optimistic.
What is the difference between the producer's risk and the consumer's risk?
They are the two ways a sampling plan can be wrong. The producer's risk is the chance a lot that genuinely meets the acceptable quality level is rejected anyway, a loss to whoever made it. The consumer's risk is the chance a lot at the rejectable level is accepted, a loss to whoever receives it. Every plan trades one against the other, and the only way to reduce both at once is to inspect more items.
Why is the average outgoing quality limit worse than my acceptable quality level?
Because it is a different quantity. The acceptable quality level is a target you set for incoming lots. The average outgoing quality limit is the worst long-run defect rate that reaches the customer across all possible incoming rates, assuming rejected lots are screened and their defectives replaced. It peaks somewhere between the two quality levels: at low incoming rates there is little to catch, at high rates almost everything is rejected and screened, and the mixture is worst in the middle.
Does the average outgoing quality limit apply if I scrap rejected lots instead of screening them?
No. Average outgoing quality is a rectifying-inspection concept and assumes rejected lots are inspected one hundred percent and their defectives replaced or corrected, so those lots reach the customer nearly clean. If you scrap rejected lots, or return them, the mixture the limit describes never happens and the figure does not describe your process.
Why can I not enter an acceptance number above ten?
Because the plan's acceptance probability is computed as a cumulative binomial sum over the accepted counts, and the workbook implements that sum through ten. A value above the supported range is refused per field rather than silently truncated. If you need a plan with a larger acceptance number, this tool is not the right one for it.
Can I use this to follow ANSI/ASQ Z1.4?
Not to derive a plan from it. This tool computes the behaviour of a plan you specify; it does not implement Z1.4, ISO 2859, or any other published scheme, and it carries none of their lot-size tables, inspection levels or switching rules. If you are required to follow a published scheme, take the sample size and acceptance number from that scheme and enter them here to see how the resulting plan behaves.
This page is provided by LogicCommons for informational purposes only. Results are analysis outputs computed from the inputs you supply and are not engineering advice, a design, or a substitute for review by a licensed professional under the codes adopted where the work is built. Verify all inputs and results independently.

LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.