Lot Size Calculator for Quality Control

Choose confidence, error bounds, and defect estimates for sampling. Get acceptance guidance using AQL and risk settings. Download results as CSV and PDF instantly.

Calculator Inputs

Total units produced in the lot.
Higher confidence increases sample size.
Half-width of the interval for defect rate.
Use 50% for conservative sizing.
Acceptable Quality Level for producer risk.
Target: P(reject | AQL) ≤ α.
Lot Tolerance Percent Defective for consumer risk.
Target: P(accept | LTPD) ≤ β.

Formula Used

  • Initial sample size (proportion): n₀ = (Z² · p · (1−p)) / E²
  • Finite population correction: n = n₀ / (1 + (n₀−1)/N)
  • Acceptance number (binomial model): Choose smallest c such that P(X ≤ c | p=AQL) ≥ 1−α, where X ~ Bin(n, p).
This tool supports attribute inspection planning using a simple operating characteristic check at AQL and LTPD.

How to Use This Calculator

  1. Enter your lot size and target confidence.
  2. Set margin of error and defect estimate.
  3. Provide AQL, α, LTPD, and β targets.
  4. Click calculate to get n and acceptance limits.
  5. Download CSV or PDF for documentation needs.
If you lack a defect estimate, use 50% for a conservative sample size.

Example Data Table

Lot Size (N) Confidence Margin (%) Defect Est. (%) Sample (n) AQL (%) α (%) c Reject at
50095%5101091534
5,00095%351951545
20,00099%223200.65556
Examples are illustrative. Validate critical plans against your applicable standard and inspection level.

Professional Notes

Sampling size and decision risk

A lot sample is a trade‑off between assurance and inspection effort. This calculator uses confidence (Z) and margin of error (E) to size n for estimating the defect proportion. For example, with N=5,000, 95% confidence, E=3%, and an estimated defect rate of 5%, the sample typically falls near the low hundreds, not thousands. When the estimate is unknown, using 50% makes p(1−p) largest and produces the most conservative n.

Finite population correction matters

If you inspect a meaningful fraction of the lot, finite population correction reduces the required sample because each inspected unit removes uncertainty from the remaining pool. The correction is most noticeable for small lots. For instance, a computed n₀=400 on a lot of N=500 is adjusted downward by FPC, preventing over‑inspection while keeping the same confidence and error target.

AQL, LTPD, and acceptance limits

The acceptance number c connects sampling to pass/fail decisions. Using a binomial model, this tool selects the smallest c where P(X≤c | p=AQL) ≥ 1−α. With AQL=1.0% and α=5%, the plan aims to reject good lots no more than 5% of the time. LTPD provides a consumer‑side check: if P(accept | LTPD) is above your β target, increase n or tighten the decision threshold.

Interpreting expected defects in the sample

Expected defects are calculated as n·p and help with staffing and rework planning. A sample of n=200 at an estimated 2% defect rate implies about 4 defects on average, but actual counts vary. Use this estimate to allocate inspection time, confirm spare parts availability, and set escalation triggers for repeated nonconformance.

Operational use in audits and supplier control

In supplier qualification, keep a stable confidence and error policy so results are comparable across months. In internal audits, export the CSV for traceability and the PDF for sign‑off packets. When standards require specific sampling tables, use this calculator for planning and sensitivity checks, then document the final plan that matches your governing procedure.

FAQs

1) What does the recommended sample size represent?

It is the number of units to inspect to estimate the defect rate within your chosen margin of error at the selected confidence level, adjusted for finite lot size.

2) When should I use a 50% defect estimate?

Use 50% when historical defect data is missing or unreliable. It yields the largest sample for a given confidence and error target, providing a conservative inspection plan.

3) How is the acceptance number (c) calculated?

The tool searches for the smallest c such that the probability of accepting a lot at the AQL is at least 1−α, using a binomial model.

4) Why is my consumer risk check failing at LTPD?

If P(accept | LTPD) is higher than your β target, the plan is too lenient. Increase sample size, lower c, or use a stricter LTPD.

5) Does this replace formal sampling standards?

No. It supports planning, sensitivity checks, and documentation. If your organization follows a specific standard, validate the final sample plan against that standard’s tables and procedures.

6) What is the best way to document results for audits?

Export the PDF for sign‑off, attach the CSV to your inspection record, and note the inputs used (N, confidence, margin, AQL, α, LTPD, β) so the plan can be reproduced exactly.

White theme Single-page tool with exports and documentation sections.

Related Calculators

AQL Sample SizeAcceptance Sampling PlanInspection Level SelectorRandom Sample GeneratorSampling Plan FinderDouble Sampling PlanSwitching Rules ToolInspection Severity SelectorAQL Lookup TableNormal Inspection Plan

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.

?>