Calculator overview
Inputs and outputs
This summary comes from the calculator's published input and output contract.
Inputs
- Acceptable Quality Level
-
Unit % Default 1 Range 0 to 100
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.
- Acceptance Number
-
Unit defectives Default 3 Range 0 to 10 (conditional)
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.
- Lot Size
-
Unit units Default 5000 Range At least 1
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.
- Rejectable Quality Level
-
Unit % Default 6.5 Range 0 to 100
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.
- Sample Size
-
Unit units Default 125 Range At least 1
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.
- Target Consumers Risk
-
Unit % Default 10 Range 0 to 100
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.
Outputs
- Average Outgoing Quality Limit
-
Unit fraction
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.
- Consumers Risk
-
Unit %
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.
- Incoming Rate At That Limit
-
Unit fraction
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.
- Its Acceptance Probability At Rql
-
Unit probability
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.
- Meets The Target Consumers Risk
-
Unit yes/no
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.
- Model Status
-
No unit declared
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.
- Probability Of Acceptance At Aql
-
Unit probability
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.
- Probability Of Acceptance At Rql
-
Unit probability
About this output
The chance the plan accepts a lot running at the rejectable quality level, as a probability between 0 and 1.
- Producers Risk
-
Unit %
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.
- Recommended Sample Size
-
Unit units
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.
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,
Nand sample size,nare integer item counts. Both must be positive and the sample cannot exceed the lot. - Acceptance number,
cis an integer defective count from 0 through 10 and cannot exceedn. - AQL,
p_A, RQL,p_R, and target consumer's risk,beta_targetare 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
- Convert the three percentage inputs to fractions and constrain
cto the implemented 0-to-10 binomial term chain. - Evaluate
Paat AQL and RQL, then derive producer's risk, consumer's risk, and whether the entered plan meetsbeta_target. - Evaluate the operating-characteristic and AOQ grids used by the chart and AOQL search.
- Test the candidate sample sizes
5, 8, 13, 20, 32, 50, 80, 125, 200, 315, 500, 800, 1250, 2000in ascending order. The recommendation is the first candidate that is no larger thanNand hasPa(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.
- Wikipedia. Acceptance sampling, for the operating characteristic curve and the two risks. https://en.wikipedia.org/wiki/Acceptance_sampling
- Wikipedia. Binomial distribution, for the acceptance probability. https://en.wikipedia.org/wiki/Binomial_distribution
- Wikipedia. Hypergeometric distribution, which is the correct model when the sample is a large fraction of a finite lot. https://en.wikipedia.org/wiki/Hypergeometric_distribution
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?
What is the difference between the producer's risk and the consumer's risk?
Why is the average outgoing quality limit worse than my acceptable quality level?
Does the average outgoing quality limit apply if I scrap rejected lots instead of screening them?
Why can I not enter an acceptance number above ten?
Can I use this to follow ANSI/ASQ Z1.4?
Found a problem, or have an idea?
Tell us if a result looks wrong, a label is unclear, or something is missing. We read every message.
LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.