CalcWisp

How to Calculate an Average (Mean, Median, Mode, Weighted)

How to calculate an average: add the values and divide by how many there are. Includes median, mode, weighted average, outliers and worked examples.

By Søren, founder of CalcWisp · Updated · 6 min read · Checked against 3 sources (our standards)

Key takeaways

  • The average (arithmetic mean) is the sum of the values divided by how many values there are: 3, 4, 5, 6, 8, 8, 9 add to 43, and 43 ÷ 7 ≈ 6.14.
  • The median is the middle value of the sorted list; with an even count it is the mean of the two middle values.
  • One extreme value can drag the mean far from the typical value: for 42, 45, 47, 48, 50, 52, 310 the mean is about 84.9 but the median is 48.
  • A weighted average multiplies each value by its weight, adds the results and divides by the total weight; averaging two group averages directly ignores group size.
  • The mode is the most frequent value, a data set can have more than one mode, and it is the only one of the three that works for non-numeric categories.

To calculate an average, add all the values and divide the total by the number of values. The five numbers 12, 15, 15, 18 and 20 add up to 80, and 80 ÷ 5 = 16, so the average is 16. Statisticians call this the arithmetic mean; the median and mode are two other ways to describe a typical value.

What is the formula for the average?

average = (x₁ + x₂ + … + xₙ) ÷ n
  • x₁ … xₙ are the individual values.
  • n is how many values there are.

The NIST/SEMATECH e-Handbook of Statistical Methods defines the mean as the sum of the data points divided by the number of data points and notes that this is the value most commonly called the average. Statistics texts write it as x̄ ("x-bar") for a sample and μ for a whole population; the arithmetic is identical.

Free toolAverage CalculatorMean, median, mode and more from any list of numbers.

How do you calculate the average step by step?

  1. List every value. Check that all of them use the same unit.
  2. Add them to get the total.
  3. Count the values.
  4. Divide the total by the count.

Worked example: five weekly grocery bills of $82, $95, $78, $110 and $90.

  • Total = 82 + 95 + 78 + 110 + 90 = 455
  • Count = 5
  • Average = 455 ÷ 5 = $91

A quick check: the result should sit between the smallest and the largest value (78 and 110). If it does not, an addition slipped.

What are the median and the mode?

The mean is only one kind of average. The three common ones answer slightly different questions.

Measure How to find it Best for
Mean Sum ÷ count Roughly symmetric data, totals that matter
Median Middle value of the sorted list Data with extreme values
Mode Most frequent value Categories, "most common" questions

How to find the median

Sort the values from smallest to largest. With an odd count, the median is the middle value. With an even count, it is the mean of the two middle values. OpenStax places the median at position (n + 1) ÷ 2 in the sorted list.

  • Odd count: 3, 4, 5, 6, 8, 8, 9 has seven values, so the median is the 4th value, 6.
  • Even count: 3, 5, 7, 10 has four values; the middle two are 5 and 7, so the median is (5 + 7) ÷ 2 = 6.

How to find the mode

The mode is the value that occurs most often. In 3, 4, 5, 6, 8, 8, 9 the value 8 appears twice and every other value once, so the mode is 8. A data set can have two modes (bimodal) or none that stand out, and NIST notes the mode is not necessarily unique. Unlike the other two, the mode also works for non-numeric data, such as the most common shoe size or the most popular answer in a survey.

For the same list, 3, 4, 5, 6, 8, 8, 9, the three measures are mean ≈ 6.14 (43 ÷ 7), median 6 and mode 8. The mean, median and mode calculator returns all three at once.

Free toolMean, Median, Mode CalculatorAll three averages, plus variance, from one list.

Which average should you use when there are outliers?

An outlier is a value far from the rest. The mean uses every value, so one extreme value pulls it toward itself. The median depends only on rank, so it barely moves. NIST states that extreme values in the tails distort the mean but not the median, and that for data with extreme values the median is a better estimate of location.

Worked example: monthly electricity bills, in dollars, for seven neighbouring flats: 42, 45, 47, 48, 50, 52 and 310 (the last flat runs a home workshop).

  • Mean = (42 + 45 + 47 + 48 + 50 + 52 + 310) ÷ 7 = 594 ÷ 7 ≈ $84.86
  • Median = 4th value of the sorted list = $48

Six of the seven flats pay between $42 and $52, so the median of $48 describes the typical bill, while the mean of about $84.86 describes nobody. OpenStax makes the same point with a small town where one resident earns $5,000,000 and 49 earn $30,000: the mean is $129,400 but the median is $30,000.

Reporting both numbers is often the honest choice. A large gap between the mean and the median is a sign that a few values are dominating the total.

How do you calculate a weighted average?

