Calculate defective probability, chance of at least one defective, and lot acceptance from defect rate, sample size, and allowed defectives.

Divide defective items by inspected items.

Risk and acceptance assume independent items with a constant defect probability. Large samples without replacement need a finite-lot model. An observed rate is an estimate, not proof of the true rate.

Defective Probability Formula

The calculator uses a different formula for each mode.

Observed rate divides defective units by total inspected units.

p = d / N

Sample risk uses the complement rule on independent trials to find the chance of seeing at least one defective in a sample.

P(at least 1 defective) = 1 - (1 - p)ⁿ

Acceptance uses the binomial cumulative distribution to find the chance a lot passes when the sample contains c or fewer defectives.

P(accept) = Σ (n choose k) pk (1 - p)⁽n - k), for k = 0 to c
  • p = probability that a single item is defective
  • d = number of defective items found
  • N = total items inspected
  • n = sample size drawn from the lot
  • c = maximum number of defectives allowed before rejection
  • k = count of defectives in the sample

The formulas assume each item is independent and the per-item defect probability is constant. The binomial model is a good approximation when the sample is small relative to the lot (under about 10% of lot size). For larger sampling fractions, a hypergeometric model is more accurate.

The Observed rate tab estimates p directly from inspection data. The Sample risk tab predicts how often a sample will contain at least one defective unit given a known p. The Acceptance tab predicts how often a lot will pass an acceptance sampling plan defined by n and c.

Reference Tables

Illustrative defective-item rates expressed as percent, decimal, and defective items per million (PPM). Quality targets depend on the product and inspection plan; these rows are not universal benchmarks.

Example rate Percent Decimal DPM
10% example10%0.10100,000
5% example5%0.0550,000
1% example1%0.0110,000
0.1% example0.1%0.0011,000
3.4 PPM example0.00034%0.00000343.4

Chance of catching at least one defective in a sample for a few combinations of p and n.

Defect rate p n = 10 n = 50 n = 100 n = 500
0.1%1.0%4.9%9.5%39.4%
1%9.6%39.5%63.4%99.3%
5%40.1%92.3%99.4%~100%
10%65.1%99.5%~100%~100%

Worked Examples

Example 1: Observed rate. You inspect 500 units and find 12 defectives. The defect probability is 12 / 500 = 0.024, or 2.4%. The non-defective rate is 97.6%, and the observed rate is 24,000 defective items per million.

Example 2: Sample risk. A line runs at p = 2.4%. You pull a random sample of 30 units. The probability of zero defectives is (1 - 0.024)^30 = 0.4825. The chance of finding at least one defective is 1 - 0.4825 = 0.5175, or about 51.75%.

Example 3: Acceptance sampling. A lot at p = 5% is sampled with n = 30 and c = 2. P(accept) is the binomial sum from k = 0 to k = 2, which equals about 81.2%. So roughly 1 in 5 lots at this defect rate would be rejected by this plan.

FAQ

What if my sample is a large fraction of the lot? The binomial formula assumes sampling with replacement or an effectively infinite lot. If your sample exceeds about 10% of the lot, switch to the hypergeometric distribution for tighter accuracy.

How many units should I inspect to estimate p? For rough estimation, the relative error in p shrinks with sqrt(N). To resolve a defect rate near 1% within approximately ±0.5 percentage points at 95% confidence, you need a sample on the order of 1,500 to 2,000 units.

Why does my observed rate differ from the supplier's stated p? Small samples have wide confidence intervals. Sample risk gives the chance of at least one defective under an assumed p. It does not compute a confidence interval or a test comparing your observed rate with a supplier claim.

Can p be zero? The calculator accepts zero, but a finite sample with zero defectives does not prove p = 0. Use the rule of three: the upper 95% bound on p is roughly 3/N when no defectives are found.