How to calculate mean

By Math Questions Hub Team Updated September 7, 2026

Written for students learning statistics in school, and for anyone who needs to summarize a set of numbers, like test scores, prices, or measurements.

Quick answer

The mean, or average, is the sum of all values in a data set divided by how many values there are. For the set 4, 8, 6, 5, 3, the sum is 26 and there are 5 values, so the mean is 26 / 5 = 5.2.

The mean, more commonly called the average, summarizes a whole set of numbers with a single value. It's calculated by adding every number in the set together, then dividing that sum by how many numbers there are. It's one of three common ways to describe the "center" of a data set, alongside median and mode, and it's the one most people mean when they say "average" without specifying further.

The basic formula

Mean = (sum of all values) / (number of values)

That's the entire calculation. The complexity in mean-related problems almost never comes from the formula itself, it comes from correctly identifying the sum and the count in a slightly disguised or multi-step problem, which the examples below walk through.

Basic worked example

Find the mean of 4, 8, 6, 5, 3.

  1. Add the values: 4 + 8 + 6 + 5 + 3 = 26.
  2. Count the values: there are 5 numbers.
  3. Divide: 26 / 5 = 5.2.

The mean of this set is 5.2, even though 5.2 doesn't appear anywhere in the original list.

Mean with negative numbers

Find the mean of -4, 6, -2, 8, 2.

  1. Add the values, tracking signs carefully: -4 + 6 + (-2) + 8 + 2 = 10.
  2. Count the values: there are 5 numbers.
  3. Divide: 10 / 5 = 2.

Negative values subtract from the running total the same way they would in any addition problem; nothing about the mean formula changes once negatives are involved, but it's worth adding the list in order rather than trying to combine numbers mentally out of sequence, since that's where sign errors creep in.

Mean of a larger data set

Find the mean test score from 78, 85, 92, 67, 88, 91, 74, 83.

  1. Add all eight values: 78 + 85 + 92 + 67 + 88 + 91 + 74 + 83 = 658. Adding in pairs (78 + 85 = 163, 92 + 67 = 159, 88 + 91 = 179, 74 + 83 = 157, then 163 + 159 + 179 + 157 = 658) reduces the chance of losing track partway through a long sum.
  2. Count the values: there are 8 scores.
  3. Divide: 658 / 8 = 82.25.

How outliers distort the mean

An outlier is a value far outside the range of the rest of the data. Because the mean sums every value before dividing, a single outlier can shift it noticeably, in a way the median usually resists.

Worked example: with and without an outlier

Compare the mean of two nearly identical data sets.

Set A: 22, 24, 23, 25, 21

  1. Sum: 22 + 24 + 23 + 25 + 21 = 115.
  2. Mean: 115 / 5 = 23.

Set B, the same values but the last one replaced with an outlier: 22, 24, 23, 25, 95

  1. Sum: 22 + 24 + 23 + 25 + 95 = 189.
  2. Mean: 189 / 5 = 37.8.

Replacing one ordinary value with an extreme one shifted the mean from 23 to 37.8, even though four of the five numbers didn't change at all. This is exactly why household income or salary statistics are often reported as a median rather than a mean: a small number of very high earners can drag a mean well above what a typical person actually earns, while the median, the middle value once everyone is sorted by income, stays close to what most people experience.

Finding a missing value from a known mean

Sometimes a problem gives you the mean and asks you to find one missing number in the set. Work backward from the formula.

Worked example

Four numbers have a mean of 15: 10, 18, 14, and an unknown value. Find the missing value.

  1. Multiply the mean by the count to find the required total sum: 15 × 4 = 60.
  2. Add the three known values: 10 + 18 + 14 = 42.
  3. Subtract to find the missing value: 60 - 42 = 18.
  4. Check: (10 + 18 + 14 + 18) / 4 = 60 / 4 = 15. Correct.

This "multiply the mean by the count to recover the total" move is the single most useful trick for any mean problem that gives you the average and asks for something about the underlying data, rather than the other way around.

