data tool
Margin of error calculator
The margin of error on a survey percentage is the z value for the confidence level times the square root of p times one minus p over the number of responses. Enter your responses, the result you got and the confidence level to see the plus or minus, the likely range and the worst case at 50%.
Loading the tool…
- Runs on your device, nothing is uploaded
- Free, no sign in
- No watermark, no file limit
How it works
- 1
Enter the responses
The number of people who answered the question, not the number invited.
- 2
Enter the result
The percentage you are reporting, such as 62% who agree.
- 3
Pick the confidence
95% is the standard for reporting survey results.
- 4
Report the range
Quote the result with its margin, such as 62% plus or minus 4.7 points at 95% confidence, with the sample size.
The formula and one worked result
For a percentage p from n responses, the margin of error at 95% confidence is 1.96 times the square root of p times one minus p, divided by n. With 412 responses and 62% agreeing, p is 0.62, p times one minus p is 0.2356, divided by 412 is 0.000572, the square root is 0.0239, and times 1.96 gives 0.0469: plus or minus 4.7 percentage points. The likely range is 57.3% to 66.7%. If the population is known and the sample is a large share of it, the finite population correction shrinks the margin further.
Points, not percent
A margin of error is stated in percentage points. A result of 40% with a 3 point margin means 37% to 43%, not 40% plus or minus 3% of 40. AAPOR, the American Association for Public Opinion Research, stresses this because the confusion makes results look more precise than they are. The margin is also largest when the result is near 50%, which is why survey reports usually quote the 50% figure as the margin for the whole survey.
Reporting a result honestly
A good survey report gives the result, the margin, the confidence level, the sample size and how people were chosen. If two results are within each other's margins, such as 48% and 51% from samples with 4 point margins, the report should not call one higher. Results for subgroups, such as one age band, come from fewer responses and carry wider margins, so check them separately before quoting them.
Opt in surveys have no true margin of error
The formula assumes everyone in the population had a known, non zero chance of being chosen. AAPOR notes that the margin of sampling error applies only to probability based samples and not to opt in online polls. A form shared on social media, or a survey only engaged customers answer, does not meet that bar. You can still report how many answered and describe them, but presenting a margin of error for such a sample implies a precision it does not have.
Small samples and extreme results
With very few responses, or results close to 0% or 100%, the normal approximation behind the formula becomes unreliable and understates uncertainty. The NIST Engineering Statistics Handbook gives exact binomial methods for those cases. The tool warns when there are fewer than about ten answers on either side of the result, which is the usual rule of thumb for when to stop trusting the simple formula.
Collecting responses that count
The best way to shrink the margin is to collect more responses from a well chosen sample. Forms built in the form builder export their responses as CSV with one column per question, so counting the share who chose an answer for this calculator is a matter of opening the export in a spreadsheet or a CSV tool.
Limits
- Assumes a random sample. An opt in web survey has no true margin of sampling error, and the tool says so in this page.
- Uses the normal approximation, which is shaky with very small samples or results near 0% or 100%; a warning appears in those cases.
- Covers sampling error only. Poor question wording, non response and coverage gaps add error the formula cannot see.
- Margins for differences between two groups are larger than the margin for either group.
What it does not do
- It does not test whether two results differ significantly.
- It does not weight the sample.
- It does not store your figures.
Questions people ask
What is a good margin of error for a survey?
Five percentage points at 95% confidence is common for general surveys and needs about 385 responses from a large population. Three points is better for figures that will be published or used for big decisions and needs about 1,068. Ten points is a rough read, fine for an early check.
Does an online survey have a margin of error?
Only if the people who took it were chosen at random from the population, such as a random sample of customers invited by email. An open link anyone can answer is a self selected sample, and the margin of error formula does not properly apply to it, even though the arithmetic can still be done.
Why is the margin largest at 50%?
The formula contains p times one minus p, which is biggest when p is 0.5 and shrinks towards 0% and 100%. A result of 50% is the most uncertain kind of split. Reporting the margin at 50% gives a figure that is safe for every question in the survey.
How do I halve my margin of error?
Collect about four times as many responses, because the margin shrinks with the square root of the sample size. Going from 400 to 1,600 responses cuts a margin of about 4.9 points to about 2.5. Lowering the confidence level also narrows the margin, but at the cost of being less sure.
Can I compare two survey results using their margins?
Only roughly. If the two ranges do not overlap, the difference is very likely real. If they overlap, the difference may still be real, because the margin for a difference is smaller than adding the two margins together. A proper test of two proportions gives a definite answer.
Build a survey with enough responses
Take what you made here into forms.
Create a form with OneCraftMore tools like this
- Sample size calculator for surveysSample size calculator for surveys: responses needed at 90, 95 or 99% confidence and your margin of error, with the small population correction.
- NPS calculatorNPS calculator: paste 0 to 10 answers or counts per score to get the Net Promoter Score, the share of promoters, passives and detractors, and what moves it.
- CSV to tablePaste CSV and read it as a sortable grid. Every column header shows its type, blanks and range, and any row with the wrong field count is named by line.
- Merge CSV filesMerge CSV files in your browser: combine 2 to 50 CSVs into one, matching columns by header name, with a source file column and optional duplicate removal.
- Random name pickerRandom name picker: paste a list or CSV column and draw winners with the browser's cryptographic random source, duplicates removed, with a draw record.
Background reading: the question page on this.
Written and checked by the OneCraft team. Last checked .