Skip to main content

Calcu.fit

Sample Size Calculator: How Many Responses Do You Need?

Use this free sample size calculator to find how many people you need to survey. Enter your confidence level, margin of error, and population size, and the calculator shows the required sample size. It also supports Slovin’s formula, sample size for a mean, and a quick estimate for comparing two groups. Steps are included. No signup needed.

Sample Size Calculator

Sample size inputs

Use 50% if the expected proportion is unknown.

Leave blank for a large or unknown population.

Use 1 for a simple random sample.

Required sample size
385
Completed responses
Initial sample size384.16
Final sample size385
Z-score1.960
Confidence level95%
Invitations needed385

Calculation steps

  1. Confidence level = 95%, Z = 1.96.
  2. Margin of error = 0.05.
  3. Expected proportion = 0.50.
  4. n₀ = Z² × p × (1 − p) ÷ e².
  5. n₀ = 384.16.
  6. Round up to get a sample size of 385.

Formula used

n₀ = z² × p × (1 − p) ÷ e²

Cochran's formula estimates the sample size needed for a survey proportion. A finite population correction is applied when population size is provided.

Confidence level reference

80% confidenceZ = 1.282
90% confidenceZ = 1.645
95% confidenceZ = 1.960
99% confidenceZ = 2.576

Sample sizes are rounded up to the next whole number. Results assume the statistical method and inputs are appropriate for your study. Complex, clinical or regulated research may require a professional power analysis.

How to Use This Sample Size Calculator

For a survey (proportion):

  1. Choose the confidence level (90%, 95%, or 99%). 95% is the most common.
  2. Enter the margin of error you can accept, such as 5%.
  3. Enter the expected proportion (p). If you do not know it, use 50%, which gives the largest, safest sample.
  4. Enter the population size (N). Leave it blank if the population is very large or unknown.
  5. Click Calculate.

For a mean:

  1. Choose the confidence level.
  2. Enter the margin of error in the same units as your measurement.
  3. Enter the standard deviation (σ).
  4. Click Calculate.

With Slovin’s formula: enter the population size and the margin of error.

What You’ll See in Your Results

  • The required sample size, rounded up to a whole number
  • The sample size before and after the correction for a small population
  • The number of invitations you need, if you enter an expected response rate
  • The z-score used for your confidence level
  • Steps using your numbers

What Is Sample Size?

The sample size is the number of people (or items) you collect data from. A bigger sample gives results that are closer to the truth for the whole population, but it costs more time and money. The goal is a sample that is large enough for the precision you need.

Three things decide the sample size for a survey:

  • Confidence level: how sure you want to be that the true value falls inside your margin of error. Common choices are 90%, 95%, and 99%.
  • Margin of error: how far the result can be from the true value, such as ±5%.
  • Variability: how spread out the answers are. For a yes/no question, this is the expected proportion p. For a number, it is the standard deviation.

The population size matters only when the population is small.

Z-Scores for Common Confidence Levels

Confidence levelz-score
80%1.282
90%1.645
95%1.960
99%2.576

Sample Size Formulas

Sample size for a proportion (Cochran’s formula):

n₀ = z² × p × (1 − p) ÷ e²

where z is the z-score, p is the expected proportion (use 0.5 if unknown), and e is the margin of error as a decimal.

Finite population correction (for a small population of size N):

n = n₀ ÷ (1 + (n₀ − 1) ÷ N)

Sample size for a mean:

n = (z × σ ÷ E)²

where σ is the standard deviation and E is the margin of error in the units of the data.

Slovin’s formula:

n = N ÷ (1 + N × e²)

Margin of error for a given sample size (proportion):

e = z × √[p(1 − p) ÷ n]

Adjusting for non-response:

Invitations = Sample size ÷ Response rate

Always round up to the next whole number.

Sample Size Calculator Examples

All sample sizes are rounded up. These examples use z = 1.96 for 95% confidence.

Example 1: A Large or Unknown Population

95% confidence, ±5% margin of error, p = 0.5.

  • n = 1.96² × 0.5 × 0.5 ÷ 0.05²
  • n = 3.8416 × 0.25 ÷ 0.0025 = 384.16
  • Sample size: 385

Example 2: A Smaller Margin of Error

95% confidence, ±3% margin of error, p = 0.5.

  • n = 3.8416 × 0.25 ÷ 0.0009 = 1,067.1
  • Sample size: 1,068

Example 3: A Higher Confidence Level

