How to Calculate Mean, Median, and Mode

Learn how to calculate the mean, median, and mode of a data set with clear step-by-step examples. Understand which measure of central tendency to use and why.

What Are Measures of Central Tendency?

Mean, median, and mode are the three main measures of central tendency, each describing the "center" of a data set in a different way. They help summarize large amounts of data with a single representative value. Choosing the right measure depends on the nature of your data and the question you are trying to answer.

How to Calculate the Mean

The mean (arithmetic average) is calculated by summing all values and dividing by the count. For the data set {4, 7, 13, 16}, the mean is (4 + 7 + 13 + 16) / 4 = 40 / 4 = 10. The mean is sensitive to outliers; a single very large or very small value can pull the mean significantly away from the center.

How to Calculate the Median

The median is the middle value when data is sorted in ascending order. For an odd number of values, the median is the exact middle value. For an even number of values, the median is the average of the two middle values. For {3, 5, 8, 12}, the median is (5 + 8) / 2 = 6.5.

How to Calculate the Mode

The mode is the value that appears most frequently in a data set. A data set can have one mode (unimodal), two modes (bimodal), or more (multimodal). For {2, 4, 4, 7, 9, 9, 9}, the mode is 9 because it appears three times. If no value repeats, the data set has no mode.

When to Use Each Measure

Use the mean when data is roughly symmetric with no extreme outliers, such as averaging test scores. Use the median when data is skewed or contains outliers, such as household income or home prices. The mode is most useful for categorical data, such as finding the most popular product color.

Skewed Distributions and Their Effect

In a symmetric distribution, mean = median = mode. In a right-skewed (positively skewed) distribution, the mean is pulled higher than the median by large outliers. In a left-skewed distribution, the mean is pulled below the median. The median is generally the more robust measure of center for skewed data.

Worked Example with All Three Measures

Consider the data set {5, 8, 8, 10, 14, 22}. The mean is (5 + 8 + 8 + 10 + 14 + 22) / 6 = 67 / 6 ≈ 11.17. The median is (8 + 10) / 2 = 9. The mode is 8. Notice how the outlier value of 22 raises the mean above the median, illustrating why the median better represents the typical value here.

Try These Calculators

Put what you learned into practice with these free calculators.