Lot Sampling Acceptance Probability & Inspection Cost Calculator

Compare two n/c plans at the same assumed defective count.
Save an OC and cost worksheet to discuss sampling and rejection treatment.

Illustrative example · Compare agreed plans for ordinary parts

K is an assumed number of defective products in the whole lot. This tool does not estimate the actual defect rate or provide AQL tables, statutory inspection or approval for safety-critical shipments. Both languages use KRW.

Lot and scenario

1. One lot and an assumed defect count

Thousands separators are allowed in individual fields. Count defective products, not multiple defects on one product. Costs and time accept up to 6 decimal places; time is not automatically added to cost.

Inspection plan A

Plan A

Blank extra cost means unknown. For an agreed zero, enter 0 and the treatment. Do not count initial inspection twice in screening or return costs.

Inspection plan B

Plan B

Blank extra cost means unknown. For an agreed zero, enter 0 and the treatment. Do not count initial inspection twice in screening or return costs.

OC scenarios and sampling assumptions

2. OC scenarios and sampling assumptions

Separate values with spaces, newlines or semicolons; no commas in this list. 0, current K and N are always included.

Unconfirmed assumptions withhold probabilities, OC and expected cost; base cost and time remain available. Checkboxes record your verification.

Statistical sources checked: 2026-10-27 · NIST: Acceptance sampling · NIST: n/c and OC curves · NIST: Hypergeometric CDF

Compare lot acceptance probability alongside inspection cost

Two incoming inspection quotes may offer different sample sizes, acceptance numbers and prices.
This calculator compares two already agreed n/c plans for ordinary, non-safety-critical parts under the same assumed lot composition.
It helps small manufacturers and distributors prepare a discussion with quality staff before agreeing to sampling and follow-up costs.

Start with an explicit scenario

K is an assumed number of defective products in the whole lot, not a defect-rate estimate inferred from a sample.
Incoming inspection here means checking received goods; it does not establish customs compliance.
The result describes a plan under your assumptions and does not approve a shipment.

What N, K, n and c mean

Lot size and assumed defect count

N is the number of products in one defined lot, an integer from 1 to 1,000,000.
K is the assumed number of defective products, an integer from 0 to N.
Several defects on one product still count as one defective product.
Confirm whether products from different production dates, machines or suppliers can reasonably belong to the same lot.

Sample size and acceptance number

n is an integer from 1 to min(N,100,000).
c is an integer from 0 to n: accept the lot if at most c sampled products are defective.
With c=0, one defective product rejects the lot.
With c=n, every possible sample result is accepted, and the calculator displays a warning.

These input limits are product performance limits, not statutory or recommended sample sizes.
Use the plans actually proposed by the contracting parties.
Different defect definitions or inspection methods make the plans different in ways the probability model does not capture.

Exact hypergeometric probability without replacement

The model draws a uniform random sample from a finite lot without putting selected products back.
If X counts defective products in the sample, acceptance is X≤c.
Until both sampling confirmations are checked, probabilities, the OC table and expected costs are withheld; base inspection cost and time remain available.

Pa=Σ C(K,x)C(N−K,n−x)/C(N,n)
lo=max(0,n−(N−K)), hi=min(n,K)
Sum: x=lo…min(c,hi)

C(a,b) counts combinations of b items from a items.
Rejection sums the x>c terms separately.
Finding at least one defective product and rejecting a lot are the same event only when c=0.

The implementation starts at the distribution mode and sums relative weights in both directions, avoiding factorial overflow and subtraction of a tiny tail from one.
It uses the finite-population distribution without a binomial or normal approximation.
Floating-point rounding remains, and extreme tails may underflow: precision-bound displays do not guarantee zero risk.

Separate inspection cost, time and rejection treatment

Initial inspection

Base cost I=n×cost per item+fixed cost per lot.
Inspection time T=n×seconds per item/60, in minutes.
Time is not automatically monetized, preventing labor already included in a quote from being added twice.
Setup, waiting, transport and parallel work are not automatically included in time.

Conditional expected treatment cost

When an extra cost R and treatment details are both supplied, E=I+P(reject)×R.
R is the incremental cost per rejected lot, excluding the initial inspection cost.
Use an agreed return-freight or additional-screening quote with a defined scope.
Blank means unknown; explicit 0 means an agreed zero and still requires treatment details.

Time accepts 0–86,400 seconds per item; each unit cost, fixed cost and extra cost accepts 0–1 billion KRW, with up to 6 decimal places.
The English and Korean versions both use KRW without currency conversion or automatic tax rates.
Expected cost is a conditional average, not this transaction’s invoice, cash deposit or return-loss estimate.
Entering an extra cost without treatment details produces an error.

How to compare two agreed plans

  1. Enter the lot size N and a hypothetical whole-lot defective count K.
    Do not turn observed sample defects into a confirmed whole-lot count.
  2. Enter each proposed n/c plan, unit price, time and fixed charge.
    Enter zero only for explicitly free items.
  3. If rejection treatment and incremental cost are known, record them together.
    Otherwise leave the extra cost blank.
  4. Add up to 15 K scenarios separated by spaces, newlines or semicolons, without commas.
    The table always includes 0, current K and N.
  5. Verify uniform random sampling, no replacement and consistent defect definitions.
    The checkboxes record your verification rather than perform a statistical test.
  6. Compare the starred current row and B−A differences, then save the TXT worksheet.
    Editing an input clears previous results and requires recalculation.

Worked example: a lot of 10 with 2 assumed defective products

This is a fictional arithmetic example, not a market price or recommended inspection plan.
N=10, K=2; A uses n=2,c=0 and B uses n=3,c=0.
Both charge 1,000 KRW per item plus 5,000 KRW fixed, and take 30 seconds per item.
Assume a documented rejection treatment with an incremental cost of 30,000 KRW.

