Skip to content
Popular Calculators
Browse Statistics calculators

Sample Mean Calculator

Find the sample mean x̄ of your data with its standard deviation, standard error and a confidence interval for the population mean.

Separate with commas, spaces or new lines.

Result

Sample meanx̄ = 14.5
Working116 ÷ 8 = 14.5
Spreadsample standard deviation s = 2.44949; standard error s ÷ √n = 0.866025
Confidence interval95% confidence interval for the population mean: 12.4522 to 16.5478 (x̄ ± 2.04782, t = 2.36462, 7 df)
Worth knowingwith fewer than 30 values the interval assumes the population is roughly normal

How this was calculated

  1. SumΣx = 116
  2. Meanx̄ = 116 ÷ 8 = 14.5
  3. SDs = 2.44949
  4. SE2.44949 ÷ √8 = 0.866025
  5. Margin2.36462 × 0.866025 = 2.04782

About the Sample Mean Calculator

Almost every statistical study starts with a sample. You cannot weigh every apple in an orchard or survey every customer, so you measure some of them and use the sample mean, written x̄ and read "x bar", to estimate the population mean μ. The sample mean is the single best estimate of μ from the data, but on its own it does not say how precise that estimate is.

This sample mean calculator finds x̄ from your data and adds what you need to judge it: the sample standard deviation, the standard error of the mean and a confidence interval for the population mean based on the t distribution. You can choose a confidence level from 80% to 99%.

How to Use the Sample Mean Calculator

Enter your data values, separated by commas, spaces or new lines. You can paste a column from a spreadsheet.

Choose the confidence level for the interval, usually 95%.

The Formulas

  sample mean:           x̄ = Σx / n
  sample SD:             s = √( Σ(x − x̄)² / (n − 1) )
  standard error:        SE = s / √n
  confidence interval:   x̄ ± t × SE,  t from the t distribution with n − 1 degrees of freedom

Step-by-Step Example

Data: 12, 15, 11, 18, 14, 16, 13, 17.

  Σx = 116,  n = 8,  x̄ = 116 / 8 = 14.5
  deviations: −2.5, 0.5, −3.5, 3.5, −0.5, 1.5, −1.5, 2.5
  squared:    6.25 + 0.25 + 12.25 + 12.25 + 0.25 + 2.25 + 2.25 + 6.25 = 42
  s = √(42 / 7) = √6 = 2.44949
  SE = 2.44949 / √8 = 0.866025
  t (95%, 7 df) = 2.36462,  margin = 2.36462 × 0.866025 = 2.04782
  95% CI: 12.4522 to 16.5478

The Sample Mean as an Estimate

The sample mean is unbiased: if you took many samples and averaged their means, you would get the population mean. Each individual sample mean misses by some amount, and the standard error tells you the typical size of that miss. A standard error of 0.87 means sample means of this size typically land within about 0.87 of μ.

The standard error shrinks with the square root of the sample size. Quadrupling n halves the standard error, so precision costs more and more data: going from 8 to 32 values would halve it, and from 32 to 128 would halve it again.

Interpreting the Confidence Interval

A 95% confidence interval from 12.45 to 16.55 means that the method used to build it captures the true mean in 95% of samples. It does not mean there is a 95% probability that μ lies in this particular interval; μ is fixed, and this interval either contains it or not. In practice, the interval gives a range of plausible values for the population mean.

Higher confidence widens the interval: at 99% the t value for 7 degrees of freedom is about 3.50, giving a wider range. Lower confidence, such as 90%, narrows it. More data narrows it at every level.

Why the t Distribution?

When the population standard deviation is unknown and estimated from the sample, the extra uncertainty is captured by the t distribution, which has heavier tails than the normal distribution. With 7 degrees of freedom the 95% t value is 2.365, against 1.96 for the normal. As n grows, t approaches the normal value; with 30 or more values the difference is small.

Checking the Data

The mean is sensitive to outliers. A single typing error, such as 140 instead of 14, would move the mean of the example from 14.5 to about 30.3 and inflate the standard deviation. Scan your data before trusting the result, and for strongly skewed data consider reporting the median as well. For small samples, the confidence interval assumes the population is roughly normal.

Sample Mean Versus Other Averages

The mean uses every value, which makes it efficient but sensitive to extremes. The median, the middle value, ignores how far out the extremes are, so it is preferred for skewed data such as incomes or house prices. The mode, the most common value, suits categories. For roughly symmetric data without outliers, the three are close, and the mean has the advantage of a simple standard error and confidence interval.

Reporting the Result

A clear report gives the mean with its precision and the sample size, for example "mean 14.5, SE 0.87, n = 8" or "mean 14.5 (95% CI 12.5 to 16.5)". Round to a sensible number of digits, usually one more than the data, and state the units. Readers can then judge both the estimate and how much to trust it, and compare it with other studies.

Sampling Matters

A precise mean from a biased sample is still wrong. If only the largest apples are picked, or only satisfied customers reply to a survey, the sample mean estimates the wrong population. Random sampling, where every member has a known chance of selection, is what makes the standard error and confidence interval meaningful.

Weighted and Grouped Data

If values come with frequencies, such as a score of 14 recorded five times, enter each value as many times as it occurs, or multiply each value by its frequency and divide the total by the sum of the frequencies. The weighted average calculator handles weights directly. For grouped data in class intervals, use each class midpoint as an estimate, which gives an approximate mean.

Understanding Your Result

The headline gives the sample mean x̄.

The working line shows the sum divided by the count.

The spread line gives the sample standard deviation and the standard error.

The confidence interval line gives the range for the population mean, with the t value and degrees of freedom.

When Should You Use This Calculator?

Use it to estimate a population mean from a sample.

Use it to report a mean with its standard error or confidence interval.

Use it for statistics homework on sampling and estimation.

Common Mistakes

Confusing SD and SE. The SD describes the data; the SE describes the mean's precision.

Dividing by n for the SD. A sample uses n − 1.

Using z instead of t for small samples. With an estimated SD, use t.

Ignoring outliers. One bad value can shift the mean a lot.

Frequently Asked Questions

How do you calculate the sample mean?

Add up all the values and divide by how many there are. For 12, 15, 11, 18, 14, 16, 13 and 17 the sum is 116 and there are 8 values, so the sample mean x̄ is 14.5.

What is the difference between a sample mean and a population mean?

The population mean μ is the average of every member of a population, usually unknown. The sample mean x̄ is the average of the values you measured and is used to estimate μ.

What is the standard error of the mean?

It measures how much the sample mean would vary between samples: the sample standard deviation divided by the square root of n. For the example, 2.44949 ÷ √8 gives about 0.866.

How is the confidence interval worked out?

Take x̄ plus and minus a t value times the standard error. With 7 degrees of freedom the 95% t value is 2.365, so the interval is 14.5 ± 2.05, from about 12.45 to 16.55.

Why divide by n − 1 for the standard deviation?

Deviations are measured from the sample mean, which sits closer to the data than the true mean does. Dividing by n − 1 instead of n corrects this bias, a fix known as Bessel's correction.

How many values do I need?

More values give a smaller standard error, which shrinks with the square root of n. With fewer than about 30 values the interval relies on the population being roughly normal, so check for strong skew or outliers.

Formula and article last checked September 28, 2026. How we test these calculators.