99% confidence (z = 2.576), ±5%, p = 0.5.

  • n = 2.576² × 0.25 ÷ 0.0025 = 663.6
  • Sample size: 664

Example 4: A Lower Confidence Level

90% confidence (z = 1.645), ±5%, p = 0.5.

  • n = 1.645² × 0.25 ÷ 0.0025 = 270.6
  • Sample size: 271

Example 5: A Known Proportion

95% confidence, ±5%, and you expect about 30% to say “yes” (p = 0.3).

  • n = 3.8416 × 0.3 × 0.7 ÷ 0.0025 = 322.7
  • Sample size: 323

A p-value away from 0.5 needs a smaller sample. If you are not sure, use 0.5.

Example 6: A Finite Population (N = 2,000)

95% confidence, ±5%, p = 0.5, and a population of 2,000.

  • n₀ = 384.16
  • n = 384.16 ÷ (1 + 383.16 ÷ 2,000) = 384.16 ÷ 1.1916 ≈ 322.4
  • Sample size: 323

Example 7: A Small Population (N = 500)

  • n = 384.16 ÷ (1 + 383.16 ÷ 500) ≈ 217.5
  • Sample size: 218

Example 8: A Very Small Population (N = 50)

  • n = 384.16 ÷ (1 + 383.16 ÷ 50) ≈ 44.3
  • Sample size: 45

Example 9: Slovin’s Formula

N = 10,000 and e = 0.05.

  • n = 10,000 ÷ (1 + 10,000 × 0.0025) = 10,000 ÷ 26 ≈ 384.6
  • Sample size: 385

N = 2,000 and e = 0.05:

  • n = 2,000 ÷ (1 + 2,000 × 0.0025) = 2,000 ÷ 6 ≈ 333.3
  • Sample size: 334

Example 10: Sample Size for a Mean

You want to estimate the average with a margin of ±2 units, the standard deviation is about 15, and you want 95% confidence.

  • n = (1.96 × 15 ÷ 2)² = 14.7² = 216.1
  • Sample size: 217

Example 11: Adjusting for a Response Rate

You need 385 completed responses, and you expect 60% of invited people to respond.

  • Invitations = 385 ÷ 0.60 = 641.7
  • Invite 642 people

At an 80% response rate, you would need 385 ÷ 0.80 = 481.25, which rounds up to 482.

Example 12: Cluster Sampling (Design Effect)

If you sample by clusters, such as villages or schools, you may need a larger sample. With a design effect of 1.5:

  • 384.16 × 1.5 = 576.2
  • Sample size: 577

Example 13: Margin of Error from a Given Sample

You have 400 responses, p = 0.5, and 95% confidence.

  • e = 1.96 × √(0.25 ÷ 400) = 1.96 × 0.025 = 0.049
  • Margin of error: about ±4.9%

Example 14: Comparing Two Groups (Proportions)

You want to detect a difference between 40% and 50% in two groups, with 95% confidence (two-sided) and 80% power.

  • n per group = (1.96 + 0.8416)² × (0.4 × 0.6 + 0.5 × 0.5) ÷ (0.10)²
  • n per group = 7.849 × 0.49 ÷ 0.01 = 384.6
  • Sample size: 385 per group (770 in total)

Comparing groups needs power analysis, and the numbers can be much larger than a simple survey. Use this as a rough guide only.

Example 15: Comparing Two Means

You want to detect a difference of 5 units between two groups, with σ = 10, 95% confidence, and 80% power.

  • n per group = 2 × (1.96 + 0.8416)² × σ² ÷ difference²
  • n per group = 2 × 7.849 × 100 ÷ 25 = 62.8
  • Sample size: 63 per group

Sample Size by Margin of Error (95% Confidence, p = 0.5)

Margin of errorSample size (large population)
±1%9,604
±2%2,401
±3%1,068
±4%601
±5%385
±10%97

Effect of Population Size (95% Confidence, ±5%, p = 0.5)

Population (N)Sample size (with correction)Slovin’s formula (e = 0.05)
200132134
500218223
1,000278286
2,000323334
5,000357371
10,000370385
100,000383399

The sample size barely changes once the population passes a few thousand. A population of 100,000 and one of 10 million need almost the same sample.

Slovin’s Formula and Krejcie-Morgan Table

Slovin’s formula (n = N ÷ (1 + Ne²)) is popular in student research because it is simple. Be aware of its limits:

  • It does not use a confidence level or the variability of the data.
  • It is based on an unstated assumption that the population is not too variable.
  • It gives a larger sample than Cochran’s formula for the same population, as the table above shows.
  • Some supervisors and journals do not accept it without a reason.

