InputTestHub

Sample Size Calculator

Works out how many survey responses you need for a target margin of error at any confidence level, with an optional finite population correction.

Calculators Nothing uploaded No sign-up Free, unlimited
Calculators tool
Leave at 50% unless you have solid prior data — it is the value that demands the largest sample and so can never under-deliver.
Optional. Leave at 0 for a large or unknown population.
Enter your figures and press Calculate.
In short Sample size is the margin-of-error formula solved for n: n = z²·p(1−p) ÷ E². At 95% confidence with an assumed 50/50 split, ±5 points needs 385 responses, ±3 points needs 1,068, ±2 points needs 2,401 and ±1 point needs 9,604. Those four numbers show the whole shape of the problem — every halving of the margin costs four times the sample, because the margin falls with √n. Leave the expected result at 50% unless you have real prior data, because p(1−p) is largest there: the 50% assumption produces the biggest sample and therefore cannot under-deliver whatever the true split turns out to be. The population size is usually irrelevant and this surprises people every time. Sampling 1,068 people gives ±3 points whether the population is fifty thousand or fifty million; the correction only bites once you are sampling more than roughly 5% of a small population, which is why it is optional here. Two practical warnings. The number this returns is COMPLETED responses, not invitations — at a 20% response rate you need to contact five times as many people to land it. And it sizes random sampling error alone. A perfectly sized sample drawn from the wrong frame, or one where the people who declined differ systematically from those who answered, is precisely wrong rather than roughly right, and no increase in n repairs either problem.

How to use the Sample Size Calculator

  1. Enter your figures in the input fields.
  2. The result updates as you type, together with the full working.
  3. Check the breakdown table to see exactly how the number was reached.

About the Sample Size Calculator

The number of responses needed for a target margin of error, and what changing that target costs.

What people use it for

  • Planning a survey before running it.
  • Costing how much precision an extra hundred responses buys.
  • Sanity-checking a sample size someone else proposed.

Details

± 5 points at 95% confidence385 responses
± 3 points at 95% confidence1,068 responses
± 2 points at 95% confidence2,401 responses
± 1 point at 95% confidence9,604 responses
Halving the margin costsfour times the sample

The maths behind it

This tool uses n = z² · p(1 − p) ÷ E², corrected to n·N ÷ (n + N − 1) when a finite population is given. Every intermediate value is shown on screen, so the result can be checked by hand.

The page feeds its own answer back through the margin-of-error formula and prints what that sample actually achieves, so the round trip is visible rather than assumed.

Where this tool stops

This sizes random sampling error only, and it assumes a genuine random sample. It cannot size the error from non-response or from a frame that misses part of the population, which are usually the larger risks.

Frequently asked questions

Does the population size matter?
Rarely. Below about 5% sampled it changes nothing measurable, which is why national polls of a thousand people work identically for very different country sizes. It only matters when the sample is a large share of a small population.
What should I put for the expected result?
50%, unless you have solid prior data. It maximises p(1 − p) and therefore the required sample, so it is the safe assumption — any other split needs fewer people, not more.
Is this the number of people to invite?
No — it is the number of completed responses. Divide by your expected response rate to get the number to contact, which is usually several times larger.
What sample size is "statistically significant"?
The phrase does not apply to a sample size. Significance is a property of a test result, not of a sample. What a sample size buys is precision, and that is what this page quantifies.
Is the Sample Size Calculator free?
It is free, with no account, no trial and no daily cap. Every calculators tool on inputtesthub.com works the same way: open the page and use it.
Does anything I enter leave my computer?
No. The Sample Size Calculator runs entirely in your browser using JavaScript. Because the work happens locally, the tool also keeps working if your connection drops, and closing the tab is all it takes to discard everything.
What is the equation behind the Sample Size Calculator?
It uses n = z² · p(1 − p) ÷ E², corrected to n·N ÷ (n + N − 1) when a finite population is given. The full working is printed under the result, so you can follow every step rather than trusting a black box.
What does a typical result look like?
Enter ± 3%, 95% confidence and the Sample Size Calculator returns 1,068 responses.
Who is the Sample Size Calculator for?
The most common reasons people reach for it: planning a survey before running it. Costing how much precision an extra hundred responses buys. Sanity-checking a sample size someone else proposed. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
Is there anything the Sample Size Calculator cannot do?
This sizes random sampling error only, and it assumes a genuine random sample. It cannot size the error from non-response or from a frame that misses part of the population, which are usually the larger risks. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What figures does the Sample Size Calculator work from?
± 5 points at 95% confidence is 385 responses. ± 3 points at 95% confidence is 1,068 responses. ± 2 points at 95% confidence is 2,401 responses. These are printed on the page itself, so you do not have to take them on trust.
How precise is the result?
The calculation runs in double precision and the result is shown to ten significant figures, so converting a value and converting it back returns the original. What is displayed is rounded for readability; what is copied is not.

Related calculators tools

All 382
01

Loan Calculator

Works out the monthly payment, total interest and full repayment schedule for any loan from…

02

EMI Calculator

Calculates your Equated Monthly Instalment with a full principal-versus-interest breakdown and…

03

Mortgage Calculator

Estimates a full monthly housing payment including principal, interest, property tax…

04

Car Loan Calculator

Calculates a car finance payment from the price, deposit, trade-in, interest rate and term…

05

Personal Loan Calculator

Works out instalments and total cost for an unsecured personal loan, including any processing…

09

SIP Calculator

Projects the maturity value of a monthly Systematic Investment Plan, showing invested amount…