Skip to content
Calculator Tools
A/B Testing Calculators

Sample Size Calculator

How many survey responses or A/B test users you need for a given confidence level, margin of error and population.

Enter values

Results update as you type.

Result

Sample size

377

Without population correction
385
z-score
1.96

About the Sample Size Calculator

How many survey responses or A/B test users you need for a given confidence level, margin of error and population.

Also known as: survey sample size, ab test sample size, statistical sample size, margin of error sample size.

How to use this calculator

  1. Enter confidence level, margin of error, expected proportion, population size (optional).
  2. The result updates instantly as you type — press Calculate (or Enter) at any time.
  3. Review the breakdown shown under the main result.
  4. Use Copy result or Share to save the answer or send a link with your inputs.

Formula

n₀ = z²·p(1 − p)/e² · n = n₀ / (1 + (n₀ − 1)/N)

Worked example

Using the values pre-filled in the calculator above:

  • Confidence level: 95%
  • Margin of error = 5 %
  • Expected proportion = 50 %
  • Population size (optional) = 20,000

the calculator returns:

  • Sample size: 377
  • Without population correction: 385
  • z-score: 1.96