Sample Size Calculator: 5 Simple Uses for Every Job Role cover image
Prateek Zare

Written by Prateek Zare

Software Developer with ML and Data Expertise, 8+ years of experience

Last updated
Math and Numbers

Sample Size Calculator: 5 Simple Uses for Every Job Role

Every survey starts with the same question: how many people do I need to ask? A sample size calculator answers it from three choices, which are the confidence level, the margin of error and the population, and the right choices depend on your job far more than on the maths.

Below, five roles each get a real scenario, the settings that suit it and the number that comes out. If you want to try your own figures as you read, the sample size calculator runs the same formula in your browser.

The short answerFor a large population, a 95% confidence level and a 5% margin of error need 385 responses. Tighten the margin to 3% and you need 1,068. Loosen to 10% and 97 is enough. A small population needs fewer, for example 278 out of 1,000 people.

What a sample size calculator actually computes

The calculator uses the Cochran formula for a proportion. In plain terms: n₀ = Z² × p × (1 − p) ÷ e². Z comes from your confidence level, p is your guess of how the population splits, and e is the margin of error written as a decimal.

If you know the total population N, a correction follows: n = n₀ ÷ (1 + (n₀ − 1) ÷ N). The result is always rounded up, so 384.16 becomes 385. A partial person cannot answer a survey, and rounding down would quietly weaken your result.

Z scores behind each sample size calculator confidence level
Confidence levelZ scoreTypical use
90%1.645Quick internal checks
95%1.96Standard for reports and papers
99%2.576High stakes or regulated work
99.9%3.291Rare, very high precision

Margin of error is where most people feel the impact. It is the plus or minus range around your result. Here is what different sample sizes buy you at 95% confidence when the answer is close to 50%. A sample size calculator makes that trade visible.

Sample size calculator output: margin of error by sample size, 95% confidence, p = 50%
ResponsesMargin of errorA result of 60% really means
100±9.8 points50.2% to 69.8%
400±4.9 points55.1% to 64.9%
1,000±3.1 points56.9% to 63.1%

Pick your role: five scenarios with real settings

Choose the tab that matches your situation. Each one shows the inputs to enter and the output you should expect.

Scenario: a final year thesis on study habits at a university with 12,000 students. Your supervisor expects 95% confidence and a 5% margin of error. You have no earlier data, so you use 50% for the expected proportion.

Inputs: 95%, 5%, 50%, population 12,000. The infinite population figure is 384.16. With the correction it falls to 372.27, which rounds up to 373 responses.

Tip: write the formula and the inputs in your methods section. Reviewers like to see where the number came from, and 373 with a stated formula is more convincing than a round 400 with no reason. State which sample size calculator or formula you used.

How population size changes the answer

People often assume a bigger population always needs a bigger sample. It does not. Past about 20,000 the answer barely moves, which is why national polls use around 1,000 people. For small groups the effect is large.

Sample size calculator results at 95% confidence, by population and margin of error
Population5% margin3% margin10% margin
20013216966
50021834181
1,00027851788
5,00035788095
10,00037096596
100,0003831,05696
1,000,0003851,06697
Why a sample size calculator gives 385 everywhere

With Z = 1.96, p = 0.5 and e = 0.05, the formula gives (3.8416 × 0.25) ÷ 0.0025 = 384.16. Round up and you get 385. Every guide that quotes it is using this exact line.

Choosing the expected proportion

The expected proportion p is your best guess of the answer you will get. The term p × (1 − p) is largest at 50%, so 50% always gives the biggest sample and the safest one. A lower or higher guess shrinks the requirement, but only use it with real evidence behind it.

Effect of p on the sample size calculator at 95% confidence and a 5% margin, large population
Expected proportionResponses needed
50%385
30%323
20%246
10%139
5%73

Notice the symmetry. A guess of 10% and a guess of 90% give the same answer, because p × (1 − p) is identical for both.

From responses to invitations

The calculator gives completed responses. Nobody answers every invitation, so divide by your expected response rate. This is the step most plans forget. A sample size calculator does not know your response rate.

Invitations needed after a sample size calculator says 385 completed responses
Response rateInvitations to sendTypical channel
30%1,284Customer panel or loyal members
20%1,925Email to existing users
12%3,209Cold email list
8%4,813Pop up or public link

Check the student example by hand

Seeing the arithmetic once makes the tool feel less like a black box. Here is the thesis case from the first tab, worked step by step.

  1. Square the Z score1.96 × 1.96 = 3.8416.
  2. Multiply by p and 1 − p3.8416 × 0.5 × 0.5 = 0.9604.
  3. Divide by e squared0.05 × 0.05 = 0.0025, so 0.9604 ÷ 0.0025 = 384.16.
  4. Apply the correction for 12,000 students384.16 ÷ (1 + 383.16 ÷ 12,000) = 372.27.
  5. Round upThe answer is 373 completed responses.
Sample size calculator quiz: you need 95% confidence and a 5% margin in a company of 800 people. About how many responses do you need?

The infinite population figure is 385, but the correction for N = 800 brings it to 260. That is roughly one third of the company.

What it cannot do

A sample size calculator for surveys sizes a single proportion. It does not size a test that compares two groups, such as two versions of a landing page. That job needs a power calculation with an expected difference between the groups. It also cannot fix a biased sample. A thousand responses from a self selected group are still self selected.

  • It assumes simple random sampling, so every person has an equal chance of being chosen.
  • It assumes honest, complete answers. Missing data raises the numbers you need.
  • Margin of error is about sampling chance only. Poor question wording adds error that no formula measures.
  • If you want to describe the answers afterwards, the statistics calculator gives you the mean, median and spread.
  • To turn counts into shares, the percentage calculator is the quick route.

Enter your own confidence level, margin of error, expected proportion and population, and read the required sample size straight away. The sample size calculator runs in your browser.

Open the Sample Size Calculator

Sample size calculator questions people ask

What is a good sample size calculator result for a survey?

For a large population, 385 responses gives a 5% margin of error at 95% confidence. For a rougher read, around 100 responses gives about plus or minus 10 points.

What confidence level should I use?

Use 95% unless you have a reason not to. Choose 99% when a wrong conclusion is costly, and 90% for quick, reversible decisions.

Does population size matter for sample size?

Only when the population is small. Once it passes roughly 20,000, the required sample barely changes, but under 1,000 the correction can cut the number by a lot.

Why does a sample size calculator round up?

A sample of 384.16 people is impossible, and rounding down to 384 would give a slightly larger margin of error than you asked for. Rounding up is the safe choice.

What should I enter if I do not know the expected proportion?

Enter 50%. It maximises the variance in the formula, so the answer can never be too small.

Can I use a sample size calculator for an A/B test?

Only for a single proportion question. Comparing two versions needs a power calculation based on the size of the difference you want to detect.

Sources: Sample size determination, Wikipedia