A weighted average is used when some values count more than others. Multiply each value by its weight, add the products, and divide by the sum of the weights. OpenStax Principles of Finance describes the same procedure: the sum of the value-times-weight column divided by the sum of the weights.

weighted average = Σ(value × weight) ÷ Σ(weights)

Worked example: a course counts homework 40%, a midterm 35% and a project 25%. The scores are 90, 80 and 70.

Part Score Weight Score × weight
Homework 90 0.40 36.0
Midterm 80 0.35 28.0
Project 70 0.25 17.5
Total 1.00 81.5

The weights add to 1, so the weighted average is 81.5. A plain average of 90, 80 and 70 would give 80, which ignores that homework counts most. The guide to calculating your final grade applies this to the score needed on an exam, and the GPA guide applies it with credit hours as weights.

Why you should not average two averages directly

Suppose class A has 20 students with an average of 80, and class B has 5 students with an average of 60. Averaging 80 and 60 gives 70, but that treats the two classes as equal in size. The correct combined average weights each class by its size:

(20 × 80 + 5 × 60) ÷ 25 = 1,900 ÷ 25 = 76

The same rule applies to averages of percentages, prices, speeds and rates whenever the bases differ. For percentage questions, the guide to calculating a percentage shows how to find each part first.

How do you average values that repeat?

When values repeat, group them. Multiply each distinct value by its frequency, add the products and divide by the total count. OpenStax's example list 1, 1, 1, 2, 2, 3, 4, 4, 4, 4, 4 has 11 values that add to 30, so the mean is 30 ÷ 11 ≈ 2.73. Grouping gives the same answer: (1 × 3 + 2 × 2 + 3 × 1 + 4 × 5) ÷ 11 = 30 ÷ 11. Frequency tables in surveys use exactly this shortcut.

Common mistakes when calculating an average

  • Dividing by the wrong count. Count the values rather than assuming the last row number is the count; a skipped or doubled entry changes the result.
  • Mixing units. Convert everything to one unit before adding.
  • Averaging averages without weighting by group size.
  • Reporting only the mean for skewed data such as incomes or house prices.
  • Averaging ratios such as percentages whose bases differ, as if each base were the same.

How do you spot a result that is wrong?

Three quick checks catch most errors. The mean must lie between the smallest and largest value. If all values are equal, the mean equals that value. Adding the same amount to every value raises the mean by exactly that amount, so shifting the data by a constant and re-averaging is a simple verification.

Free toolPercentage CalculatorPercent of, % change, % difference, with steps.

Frequently asked questions

What is the formula for the average?

Average = (x₁ + x₂ + … + xₙ) ÷ n, where n is the number of values. For 12, 15, 15, 18 and 20 the sum is 80, so the average is 80 ÷ 5 = 16.

Is average the same as mean?

In everyday use, yes: the average usually means the arithmetic mean. Statistics also uses median and mode as other kinds of average, so a report that says only average can be ambiguous.

How do you calculate the average of percentages?

If every percentage is based on the same number of items, add them and divide by the count. If the bases differ, use a weighted average: multiply each percentage by its base, add, and divide by the total base.

Which is better, the mean or the median?

For roughly symmetric data without extreme values they are close and the mean is the usual choice. When a few very large or very small values are present, the median describes a typical value better.

How do you find the average when some numbers repeat?

Multiply each distinct value by how many times it occurs, add those products and divide by the total count. This gives the same result as adding every value one by one.

Key terms

Glossary →
Arithmetic Mean
The arithmetic mean is the sum of a set of values divided by how many values there are; it is the number most people mean by "the average".
Median
The median is the middle value of a data set sorted from smallest to largest; with an even count it is the mean of the two middle values.
Mode
The mode is the value that occurs most often in a data set; a set can have one mode, several modes, or none that stands out.
Outlier
An outlier is a value that lies far from the rest of a data set; it can pull the mean toward itself while leaving the median almost unchanged.
Standard Deviation
Standard deviation is a measure of spread equal to the square root of the variance; it shows how far values typically fall from the mean, in the same units as the data.
Weighted GPA
A weighted GPA is a grade point average that awards extra points for harder courses such as honors, AP or IB, so an A in an advanced class can count for more than 4.0.
Weighted Mean
A weighted mean is an average in which each value is multiplied by a weight reflecting its importance or frequency, then divided by the sum of the weights.

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods — 1.3.5.1 Measures of Location
  2. OpenStax Introductory Statistics 2e — 2.5 Measures of the Center of the Data
  3. OpenStax Principles of Finance — 13.1 Measures of Center

Try the tools

Free toolAverage CalculatorMean, median, mode and more from any list of numbers.Free toolMean, Median, Mode CalculatorAll three averages, plus variance, from one list.Free toolPercentage CalculatorPercent of, % change, % difference, with steps.

Keep reading