Mathematics Updated May 17, 2026 🕐 5 min read ✓ Verified

How to Calculate Average — Mean, Median and Mode Explained

The word average is imprecise in everyday use. In statistics, there are three distinct measures of central tendency: the mean, the median, and the mode. Each gives a different answer from the same dataset, and each is appropriate in different situations. Choosing the wrong measure can produce a misleading result that misrepresents the data.

average mean median mode statistics data-analysis

Quick reference

Mean
Sum / Count
Sensitive to outliers — use for symmetric data
Median
Middle value
Robust to outliers — use for skewed data
Mode
Most frequent value
Use for categorical data or finding peaks
Weighted
Sum(value x weight) / Sum(weights)
Use when values have different importance

Three types of average

Central tendency describes where the centre of a dataset lies. Three measures are used depending on the nature of the data and the question being asked.

The arithmetic mean is the sum of all values divided by the count. It is what most people mean by average and is appropriate for symmetric, roughly normally distributed data without extreme outliers.

The median is the middle value when the dataset is sorted in order. Half the values are above it and half below. It is resistant to outliers and is preferred for skewed distributions such as income, house prices, and waiting times.

The mode is the most frequently occurring value. It is the only average that makes sense for categorical (non-numerical) data, such as the most common blood type in a population or the most frequently purchased product in a store.

Using the wrong measure of average produces misleading conclusions. Reporting the mean salary in a company where a small number of executives earn many times the median salary overstates what a typical employee earns.

Arithmetic mean

Formula
\bar{x} = \frac{\sum_{i=1}^{n} x_i}{n}
The mean equals the sum of all values divided by the number of values. Add every value in the dataset together, then divide by how many values there are.
x-barThe arithmetic mean of the dataset
x_iEach individual value in the dataset
nThe total number of values in the dataset
SumThe instruction to add all values from i=1 to n

Worked examples — all three averages

Example 1Arithmetic mean
Given: Dataset: 12, 15, 18, 22, 13
Result: Mean = 16

Sum = 12 + 15 + 18 + 22 + 13 = 80. Count = 5. Mean = 80 / 5 = 16. Each value contributes equally to the mean regardless of its position in the dataset. The mean does not have to be a value that actually appears in the dataset.

Example 2Median with odd count
Given: Dataset sorted: 12, 13, 15, 18, 22
Result: Median = 15

With 5 values (odd count), the median is the middle value at position (5+1)/2 = 3. The third value in the sorted list is 15. Two values are below (12 and 13) and two are above (18 and 22).

Example 3Median with even count
Given: Dataset sorted: 12, 13, 15, 18, 22, 30
Result: Median = 16,5

With 6 values (even count), the median is the mean of the two middle values at positions 3 and 4. Those values are 15 and 18. Median = (15 + 18) / 2 = 16,5. The median does not have to be a value that exists in the dataset.

Example 4Effect of an outlier on mean vs median
Given: Employee salaries: 28.000, 30.000, 32.000, 35.000, 150.000
Result: Mean = 55.000 | Median = 32.000

The mean of 55.000 is far above what any typical employee earns because the single high salary of 150.000 pulls it upward. The median of 32.000 accurately represents the typical salary. This is exactly why official salary statistics use the median rather than the mean. The median is said to be resistant to outliers.

Calculate mean, median and mode

Enter your dataset to instantly calculate mean, median, mode, range and standard deviation.

Open Average Calculator →

Weighted average

A weighted average assigns different levels of importance to different values. The standard mean treats every value equally. In many real situations, values should not contribute equally.

Example: a student's final grade is composed of coursework (40% weight) scoring 65, a midterm exam (20% weight) scoring 72, and a final exam (40% weight) scoring 80.

Weighted mean = (65 x 0,40) + (72 x 0,20) + (80 x 0,40) = 26 + 14,4 + 32 = 72,4.

Simple mean = (65 + 72 + 80) / 3 = 72,3. In this case the two are nearly identical because the weights are balanced, but when weights are unequal the difference can be substantial.

Weighted averages are used for: portfolio returns (weighted by position size), GPA calculations (weighted by credit hours), price indices (weighted by quantity sold), and any scenario where different observations carry different significance.

When to use which average

