keepcalculator

06 Numbers and Powers

Mean and Standard Error Calculator

Card No. 06·1148 · Updated · Standard formula, shown below

The calculator on this card is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

This calculator computes the standard error of the mean (SEM) from your sample data. You enter a list of numbers, and it returns the sample mean, the sample standard deviation, and the standard error, which measures how precisely the sample mean estimates the true population mean.

Formula

The standard error of the mean is calculated as:

SEM = s / √n

where:

  • s = sample standard deviation (with n−1 in the denominator)
  • n = number of observations in the sample

The sample mean is the sum of all values divided by n. The sample standard deviation measures the spread of values around the mean. The SEM is not a measure of the data’s spread; it is a measure of how much the sample mean would vary if you repeated the experiment many times.

Worked Example

Using the default values: 5, 7, 8, 9, 11

  1. Sample size n = 5
  2. Sum = 5 + 7 + 8 + 9 + 11 = 40
  3. Mean = 40 / 5 = 8.00
  4. Deviations from mean: -3, -1, 0, 1, 3
  5. Squared deviations: 9, 1, 0, 1, 9; sum = 20
  6. Sample variance = 20 / (5−1) = 5
  7. Sample standard deviation = √5 = 2.236
  8. Standard error = 2.236 / √5 = 2.236 / 2.236 = 1.00

The calculator shows mean = 8.00, SD = 2.24, SEM = 1.00 (rounded to 2 decimals).

What the Standard Error Tells You

The SEM answers: “If I took another random sample of the same size from the same population, how far would the new sample mean typically be from the true mean?” A small SEM means your sample mean is likely close to the population mean. A large SEM means more uncertainty.

For example, if you measure the heights of 30 randomly selected adult women and get a mean of 162 cm with SEM = 2 cm, you can be roughly 95% confident the true population mean lies within about 2 SEMs (i.e., 158–166 cm) if the data are approximately normal. This is why SEM is often used to draw error bars on graphs.

Standard Error vs. Standard Deviation

People frequently confuse these two. The standard deviation describes how individual data points vary around the mean. The standard error describes how the mean itself varies across samples. As you increase the sample size, the standard deviation stays about the same, but the SEM shrinks (because dividing by √n). A dataset can have a large SD but a small SEM if n is large.

Example: The numbers 1, 2, 3, 4, 5 have a mean of 3 and SD ≈ 1.58. The numbers 1, 2, 3, 4, 5, 1, 2, 3, 4, 5 have the same mean but SD ≈ 1.49 and a smaller SEM. The SEM decreases because you have more data points supporting the mean.

How to Choose the Right Sample Size

If you want a smaller standard error, you need a larger sample. The relationship is not linear: to halve the SEM, you must quadruple the sample size (since SEM = s/√n). For example, if your SD is 10 and n = 25, SEM = 2. To get SEM = 1, you need n = 100.

Before collecting data, you can use a rough estimate of the SD (from pilot studies or prior research) to decide how many observations you need for a desired precision. This is called a power or precision analysis. The formula is n = (s / desired_SEM)².

Common Mistakes and Limitations

  • Using population SD instead of sample SD: The SEM formula uses the sample SD (dividing by n−1). If you use the population SD (dividing by n), you get a slightly different value, especially for small samples.
  • Confusing SEM with SD: Error bars labeled “mean ± SEM” are much shorter than “mean ± SD”. Always check which one a graph uses.
  • Assuming normality: The SEM is still valid for non-normal data, but the 95% confidence interval (mean ± 2 SEM) relies on the Central Limit Theorem, which works well only if n is reasonably large (usually n > 30) or the data are not heavily skewed.
  • Ignoring outliers: A single extreme value can inflate the SD and thus the SEM. It is worth checking for outliers before interpreting the SEM.
  • Rounding too early: Keep full precision in intermediate steps; round only the final result to avoid small errors.

When to Use the Standard Error

Use the SEM when you want to:

  • Report how precisely you have estimated a population mean from a sample.
  • Construct confidence intervals for the mean (mean ± t* × SEM).
  • Perform hypothesis tests (e.g., one-sample t-test) where the test statistic is (mean − hypothesized value) / SEM.
  • Compare means between groups, where the difference in means has its own standard error.

Do not use SEM to describe the spread of individual observations; use the standard deviation for that. SEM is a measure of uncertainty about the mean, not about the data.

Frequently Asked Questions

What is the difference between standard error and standard deviation?

Standard deviation (SD) measures the variability of individual data points around the mean. Standard error (SEM) measures the variability of the sample mean itself across different samples. SD is about the data; SEM is about the estimate of the mean.

Can the standard error be larger than the standard deviation?

No. Since SEM = s/√n and √n ≥ 1 for any sample size n ≥ 1, the SEM is always less than or equal to the SD. It equals the SD only when n = 1 (which is meaningless because you cannot estimate a mean from one point).

How do I interpret a standard error of 0?

A zero SEM means all values in the sample are identical, so the sample mean is exactly known for that sample. However, that does not guarantee the true population mean is the same; you still have only one distinct value, so the estimate could be biased.

Should I report mean ± SD or mean ± SEM?

It depends on your goal. If you are describing the data, use SD. If you are showing how well you have estimated the mean, use SEM. Many journals require you to state which one you use. In graphs, error bars with SEM are common for comparing means, but they do not show the data spread.

Does the standard error change if I multiply all values by a constant?

Yes. If you multiply every value by a constant c, the mean and SD both multiply by |c|, and so does the SEM. For example, converting from meters to centimeters (multiply by 100) increases the SEM by a factor of 100.

Related

Formula used
list x | Sample values | 5, 7, 8, 9, 11
out mean | Sample Mean | - | mean(x) | 2
out sd | Sample Std Dev | - | sd(x) | 2
out sem | Standard Error | - | sd(x) / sqrt(count(x)) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →