ThisCalculator

Statistics

Calculating Averages: Mean, Median, and More

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Calculating Averages: Mean, Median, and More

Calculating an average means choosing a summary measure and applying its formula to a set of values. The arithmetic mean is the familiar total divided by the number of values, while the median and mode can describe a typical value more usefully when data are skewed or repeated.

Formula

The calculator reports three common measures of a data set. For values x1 through xn, where n is the number of observations:

  • Arithmetic mean: mean = (x1 + x2 + … + xn) / n. Add all values and divide by their count.
  • Median: Sort the values. If n is odd, take the value in position (n + 1) / 2. If n is even, average the values in positions n / 2 and n / 2 + 1.
  • Mode: The value or values that occur most often. A data set can have one mode, several tied modes, or no repeated value that is more common than the others.

Enter the numbers as a comma-separated list. The calculator displays the mean, median, and mode to two decimal places. These measures have the same unit as the input values: for example, a list of centimetres produces results in centimetres. The example values have no physical unit.

Worked Example

Using the calculator’s default values, 4, 8, 15, 16, 23, and 42:

  1. Mean: Add the values: 4 + 8 + 15 + 16 + 23 + 42 = 108. There are 6 values, so 108 / 6 = 18.00.
  2. Median: The values are already sorted. There are 6, an even number, so take the average of the third and fourth values: (15 + 16) / 2 = 15.50.
  3. Mode: Each value appears once. No value occurs more often than another, so there is no mode.

What “Average” Usually Means

In everyday conversation, “average” often means arithmetic mean. In statistics, however, it can refer more broadly to a measure of central tendency: a number intended to represent the center or typical value of a group. The mean, median, and mode are not interchangeable; each answers a slightly different question.

The mean uses every observation and is useful for totals spread across equally weighted cases. For instance, if five people each contribute different amounts to a shared total, the mean contribution is the total divided by five. But a very large or small observation can pull the mean away from what most values look like.

The median identifies the middle after sorting. It is less affected by extreme values, making it a useful description of a skewed distribution. The mode identifies the most frequent value and can work with categories as well as numbers. A survey’s most common response, for example, can be its mode even when calculating a mean would make no sense.

How to Choose the Right Measure

Consider what the values represent and what you want the summary to communicate:

  • Use the mean when values are numerical, comparable, and each observation should contribute equally to a total-based summary. It is common for test scores, measurements, and repeated readings.
  • Use the median when the distribution is noticeably skewed or contains outliers, and the middle observation is more representative than the total divided by the count.
  • Use the mode when the most common value or category is the point of interest, or when the data are categorical.

For example, consider annual incomes of $30,000, $32,000, $35,000, $38,000, and $200,000. Their mean is $67,000, but their median is $35,000. The unusually high fifth value raises the mean substantially; neither measure is arithmetically wrong, but they tell different stories. Reporting the median, and sometimes both measures, makes the effect visible.

Weighted Averages and Changing Units

A simple mean gives every listed value equal weight. That is not appropriate when observations represent different amounts of something. A weighted mean is calculated as the sum of each value multiplied by its weight, divided by the sum of the weights:

Weighted mean = (w1x1 + … + wnxn) / (w1 + … + wn)

Suppose a course grade has two components: a quiz score of 80 weighted 1 and an exam score of 90 weighted 3. The weighted mean is (80 × 1 + 90 × 3) / (1 + 3) = 87.5. The ordinary mean, 85, would incorrectly treat the quiz and exam as equally important. The weights must match the intended proportions; percentages can be used as weights when applied consistently.

Before averaging measurements, also check that they use compatible units. Convert values to one unit first: do not directly average 2 metres and 300 centimetres as if the numbers were alike. Convert 2 metres to 200 centimetres, then calculate the mean as 250 centimetres, or convert the other way and report 2.5 metres.

Common Mistakes and Limitations

  • Mixing unlike quantities: An average is not meaningful if the observations measure different things or use incompatible units.
  • Ignoring missing data: Divide by the number of values actually included, not by a planned sample size unless the method specifically requires that.
  • Rounding too early: Keep full precision during calculations and round the final answer to a sensible number of decimal places. The calculator rounds its display, not the underlying concept.
  • Assuming an average describes every case: A summary conceals spread and variation. Two groups can have the same mean but very different ranges or distributions.
  • Treating a mode as always unique: Ties may produce more than one mode; if every value occurs once, there may be no useful mode.

An average is a summary, not a complete account of the data. When decisions depend on variation, include context such as the number of observations, range, or a suitable measure of spread. A mean can also fall between observed values—for example, the mean of two whole-number counts can be fractional—even though no individual observation has that value.

Frequently Asked Questions

How do you calculate an average?
Usually, “average” means arithmetic mean: add all the values and divide by how many values there are. If the data are skewed or categorical, the median or mode may be a better summary.

What is the difference between mean and median?
The mean is the sum divided by the count. The median is the middle value after sorting, or the mean of the two middle values when the count is even. Extreme values affect the mean more strongly.

Can a data set have more than one mode?
Yes. If two or more values tie for the highest frequency, the data set has multiple modes. If all values occur equally often, it may have no single mode.

How do you calculate a weighted average?
Multiply each value by its weight, add those products, then divide by the sum of the weights. This gives more influence to observations with larger weights.

Can you average percentages?
Yes, when each percentage should count equally. If the percentages are based on different group sizes, use a weighted mean based on those sizes; otherwise the simple mean can misrepresent the overall percentage.

Related

Formula used
list values | Values | 4, 8, 15, 16, 23, 42
out mean | Arithmetic mean | - | mean(values) | 2
out median | Median | - | median(values) | 2
out mode | Mode | - | mode(values) | 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.