Krejcie and Morgan (1970) published a table of sample sizes for 95% confidence, ±5%, and p = 0.5. Its values are about the same as Cochran with the finite population correction, and may differ by 1 because of rounding (for example, 322 or 323 for a population of 2,000). Check which method your institution expects.

Important Notes About Sampling

  • The formulas assume a simple random sample, where everyone has an equal chance of being picked. Convenience samples can be biased, no matter how large they are.
  • A big sample does not fix bias, such as a badly worded question or people who refuse to answer.
  • Non-response reduces your sample, so invite more people than you need.
  • If you plan to report subgroups (for example, by gender or region), each subgroup needs enough people, so the total sample may need to be larger.
  • If your population has very different parts, stratified sampling can give better results than a simple random sample.
  • Use the margin of error you can live with. Halving the margin of error needs about four times the sample.

What About Clinical or Regulated Research?

This calculator is for general survey and educational use. Clinical trials, medical studies, and regulated research need a proper power analysis and a plan from a statistician or biostatistician. They depend on the study design, the endpoints, expected dropouts, and ethics rules. Do not use this calculator alone for those decisions.

Common Mistakes

  • Using the wrong margin of error. ±5% is 0.05 in the formula, not 5.
  • Not rounding up. 384.16 means 385 people, not 384.
  • Using the population size when it is huge. It does not change the answer much.
  • Forgetting non-response. Plan for the people who will not reply.
  • Using a sample size for a proportion when you want to estimate a mean.
  • Using p other than 0.5 without good evidence. If you are unsure, 0.5 is the safe choice.
  • Believing that a large sample means no bias.

Tips for Using a Sample Size Calculator

  • Decide on your confidence level and margin of error before you start.
  • Use p = 50% if you have no prior estimate.
  • Add a buffer for non-response and incomplete forms.
  • Plan the sample size for the smallest subgroup you want to report on.
  • Say how you calculated your sample size in your report or thesis, and cite the formula.
  • If you cannot reach the full sample size, report the actual margin of error you got.
  • Ask a statistician for complex designs.

Sample Size Calculator vs. Other Tools

  • Percentage Calculator: percent of a number, and percent change.
  • Percent Error Calculator: how far a measurement is from the accepted value.
  • Scientific Calculator: powers, roots, logs, and more.
  • Fraction Calculator: add, subtract, multiply, and divide fractions.
  • Log Calculator: logarithms of any base.

Frequently Asked Questions (FAQ)

How do I calculate sample size?

For a proportion, use n = z² × p × (1 − p) ÷ e². For 95% confidence, a ±5% margin of error, and p = 0.5, that is 1.96² × 0.25 ÷ 0.0025 = 384.16, so you need 385 people.

It depends on your confidence level and margin of error. For 95% confidence and ±5%, you need about 385 for a large population. For ±3%, about 1,068.

 It depends on your purpose. ±5% is common for general surveys, and ±3% for more precise results. A smaller margin of error needs a much larger sample.

95% is the most common. Use 99% if you need to be more certain, but it requires a larger sample. 90% is sometimes used for exploratory work.

Because p × (1 − p) is largest at 0.5, it gives the biggest sample size. It is the safest choice when you have no estimate.

Only when the population is small. For large populations, the sample size barely changes. For small ones, the finite population correction lowers the sample size.

It reduces the sample size when your sample is a large share of the population: n = n₀ ÷ (1 + (n₀ − 1) ÷ N).

n = N ÷ (1 + N × e²), where N is the population and e is the margin of error. It is simple, but it does not use a confidence level or the variability of the data.

Many students do, but check with your supervisor. Cochran’s formula with a finite population correction is usually easier to justify because it uses a confidence level.

Divide the sample size by the expected response rate. For 385 responses at a 60% response rate, invite 385 ÷ 0.60 ≈ 642 people.

Use n = (z × σ ÷ E)². With σ = 15, E = 2, and 95% confidence, n = (1.96 × 15 ÷ 2)² ≈ 217.

Yes. It is free, with no registration and no limits.

It uses standard formulas and the numbers you enter. It assumes a random sample, and the result is an estimate that is rounded up.

Disclaimer

This calculator is for general and educational use. It assumes a simple random sample and standard formulas, and it does not account for bias, non-response, or complex designs unless you add those inputs. For clinical trials, medical research, regulated studies, or high-stakes decisions, consult a qualified statistician. Follow the rules of your institution or journal on the method and how you report it.