Acceptance, time and costs for fictional plans at N10 K2
MeasurePlan APlan B
Acceptance probability62.222222%46.666667%
Inspection cost KRW7,0008,000
Inspection minutes11.5
Conditional expected cost KRW18,333.3324,000

A accepts with C(8,2)/C(10,2)=28/45; B accepts with C(8,3)/C(10,3)=7/15.
B−A is −15.555556pp for acceptance, +1,000 KRW for base inspection and +5,666.67 KRW for expected cost.
B rejects this assumed lot composition more often, so the incremental treatment cost increases its conditional average.
Leaving the extra costs blank withholds the final row rather than treating unknown costs as zero.

Read the OC table by varying only K

The OC table fixes N and both n/c plans and varies the assumed number of defective products.
The current K row has a ★ marker.
Up to 15 entered scenarios are sorted and deduplicated alongside 0, current K and N, producing at most 18 rows.
K/N is the assumed fraction defective, not an estimate from observed inspection data.

At K=0, acceptance is 100% under both plans.
At K=N, acceptance is 0% for any plan with c<n.
At n=N, X=K is fixed, and acceptance depends entirely on whether K≤c.
These are logical model boundaries; they do not remove inspection misclassification or destructive-test losses.

Do not linearly interpolate missing integer K rows for a contract figure.
Enter the needed K and recalculate under the same conditions.
Uniform sampling from one defined lot is essential to this interpretation.

Interpret probability differences and risk carefully

A 60% acceptance probability describes repeated sampling from lots with the assumed composition.
It does not mean the lot is 60% good or that inspection detects 60% of its defective products.
When c is positive, a sample can contain identified defective products and still accept the lot.

  • A negative B−A means lower acceptance for B at this K, not an automatically superior contract across all quality levels.
  • Percentage points (pp) subtract two percentages; they are not relative percentage changes.
  • Formal producer and consumer risk analysis needs agreed definitions of acceptable and unacceptable lot quality.
    The tool does not select these quality levels.

Cost, consequences, delivery timing and treatment responsibility belong in the decision.
The calculator does not rank plans or recommend an optimal sample size.

Practical contract checks

When reviewing quotes

Check fixed setup charges, destroyed sample costs and the scope of follow-up screening.
Avoid adding costs twice when they are already included in the quote.
Record the quote’s validity and inspection location so that both proposals remain comparable.

When agreeing rejection treatment

Record who pays freight, whether screening covers the entire lot or only remaining products, and how reinspected goods are accepted.
A single R must refer to the same rejection event; it should not silently combine incompatible treatment paths.
Add the source document reference to the treatment note before exporting.

All initial values are fictional.
Replace N, K, n/c and prices with current transaction inputs and verify the checkboxes again.
Keep dated worksheets separate when lot definitions or quote terms change.

Limits and common input mistakes

No KS/ISO AQL tables are reproduced and no AQL-based sample size is recommended.
Exclude statutory net-quantity inspection and safety-critical component approval.
Actual defect-rate estimation, confidence intervals, outgoing quality AOQ, average total inspection ATI and return probability are outside scope.

Conveniently selecting one carton or neighboring products may violate uniform random sampling.
Replacement sampling, measurement error and inconsistent inspector definitions are not modeled.
Checking a box does not verify or resolve those issues.

Individual numeric fields accept correctly grouped thousands separators; the K list uses whitespace or semicolons without commas.
Negative numbers, exponent notation, malformed grouping, NaN, Infinity and out-of-range values produce errors instead of silent clamping.
The display floor is 0.000001%; very small or nearly 100% probabilities use inequalities.
Floating-point tail underflow and display rounding do not establish safety or zero defects.

Frequently asked questions

Can I enter observed sample defects as K?

K is an assumed whole-lot defective count.
Sample observations do not establish the whole-lot count.
This calculator does not estimate a true defect rate or confidence interval.

Is a larger sample always stricter?

At fixed c, increasing n does not increase acceptance at the same K.
When c also changes, sample size alone is insufficient.
Compare the plans across the same OC scenarios.

Is acceptance the probability of missing all defects?

Acceptance means X≤c.
With a positive c, inspection may find defective products and still accept the lot.
The events coincide only at c=0.

Can I see costs before confirming sampling?

Base inspection cost and time remain available.
Probabilities, the OC table and conditional expected cost are withheld until the random and without-replacement assumptions are confirmed.

Should I enter zero for an unknown extra cost?

Leave it blank.
Zero means an explicitly agreed zero cost and requires treatment details.
Base inspection cost can still be calculated with unknown extra costs.

Does this select AQL plans or perform statutory tests?

No.
It compares two agreed plans without reproducing standards tables or approving legal inspection or safety-critical shipments.
Confirm applicable requirements with the responsible authority and professionals.

Does a probability below the display floor mean safety?

No.
It depends on K and the sampling assumptions, and extreme tails also have numerical representation limits.
Review consequences, misclassification and actual lot quality separately.

Is expected cost the amount payable now?

Expected cost is base cost plus rejection probability times incremental cost.
Actual rejection triggers the agreed treatment costs.
The result is neither a cash deposit limit nor a complete loss estimate.

Sources, review date and rechecks

Statistical sources checked on 2026-10-27; this tool has no statutory rule year.
The implementation uses the finite-population CDF definition with relative-weight summation.
Review statistical references annually and verify sampling, defect definitions, inspection quotes and rejection treatment for each transaction.

Share the OC and cost worksheet with quality staff

Save the TXT worksheet and confirm sampling terms and extra-cost responsibility with the counterparty.
For continuous characteristics, see the Cp/Cpk contract specification check.
For the distinct Korean statutory general-mass scope, read the net quantity sampling calculator requirements.

Related calculators