Quality & Six Sigma

Attribute Sample Size Calculator

Calculate the sample size needed to detect or confirm defect rates for pass/fail data — with zero-acceptance sampling, proportion estimation, and observed-defects confidence interval analysis.

Key formulas
n = log(α) / log(1−p)  (c=0)
n = Z² ⋅ p(1−p) / E²  (proportion)
p̂ ± Z√[p̂(1−p̂)/n]  (CI)

Enter your parameters

Choose the type of attribute analysis you need to run.

Zero-acceptance plan: Find the sample size n such that, if you observe zero defects, you can be C% confident the true defect rate is below p. This is the most conservative and widely used approach in manufacturing inspection.
Express as a decimal — e.g. 0.01 for 1% Enter a proportion between 0 and 1.
Proportion estimate: Find n to estimate the true defect rate within a given margin of error at a chosen confidence level. Use when you want to measure how bad a defect rate is, not just confirm it is below a threshold.
Use 0.5 if completely unknown (conservative) Enter a proportion between 0 and 1.
Acceptable error around the defect rate — e.g. 0.02 means ±2 percentage points Enter a positive margin of error less than 1.
Observed defects analysis: Given a completed inspection (n items checked, d defects found), calculate the point estimate, confidence interval for the true defect rate, sigma level, and DPMO.
Total items inspected Enter a positive integer sample size.
Number of non-conforming items. Enter 0 if none found. Enter a non-negative number of defects (must be ≤ n).
Number of ways a unit can be defective. Enter 1 for simple pass/fail. Enter a positive number of opportunities.
✔️

Ready to calculate

Choose your analysis type, enter the parameters, and press Calculate to see the sample size, confidence intervals, and actionable guidance.

What this means

Required n
Your target
Practical Guidance for Attribute Sampling
How to interpret and act on your attribute sample results
How it works

Attribute sampling explained

c=0

Zero-acceptance plans

The c=0 rule means: sample n items, accept the lot only if zero defects are found. The formula n = log(α) / log(1−p) gives the sample size that provides (1−α)% confidence that the true defect rate is below p when no defects are found. It is simple, conservative, and widely adopted in ISO and automotive quality standards.

CI

Confidence intervals for proportions

A confidence interval tells you the range in which the true defect rate most likely falls, given what you observed. A 95% CI does not mean there is a 95% chance the true rate falls in the interval — it means: if you repeated the sampling many times, 95% of the constructed intervals would contain the true rate.

DPMO

Defects per million opportunities

DPMO = (defects / (n × opportunities)) × 1,000,000. It standardises the defect rate to a per-million scale, allowing comparison across processes with different complexity. A DPMO of 3,400 corresponds to 6 Sigma; 66,800 is 3 Sigma; 308,537 is 2 Sigma. Lower DPMO means better quality.