Skip to content
EN
  • Español
  • English
Advertisement

Sample size and sampling plan calculator

Work out how many parts to inspect from a batch and how many defectives to accept per ISO 2859-1, or the sample size to estimate a proportion or a mean.

Fill in every field but one and the missing one is calculated. You can type in any of them.

—
Usual: 0.65 % for critical defects, 1.5 % or 2.5 % for major and 4.0 % for minor.
Parts to inspect—
Accept the batch with at most (Ac)—
Reject with (Re)—
Code letter—
Probability of accepting a batch exactly at the AQL—
Quality accepted only 10 % of the time—
100 % inspection? (1 yes, 0 no)—
Sample size (rounded up)—
Without population correction—
z value of the confidence—

Use this calculator for reference only, as we cannot guarantee that the results are free of errors.

Disclaimer

https://dyaii.es/en/sample-size-sampling-plan-calculator/

Advertisement

Inspecting a whole batch is expensive; a sample is inspected and a decision is made. The calculator does the two things most asked for: the attribute sampling plan of ISO 2859-1 (how many parts to inspect from a batch and with how many defectives it is accepted or rejected), with the real probability of acceptance, and the statistical sample size to estimate a proportion or a mean with a margin of error, both ways.

ISO 2859-1 sampling plan

  1. With the batch size and the inspection level (II is the normal one), table 1 gives a code letter.
  2. With the letter and the AQL (acceptance quality limit), table 2-A gives the sample size n and the acceptance Ac and rejection Re numbers. If the cell has an arrow, the first plan in its direction is used (with another sample size).
  3. n parts are inspected at random: with Ac defectives or fewer the batch is accepted; with Re or more, rejected.
Batch sizeLetter (level II)nAQL 1.0AQL 2.5AQL 4.0
91–150F200/1 (with 13)1/22/3
281–500H501/23/45/6
501–1200J802/35/67/8
1201–3200K1253/47/810/11
3201–10,000L2005/610/1114/15

This is normal inspection with single sampling. The standard also has tightened and reduced inspection depending on the supplier's history, and double and multiple sampling.

Operating characteristic curve

A plan does not separate good from bad perfectly: the operating characteristic curve (the chart) gives the probability of accepting a batch according to its real percentage of defectives, with the binomial: Pa = Σ C(n,k)·pᵏ·(1−p)ⁿ⁻ᵏ for k = 0…Ac. A batch exactly at the AQL is almost always accepted; the «quality accepted only 10 % of the time» shows how much the plan protects the customer.

Advertisement

Sample size for estimating

Proportion: n₀ = z² · p(1 − p) / E²    Mean: n₀ = (z · σ / E)²
Finite population: n = n₀ / (1 + (n₀ − 1) / N)

z = 1.96 for 95 % and 2.576 for 99 %. Example: survey at 95 % with ± 5 % and p = 50 %: n = 384.2 → 385; if the population is 2000 people, 323.

Several ways to get each value

  • Parts to inspect and when to accept, from the batch, level and AQL.
  • The sample size to estimate a proportion or a mean with the margin you want.
  • The margin your current sample gives: enter the sample size and leave the margin empty.
Advertisement

Frequently asked questions

How many parts do I inspect from a batch of 1000 with an AQL of 1.5?

With ISO 2859-1, level II: letter J, 80 parts; accept with 3 defectives or fewer and reject with 4 or more.

What is the AQL?

The acceptance quality limit: the worst percentage of defectives considered acceptable as an average. A batch exactly at the AQL is almost always accepted (around 90 to 99 %); with much more, it is rejected.

How is the sample size for a survey calculated?

n = z² · p(1 − p) / E². With 95 % confidence (z = 1.96), p = 50 % and ± 5 %: 1.96² · 0.25 / 0.05² = 384.2 → 385. With a population of 2000: 323.

Which inspection level should I use?

Level II is the normal one. Level I is used when less discrimination is enough and III when more is wanted. The special levels S-1 to S-4, when the test is costly or destructive and more risk is accepted.

Related calculators

Share

WhatsApp X LinkedIn Telegram Email
Advertisement

Install Diseño y automatización de instalaciones industriales on your phone

All the calculators one tap away, full screen, like an app. It takes no space and is always up to date.