Sample Size Calculator

Sample size calculator: determine how many survey respondents you need for a target confidence level and margin of error. Free, no signup, runs in your browser.

Updates automatically as you type.

Calculated in your browser; your inputs are not sent to us. Privacy

Results will appear here.
Calculation details
Every figure above is calculated locally in your browser from the assumptions shown. No inputs are sent anywhere. See the methodology section below for the formulas used.
Use this resultShare the current inputs, or ask ChatGPT to explain the calculation in context.
Ask an AI to explain this result
Share this result

Planning estimate only, not financial, tax, or legal advice. Verify assumptions and current rules before making decisions.

This tool runs in your browser. Your calculator inputs and results are never transmitted to us or to ad/affiliate partners. Ads and sponsored links may set third-party cookies to serve and measure them, but they never receive your calculation values. If you explicitly save a scenario, its permitted fields stay in local browser storage until you clear them. See our Privacy Policy.

Use this result

Share the current inputs or ask ChatGPT to explain the calculation in context.

More options
Report a calculation issue
Direct answer

What does this calculator estimate?

Sample size calculator: determine how many survey respondents you need for a target confidence level and margin of error. Free, no signup, runs in your browser.

Transparent methodology

How this calculator works

Reviewed August 2026 · BoringToolsKit Editorial Team

Formula

n = z^2 x p x (1 - p) / margin^2, with z = 1.96 at 95% confidence and p = 0.5 the conservative proportion.

Worked example

A survey with +/-5% margin at 95% confidence needs 385 respondents.

Cite this tool

BoringToolsKit. “Sample Size Calculator.” boringtoolskit.com/sample-size-calculator/ (reviewed August 2026). Free to reference in articles, syllabi, and answer posts with a link.

Privacy: Inputs and results stay in this browser. Any future sponsored recommendation or advertisement will be clearly labeled and kept separate from the calculation.

Worked example: 5 percent margin on a population of 1,000

Take the defaults: 95 percent confidence, 5 percent margin, and a 50/50 split for p. The z value for 95 percent is 1.96, so the uncorrected size is 1.96 x 1.96 x 0.5 x 0.5, all divided by 0.05 x 0.05. The numerator is 3.8416 x 0.25 = 0.9604, and the denominator is 0.0025, giving 384.16. Rounding up gives 385 people to survey.

Now suppose the whole group you care about is 1,000 people, such as all employees at a company. The finite population correction divides by 1 + (384.16 - 1) / 1,000 = 1.38316, so 384.16 / 1.38316 = 277.7, which rounds up to 278. The correction trimmed 107 people from the requirement because sampling a large share of a small population already reduces uncertainty. With a population of 10,000 the same inputs give 369, and above roughly 100,000 the correction stops mattering much: you get 384, essentially the open-population answer.

Where the 50 percent assumption costs and saves you

The 50 percent default is the worst case for p(1-p), which peaks at 0.25 there. If you genuinely expect 30 percent of respondents to answer yes, p(1-p) = 0.21, and a 5 percent margin at 95 percent confidence needs only 1.96 x 1.96 x 0.21 / 0.0025 = 323.9, so 324 people instead of 385. Estimating a rare attribute like a 2 percent defect rate needs just 77 people at the same precision. Guessing p badly in the safe direction (using 0.5) only costs extra surveying, never precision.

Tightening the margin is the expensive lever: sample size scales with 1 divided by the margin squared. Cutting the margin from 5 percent to 3 percent at p = 0.5 raises the requirement from 385 to 0.9604 / 0.0009 = 1,067.1, so 1,068 people, nearly triple. Going to 2 percent needs 2,401. Also note what this tool does not cover: it assumes simple random sampling, so stratified, cluster, or quota designs need a design effect multiplier, and it says nothing about nonresponse. If you expect 20 percent of invitees to ignore the survey, divide the requirement by 0.8, turning 385 invites into a panel of about 482.