Weighted mean

A plain mean treats every value equally. A weighted mean assigns different values different levels of importance, called weights, before averaging. It's common in grading, where a final exam might count for more of a grade than a homework assignment.

Weighted mean = (sum of each value × its weight) / (sum of the weights)

Worked example

A course grade is based on homework (worth 20%), a midterm (worth 30%), and a final exam (worth 50%). A student scores 90 on homework, 82 on the midterm, and 88 on the final. Find the weighted mean grade.

  1. Multiply each score by its weight (as a decimal): 90 × 0.20 = 18,82 × 0.30 = 24.6, and 88 × 0.50 = 44.
  2. Add those products: 18 + 24.6 + 44 = 86.6.
  3. Since the weights (0.20 + 0.30 + 0.50) already add up to 1, the sum above is already the final weighted mean: 86.6.

If the weights don't add up to 1 or 100%, divide the sum of the weighted values by the sum of the weights to normalize the result, following the general formula above.

Mean, median, and mode compared

MeasureHow it's foundBest used when
MeanSum of values ÷ countData is fairly evenly spread, with no extreme outliers
MedianMiddle value when sortedData has outliers or is skewed, like income or home prices
ModeMost frequent valueData is categorical, or you want the single most common result

Common mistakes

  • Miscounting how many values are in the set. It's easy to lose track in a long list; count twice, or count as you add.
  • Dividing by the sum instead of the count, or vice versa. The sum goes in the numerator, and the count of values goes in the denominator.
  • Treating the mean and median as interchangeable. They usually differ, and only one is the "mean" being asked for. Read the question carefully.
  • Forgetting a value from the data set entirely. Especially in longer lists, double-check that every value was actually included in the sum before dividing.
  • Averaging weighted values as if they were unweighted. If some scores or values are supposed to count more than others, use the weighted mean formula, not a plain average.

Where this shows up outside of class

Batting averages, average commute time, average monthly spending, a class's average test score, and a product's average star rating are all means. Because the mean is sensitive to outliers, it's worth a second's thought about whether a mean or a median actually gives the more honest picture before drawing a conclusion from it, particularly with money-related data.

Practice it yourself

Try the statistics calculator for a quick answer, or head tostatistics practice for an unlimited set of mean, median, and mode problems with step-by-step explanations.

Key takeaways

  • The mean is the sum of all values divided by how many values there are.
  • The mean can be pulled far from most of the data by a single extreme value, called an outlier.
  • Median (the middle value) is often a better summary than mean for data with outliers.
  • You can find a missing value if you know the mean and the rest of the data set.
  • A weighted mean gives some values more influence than others, based on an assigned weight.

Frequently asked questions

What is the formula for the mean?

Mean = (sum of all values) / (number of values). Add every number in the data set, then divide by how many numbers there are.

What's the difference between mean, median, and mode?

The mean is the sum of all values divided by the count. The median is the middle value when the data is sorted in order. The mode is the value that appears most often. All three are measures of central tendency, but they can give different answers for the same data set, especially when outliers are present.

Why does one very high or low number change the mean so much?

The mean sums every value before dividing, so a single extreme number directly shifts that sum. The median, by contrast, only looks at position in a sorted list, so an extreme value doesn't pull it nearly as far.

How do I find a missing value if I know the mean?

Multiply the mean by the total number of values, including the missing one, to get the required sum. Then subtract the sum of the known values from that total; what's left is the missing value.

What is a weighted mean?

A weighted mean multiplies each value by a weight reflecting its importance, adds those products together, and divides by the sum of the weights, rather than dividing by a plain count. It's used when some values should count more than others, like a final exam worth more than a quiz.

Can the mean of a data set be a number that isn't in the data set?

Yes, and this is normal. The mean of 2, 3, and 4 is 3, which happens to be in the set, but the mean of 2, 3, and 5 is 3.33, which isn't one of the original numbers at all. The mean describes a balance point, not necessarily an actual observed value.