Skip to content
K Knidox Search…
Statistics · Design

Sample Size Calculator

How many participants you need for a target margin of error and confidence.

Common settings — tap to load
Required sample size
385participants

Use p = 50% for the most conservative (largest) sample.

Sample size for a proportion is n = z² · p(1 − p) ÷ E². At 95% confidence (z = 1.96), an unknown proportion (p = 0.5), and a ±5% margin: n = 1.96² × 0.25 ÷ 0.05² = 384.16 → round up to 385 participants.

Planning a survey or study

Sample size balances precision against cost. A tighter margin of error or a higher confidence level both demand more participants, and because the margin shrinks with √n, each gain in precision costs disproportionately more people. This tool inverts the confidence-interval formula to solve for the minimum n that meets your targets.

n = z² · p(1 − p) ÷ E²

for a proportion; for a mean, n = (z · σ ÷ E)²

Worked example

A yes/no survey at 95% confidence (z = 1.96), unknown proportion (p = 0.5), and a ±5% margin of error.

  1. 1
    Maximize the variance term. With p unknown, use p = 0.5, so p(1 − p) = 0.5 × 0.5 = 0.25.
  2. 2
    Plug into the formula. n = 1.96² × 0.25 ÷ 0.05² = 0.9604 ÷ 0.0025 = 384.16.
  3. 3
    Always round up. A fractional person isn’t possible, so round 384.16 up to 385 participants.

Sample size for a proportion (p = 0.5)

Participants needed at common confidence levels and margins of error.

Margin90% (z=1.645)95% (z=1.96)99% (z=2.576)
±10%6897166
±5%271385664
±3%7521,0681,844
±1%6,7669,60416,590

Choosing inputs and adjusting the result

Why p = 50% is the default. The term p(1 − p) is largest at p = 0.5, so using it gives the most conservative — biggest — sample. If you have a solid prior estimate of the proportion, plugging it in lowers the required n.

Proportion vs mean. Use the proportion mode for yes/no questions; use the mean mode, n = (z · σ ÷ E)², when estimating an average and you have a known or estimated population standard deviation.

Finite populations. The formula assumes a large population. For a small, finite one, apply the correction n′ = n ÷ (1 + (n − 1) ÷ N), which can sharply reduce the number needed.

Plan for non-response. This n is the number of completed responses you need. Inflate your invitations to cover the people who won’t reply — divide n by your expected response rate.

Why is p = 50% the default?
A proportion of 0.5 maximizes p(1−p), giving the largest — and therefore safest — required sample when the true proportion is unknown.
Do I need a population size?
For large populations the formula is independent of size. For small finite populations, apply the finite-population correction afterward, which can reduce the number needed.
What confidence level is standard?
95% is the convention in most academic and survey work, leaving a 5% chance the true value falls outside the interval.
Why round up instead of to the nearest whole number?
Rounding down would leave the margin of error slightly wider than your target, so the minimum n is always rounded up.
How do I account for people who don’t respond?
Divide the required n by your expected response rate to get the number of invitations to send. For a 40% response rate, send n ÷ 0.4.
How do I size a sample for a mean instead of a proportion?
Switch to the mean formula n = (z · σ ÷ E)², where σ is your known or estimated population standard deviation and E is the margin of error in the same units.