Loona Calculators
Loona Calculators › Maths › Sample Size Calculator

👥 Sample Size Calculator

Work out how large a sample you need before you run the survey: for estimating a proportion (like a poll) or a mean, given your confidence level and acceptable margin of error — with optional correction for a small population.

Quick answer: For a proportion at 95% confidence and ±5% margin, using the safe p = 0.5: n = 1.96² × 0.25 ÷ 0.05² = 384.16, so you need 385 responses. It is the most quoted sample-size result in research methods.

How to use the Sample Size Calculator

  1. Choose proportion or mean.
  2. For a proportion, enter the expected proportion (use 0.5 if unsure — it gives the largest, safest sample).
  3. Enter your margin of error (as a decimal for proportions: 0.05 = ±5 points) and confidence level.
  4. Optionally enter the population size to apply the finite population correction.
Example: A town of 2,000 voters, 95% confidence, ±5%: the uncorrected n is 385; with the finite population correction, n = 385 ÷ (1 + 384 ÷ 2000) ≈ 323 voters actually needed.

Frequently Asked Questions

Why does p = 0.5 give the biggest sample?

The variance p(1−p) is maximised at p = 0.5. If the true proportion is near 0.5 you need the most data; if you know it is nearer 0.1 or 0.9, a smaller sample achieves the same margin.

What is the finite population correction?

When your sample is a noticeable fraction of a finite population, sampling without replacement is more precise than the infinite-population formula assumes. The correction n_adj = n ÷ (1 + (n − 1) ÷ N) reduces the required sample for small populations.

How does margin of error trade off against cost?

Halving the margin quadruples the sample: ±5% needs 385, ±2.5% needs about 1,537, ±1% needs about 9,604 (all at 95%, p = 0.5). Precision is bought quadratically.

Does a bigger population need a bigger sample?

Barely, once the population is large — a country of 200 million needs almost the same 385 as a city of 200,000 for the same margin. Sample size is driven by the margin you demand, not population size.

Related Calculators

%

Percentage Calculator

Maths

📊

Statistics Calculator

Maths

½

Fraction Calculator

Maths

🧮

Equation Solver

Maths

🔬

Scientific Calculator

Maths

📐

Average Calculator

Maths

🔔

Z-Score Calculator

Maths

🎲

Probability Calculator

Maths

How it works — the formula

Proportion: n = z² × p(1 − p) ÷ E², rounded up. Mean: n = (z × σ ÷ E)², rounded up. Finite population correction: n_adj = n ÷ (1 + (n − 1) ÷ N), rounded up. z comes from the confidence level (1.645 / 1.960 / 2.576).

Worked example

Inputs: proportion, p = 0.5, E = 0.05, 95% (z = 1.96).

Steps: n = 1.96² × 0.5 × 0.5 ÷ 0.05² = 3.8416 × 0.25 ÷ 0.0025 = 0.9604 ÷ 0.0025 = 384.16 → round up to 385. With a population of 2,000: 385 ÷ (1 + 384 ÷ 2000) = 385 ÷ 1.192 = 322.99 → 323. Mean check: σ = 15, E = 5 → (1.96 × 15 ÷ 5)² = 5.88² = 34.57 → 35.

Result: 385 (or 323 in a town of 2,000); 35 for the mean case.

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.