SituationBest measureReason
Symmetric data, no extreme outliersMeanUses all data points efficiently
Skewed data (income, house prices)MedianNot distorted by extreme values
Categorical data (colours, types)ModeOnly meaningful average for categories
Values with different importanceWeighted meanReflects the varying significance
Small dataset with potential outliersMedianMean is unreliable with few values
Comparing population averagesMedianStandard for demographic reporting

How outliers affect each measure

An outlier is a value far from the other values in a dataset. Understanding how each average responds to outliers determines which is appropriate for a given dataset.

The mean is highly sensitive to outliers. Adding a single extreme value can shift the mean dramatically. In the salary example above, one salary of 150.000 in a dataset of mostly 28.000 to 35.000 values doubles the mean. This is not wrong mathematically — the mean is calculated correctly — but it misrepresents the typical case.

The median is resistant to outliers. Changing the extreme value from 150.000 to 1.500.000 does not change the median at all. The median depends only on the ordering of values, not their magnitude.

The mode is not affected by outliers unless the outlier happens to be the most frequent value. In most continuous numerical datasets, there is no mode because no value repeats exactly.

In practice: use the mean when data is roughly symmetric and there are no extreme values. Use the median when the distribution is skewed or when outliers are present and you want to represent the typical case. Report both when the comparison between them is itself informative — a large gap between mean and median signals skewness in the data.

Common mistakes

✗ Using the mean to describe skewed data such as income, house prices or response times
✓ For skewed distributions, the median is the correct measure of central tendency. The mean is pulled toward the tail and overstates or understates the typical value. Official statistics for income and house prices universally use the median.
✗ Calculating the mean of percentages or rates directly
✓ The mean of percentages is only valid when the underlying populations are the same size. If a shop sells 20% of stock in January (from 500 units) and 50% in February (from 100 units), the average sell-through rate is not (20 + 50) / 2 = 35%. It is (100 + 50) / (500 + 100) x 100 = 25%. Use a weighted average.
✗ Forgetting to sort the data before finding the median
✓ The median is defined as the middle value of a sorted dataset. Finding the middle position of an unsorted list gives an arbitrary value that has no statistical meaning.
✗ Reporting only the average without also reporting the spread
✓ Two datasets can have the same mean but very different distributions. A dataset with values 10, 10, 10, 10, 10 has the same mean as 2, 4, 10, 16, 18. Always report the standard deviation or range alongside the mean to give a complete picture.

Methodology

Arithmetic mean: sum of all values divided by count. Median: middle value of sorted dataset, or mean of two middle values for even-count datasets. Mode: most frequently occurring value. Weighted mean: sum of (value multiplied by weight) divided by sum of weights. All formulas follow standard statistical definitions.

These definitions apply to descriptive statistics for finite datasets. Population parameters use the same formulas applied to all members of a population rather than a sample.

Cite this guide
APAMLAChicago
Last updated: May 2026

Calculate mean, median and mode now

Enter your dataset to instantly calculate all three averages plus range and standard deviation.

Calculate now →

Frequently asked questions

When is the mean equal to the median?
The mean equals the median when the distribution is perfectly symmetric. In a symmetric distribution, values are distributed evenly around the centre point, so the arithmetic middle and the positional middle coincide. In practice, the normal (bell curve) distribution has mean equal to median equal to mode. Any skewness in the data creates a gap between mean and median.
What does it mean if a dataset has no mode?
A dataset has no mode if every value appears exactly once. In this case no value is more frequent than any other. Some datasets have multiple modes if two or more values appear with the same highest frequency — these are called bimodal or multimodal distributions. The mode is most meaningful for discrete data and categorical data.
How do you calculate a weighted average?
Multiply each value by its corresponding weight, sum all the weighted values, then divide by the sum of all weights. Formula: weighted mean = sum(value x weight) / sum(weights). If all weights are equal, the result is identical to the arithmetic mean. Weights do not need to sum to 1 or 100 — the formula normalises them automatically.
Why do salary statistics always use the median?
Salary distributions are strongly right-skewed: most people earn near the lower end of the distribution while a small number of very high earners extend the upper tail. The mean salary is pulled toward these high earners and substantially overstates what a typical worker receives. The median is resistant to this distortion and correctly represents the salary that exactly half of workers earn more than and half earn less than.
Sources & References
NIST — Statistical methods Retrieved 2026-05-17

Formula based on standard mathematical and financial methods. Results are for informational purposes. Last reviewed May 2026. Version 1.