AP Stats Margin of Error Calculator
Find how far your sample estimate could reasonably be from the true population value. Choose a mean or a proportion, pick a confidence level, and get the margin of error plus a plain-English interpretation.
Calculate Your Margin of Error
Interactive visual: Live preview
Press Show live preview to redraw this chart from your calculator inputs.
What Is the Margin of Error?
The margin of error is the amount you add to and subtract from a sample statistic to build a confidence interval. It depends on the confidence level, the variability in the data, and the sample size: larger samples give smaller margins of error. A poll that reports 52% plus or minus 3% is saying the true value is plausibly between 49% and 55%.
Interactive visual: See the idea
Example: SD = 10, n = 100 — margin of error = 1.96 at 95% confidence.
How to Use This Calculator
Interactive visual: Walk through it
Step 1: Open the AP Stats Margin of Error Calculator calculator at the top and enter the values it asks for.
- Choose Mean or Proportion. Use Mean when your estimate is an average (for example, mean test score). Use Proportion when your estimate is a percentage or share (for example, the proportion of students who passed).
- Pick a confidence level. 95% is the AP Statistics default. Higher confidence gives a larger margin of error.
- Enter your sample size n and either the standard deviation (for a mean) or the sample proportion p (for a proportion).
- Click Calculate Margin of Error. You will see the critical value z*, the margin of error, and what it means for your interval.
How to Calculate Margin of Error
Interactive visual: See it on a chart
Press Update visual to redraw this chart from your calculator inputs.
The margin of error is the critical value times the standard error of your estimate. It is the "plus or minus" amount in a confidence interval.
For a mean: ME = z* × SD / √n
For a proportion: ME = z* × √[p(1 − p) / n]
Worked Example
Suppose you want a 95% confidence interval for a mean, with SD = 10 and n = 100. The critical value for 95% confidence is z* = 1.96, so:
ME = 1.96 × 10 / √100 = 1.96 × 10 / 10 = 1.96
So the margin of error is 1.96. If the sample mean were 75, the 95% confidence interval would be 75 ± 1.96, or (73.04, 76.96). Try these exact numbers in the calculator above to check your work.
Tips and Common Mistakes
Interactive visual: Mistake vs correct
Mistake: Using SD instead of SD / sqrt(n) in the margin.
- Do not confuse margin of error with standard deviation. The standard deviation describes spread in the data; the margin of error describes uncertainty in the estimate, and it shrinks as n grows.
- Quadrupling n halves the margin of error. Because of the square root in the formula, doubling n only cuts the margin of error by about 29%.
- Use p as a decimal, not a percent. Enter 0.5 for 50%, not 50 — entering 50 will fail validation because p must be between 0 and 1.
- Do not use the sample standard deviation formula blindly for a proportion. A proportion uses √[p(1 − p) / n] as its standard error, not a separate SD input.
- Check the conditions. These z* formulas assume a roughly normal sampling distribution and a random sample; for small samples or extreme proportions, check the AP conditions (such as np ≥ 10 and n(1 − p) ≥ 10) before trusting the result.
- Higher confidence is not always better. 99% confidence sounds stronger, but it produces a wider, less precise interval than 95% for the same data.
Frequently Asked Questions
Interactive visual: FAQ
Tap any question below to show or hide its answer.
What is margin of error in AP Statistics?
It is the "plus or minus" amount added to and subtracted from a sample statistic to form a confidence interval. It measures how much the estimate might differ from the true population parameter due to sampling variability alone.
How does sample size affect margin of error?
A larger sample gives a smaller margin of error, but with diminishing returns: margin of error shrinks with 1/√n, so you must quadruple the sample size to cut it in half.
Why is the margin of error largest when p = 0.5?
For a proportion, the standard error uses p(1 − p), which is maximized at p = 0.5. That is why polls often report a worst-case margin of error based on p = 0.5.
What is the difference between margin of error and confidence level?
The confidence level (for example, 95%) is how often the interval-building method captures the true parameter in repeated sampling. The margin of error is the width of that interval on either side of the estimate — it does not mean there is a 95% probability that this one interval contains the parameter.
Should I use a z* or t* critical value for a mean?
Use z* when the population standard deviation is known (the setup this calculator uses). In most AP problems where only the sample standard deviation is known, you should use a t* critical value instead — that is a separate t-interval calculation.
Can margin of error account for biased sampling?
No. Margin of error only reflects random sampling variability. It does not fix bias from a non-random sample, a leading question, or nonresponse.
Disclaimer: AP is a trademark of the College Board, which was not involved in the production of, and does not endorse, this site.
Related Calculators and Guides
Keep exploring AP Statistics with calculators and guides related to this tool.
Related Calculators
Interactive visual: Tool path
Start with this tool, then follow the path through the related calculators.
Margin of Error Calculator → Confidence Interval Calculator → Sample Size Calculator