How to Calculate Mean, Median, and Mode - Complete Guide

Learn how to calculate mean, median, and mode with clear explanations and examples. Understand when to use each measure of central tendency.

What Are Measures of Central Tendency?

Measures of central tendency are values that represent the "center" or "typical value" of a dataset. The three most common measures are the mean, median, and mode. Each captures a different aspect of what is "average" or "representative" about the data. Choosing the right measure depends on the distribution of your data and the question you are trying to answer. In a perfectly symmetric distribution, all three measures are equal, but in skewed or irregular data, they can differ significantly, and each tells a different story about the data.

Calculating the Mean (Average)

The arithmetic mean is what most people call "the average." To calculate it, add up all the values in the dataset and divide by the number of values. The formula is: mean = (sum of all values) / n. For example, the mean of {5, 10, 15, 20, 25} is (5 + 10 + 15 + 20 + 25) / 5 = 75 / 5 = 15. The mean takes every value into account, which makes it sensitive to outliers. A single extremely large or small value can pull the mean significantly away from what most of the data looks like. For instance, the mean of {10, 12, 11, 13, 100} is 29.2, even though four of the five values are near 12.

Calculating the Median

The median is the middle value when the data is arranged in order from least to greatest. If the dataset has an odd number of values, the median is the single middle value. If it has an even number of values, the median is the average of the two middle values. For example, the median of {3, 7, 9, 12, 15} is 9 (the third of five values). The median of {3, 7, 9, 12} is (7 + 9) / 2 = 8 (the average of the second and third values). The median is resistant to outliers, which makes it especially useful for skewed data. Median household income, for instance, is preferred over mean household income because a few billionaires can dramatically inflate the mean.

Calculating the Mode

The mode is the value that appears most frequently in the dataset. A dataset can have one mode (unimodal), two modes (bimodal), multiple modes (multimodal), or no mode at all (if every value appears the same number of times). For example, the mode of {2, 3, 3, 5, 7, 7, 7, 10} is 7 because it appears three times, more than any other value. The mode is the only measure of central tendency that can be used with categorical (non-numerical) data. For instance, the mode of a list of favorite colors might be "blue." It is most useful when you want to know the single most common value.

When to Use Each Measure

Use the mean when the data is roughly symmetric and free of extreme outliers, as it uses all available information. Use the median when the data is skewed or contains outliers, because it gives a better sense of the typical value. Use the mode when you want to identify the most common category or value, especially with discrete or categorical data. In real estate, median home prices are preferred over means because luxury properties skew the average upward. In clothing, the mode shoe size helps retailers know which sizes to stock most. In test scoring with a symmetric distribution, the mean is the most informative summary.

Weighted Mean

A weighted mean assigns different levels of importance to each value in the dataset. Instead of treating every value equally, each value is multiplied by a weight, and the sum of weighted values is divided by the sum of the weights. The formula is: weighted mean = (sum of weight_i x value_i) / (sum of weight_i). For example, if your final grade is based on homework (30%), midterm (30%), and final exam (40%), and you scored 90, 80, and 70 respectively, your weighted mean is (0.30 x 90 + 0.30 x 80 + 0.40 x 70) / 1.00 = (27 + 24 + 28) / 1 = 79. Weighted means are standard in academic grading, financial indexes, and survey analysis.

Relationship Between Mean, Median, and Mode

In a perfectly symmetric distribution (like a normal distribution), the mean, median, and mode are all equal. In a right-skewed distribution (with a long tail to the right), the mean is pulled to the right and is greater than the median, which is greater than the mode. In a left-skewed distribution, the order reverses: the mean is smallest, followed by the median, then the mode. An approximate empirical relationship for moderately skewed data is: mean - mode is approximately 3 x (mean - median). Understanding this relationship helps you infer the shape of a distribution from summary statistics alone.

Try These Calculators

Put what you learned into practice with these free calculators.