Change language

Learn to calculate by playing with Sample size calculator

A short game to see where the result comes from. Pick a language and start; you can stop halfway and come back.

Loading the game…

← Back to Sample size calculator

What you will practise

How many responses you need to estimate a percentage or a mean, with finite population, design effect and response rate.

How it works

First it works out the size for an infinite population; then it corrects for a finite population (which lowers it when the universe is small) and multiplies by the design effect if sampling is not simple random. The result is rounded up.

The response rate does not change the responses you need, but it does change how many people you must invite: responses ÷ rate. With an expected percentage of 50% the sample is the largest possible, which is why it is the cautious choice when you have no prior estimate.

Formula

Percentage: n₀ = z² · p · (1 − p) / e²
Mean: n₀ = ( z · σ / E )²
Finite population: n = n₀ / (1 + (n₀ − 1) / N)
Design effect: final n = n · deff (rounded up)
Invitations = final n / response rate
z = 1.960 at 95%; 1.645 at 90%; 2.576 at 99%

Worked example

Example 1. An opinion poll.
Very large population, 95% confidence, ±5-point margin and a 50% proportion (the cautious choice): n = 1.96² × 0.25 / 0.05² = 384.1, so you need 385 responses. With ±3 points it is 1,068; with ±1 point, 9,604.

Example 2. A school of 2,000 pupils.
Same criteria but a population of 2,000: n₀ = 384.1 and n = 384.1 / (1 + 383.1/2,000) = 322.3, that is, 323 pupils (16.2% of the school) instead of 385.

Example 3. Estimating a mean.
You want the average score on a test whose standard deviation is about 15 points, with ±2 points of error and 95% confidence: n = (1.96 × 15 / 2)² = 216.1, so 217 people. If the group is 500, it drops to 152.

Example 4. Cluster sampling and low response.
The same survey as example 1, but by clusters (design effect of 1.5) and a 30% response rate: 385 × 1.5 = 577 valid responses, and to get them you have to invite 577 / 0.30 = 1,924 people.

How to play

First pick your language. Then work through the challenges one by one: each sets out a case with real numbers and, if you get stuck, you can ask for a hint. When you answer, you see whether you got it right and why. Progress is saved only in your browser, so you can stop halfway and carry on another day.