This free sample size calculator tells you how many people to survey or test. Set a margin of error, confidence level and (optionally) your population size to get the survey sample size with the finite population correction, design effect and response-rate adjustment. It also finds the sample size for estimating a mean, works backwards to the margin of error from a sample size, and runs a power analysis for comparing two means (exact t-test power) or two proportions (A/B tests). Every answer shows step-by-step working, and the survey modes include TI-84 keystrokes.
Contents
How to Use the Sample Size Calculator
- Pick your goal. Survey / proportion for percentages (polls, satisfaction, yes/no questions), Estimate a mean for averages, Margin of error from n if you already know your sample size, or one of the two power tabs to compare groups.
- Set the precision. Choose a confidence level (tap 90%, 95% or 99%) and the margin of error you can accept, for example ±5%.
- Add what you know. Leave the expected proportion at 50% if you have no idea (it gives the safest, largest sample). Enter a population size only when your population is small and known, such as 800 employees.
- Read the answer. The sample size updates as you type, with the formula steps, a table for other margins and confidence levels, and how the answer changes with population size. Copy share link saves your inputs in the URL.
Sample Size Formula (Cochran) for Surveys
For a survey that estimates a percentage, the standard formula is Cochran’s:
n₀ = z² · p(1 − p) / E²
- z is the critical value for your confidence level (1.96 for 95%).
- p is the expected proportion as a decimal. If you don’t know it, use 0.5. That makes p(1 − p) = 0.25, its largest value, so the sample is big enough whatever the true answer is.
- E is the margin of error as a decimal (±5% → 0.05).
Worked example: 95% confidence, ±5% margin, p = 0.5: n₀ = 1.95996² × 0.5 × 0.5 / 0.05² = 384.15. Always round up, so you need 385 completed responses. That is the familiar “385” you see on most survey calculators.
For cluster or stratified samples, multiply n₀ by the design effect (DEFF, often 1.5–2). To find how many invitations to send, divide the sample size by the expected response rate: 385 responses at a 30% response rate means about 1,284 invitations.
Finite Population Correction: Does Population Size Matter?
When your population is small, and the sample would be a noticeable share of it, apply the finite population correction (FPC):
n = n₀ / (1 + (n₀ − 1) / N)
Worked example: a company with N = 800 employees, 95% confidence, ±5%: n = 384.15 / (1 + 383.15 / 800) = 259.75 → 260 responses. With a 30% response rate, invite 867 people.
| Population N | 100 | 500 | 1,000 | 5,000 | 10,000 | 100,000 | Very large |
|---|---|---|---|---|---|---|---|
| Sample n (95%, ±5%) | 80 | 218 | 278 | 357 | 370 | 383 | 385 |
Population size barely matters once it is in the tens of thousands, which is why a national poll and a city poll both need about 1,000 people for ±3%.
Sample Size Table by Margin of Error and Confidence Level
Sample sizes for a large population with p = 50% (worst case), rounded up:
| Margin of error | 90% confidence | 95% confidence | 99% confidence |
|---|---|---|---|
| ±1% | 6,764 | 9,604 | 16,588 |
| ±2% | 1,691 | 2,401 | 4,147 |
| ±3% | 752 | 1,068 | 1,844 |
| ±4% | 423 | 601 | 1,037 |
| ±5% | 271 | 385 | 664 |
| ±10% | 68 | 97 | 166 |
Halving the margin of error needs about four times the sample, because n grows with 1/E².
Z-Values for Common Confidence Levels
| Confidence level | 80% | 85% | 90% | 95% | 98% | 99% | 99.9% |
|---|---|---|---|---|---|---|---|
| z (two-sided) | 1.2816 | 1.4395 | 1.6449 | 1.9600 | 2.3263 | 2.5758 | 3.2905 |
z = invNorm(1 − α/2), where α = 1 − confidence. You can get any of these on a TI-84 with invNorm(; see the steps below or use our normal distribution calculator.
Sample Size for Estimating a Mean
n₀ = (z · σ / E)²
σ is the population standard deviation (take it from a pilot study or past data; a rough guess is range ÷ 4). E is the margin of error in the same units.
Worked example: estimate average commute time within ±2 minutes at 95% confidence with σ = 12 minutes: n₀ = (1.96 × 12 / 2)² = 138.29 → 139. Because you’ll estimate σ with the sample SD and use a t-interval, the calculator also gives a t-adjusted n (141 here), the smallest n where tn−1 · σ/√n ≤ E. Use it for small samples. Need the interval afterwards? Use our confidence interval calculator.
Margin of Error from a Sample Size
E = z · √(p(1 − p) / n) · √((N − n)/(N − 1))
The last factor is the FPC; leave it out for a large population. Example: 1,000 respondents, 95% confidence, p = 0.5: E = 1.96 × √(0.25/1000) = 0.0310 → ±3.1%. For 400 respondents out of a population of 2,000, E = ±4.4%.
Power Analysis: Sample Size for Comparing Two Means
To compare two groups with a test, precision isn’t enough. You also need power (1 − β), the chance of detecting a real difference. For a two-sample t-test with equal groups:
n per group ≈ 2 (z1−α/2 + z1−β)² / d², with Cohen’s d = Δ / σ
Worked example: detect a 5-point difference with σ = 10 (d = 0.5), α = 0.05 two-sided, 80% power. The normal formula gives 62.8 → 63. The calculator then solves the exact noncentral t power (the same method as G*Power and Python statsmodels) and gives 64 per group, 128 in total. At 90% power you need 86 per group. Unequal groups (allocation ratio) and expected dropout are supported. After you collect the data, analyse it with our hypothesis test calculator.
| Effect size d | 0.2 (small) | 0.5 (medium) | 0.8 (large) |
|---|---|---|---|
| n per group (α = 0.05, 80% power) | 394 | 64 | 26 |
Sample Size for Two Proportions (A/B Test)
n₁ = [zα√(p̄q̄(1 + 1/k)) + zβ√(p₁q₁ + p₂q₂/k)]² / (p₁ − p₂)²
Here p̄ = (p₁ + k·p₂)/(1 + k), q = 1 − p, and k = n₂/n₁ (1 for equal groups). Example A/B test: baseline conversion 10%, hoping for 12% (a 20% relative lift), α = 0.05 two-sided, 80% power → 3,841 visitors per variant (7,682 in total). The results also show Cohen’s h method (3,835), the unpooled formula (3,839) and the Fleiss continuity-corrected value (3,941), so you can match whichever method your team or textbook uses. Analyse the finished test with our chi-square calculator.
How to Calculate Sample Size on a TI-84
The TI-84 has no sample size command, but it does the arithmetic in three lines:
- Press 2nd VARS (DISTR), choose 3:invNorm(, type
0.975for 95% confidence, then press STO→ ALPHA MATH (Z) and ENTER. The screen shows 1.959963985. - Type
Z²*0.5*0.5/0.05²and press ENTER. The result is 384.1458821. - For a finite population type
Ans/(1+(Ans−1)/800)and press ENTER (259.7454…). Round up to 260.
For margin of error, run STAT → TESTS → A:1-PropZInt; the margin is half the interval width. Try it on our TI-84 Plus CE calculator online.
Why This Sample Size Calculator Is Different
- Five calculators in one: survey proportion, mean, margin of error from n, two-mean power and two-proportion (A/B) power. Most survey calculators (SurveyMonkey, Qualtrics, Raosoft) stop at the first one.
- Exact t-test power using the noncentral t distribution, not only the z shortcut, so the answers match G*Power and statsmodels.
- Design effect, response rate, dropout and unequal group sizes are built in.
- Exact z-values (1.959964, not a rounded 1.96), a live table across margins and confidence levels, a population-size table, a power curve, step-by-step working and TI-84 keystrokes.
- Tested against SciPy and statsmodels on more than 3,000 values.
Sample Size Calculator FAQ
Ti84CalcPro is not affiliated with or endorsed by Texas Instruments. TI-84 Plus CE is a trademark of Texas Instruments.