Mean, Median, Mode Calculator — Dataset Statistics

Mean

Median

Mode

Range

Std Dev

Variance

Sum

Count

Min/Max

Sorted Data

How Mean, Median, and Mode Work

Mean, median, and mode are the three primary measures of central tendency in statistics, each describing the "center" of a dataset from a different perspective. According to the Khan Academy statistics curriculum and the American Statistical Association, understanding when to use each measure is a foundational skill in data literacy.

The mean (arithmetic average) is the most commonly used measure but is sensitive to outliers. The median is the middle value when data is sorted and is robust against extreme values, making it preferred for skewed distributions like income data. The mode is the most frequently occurring value and is the only measure applicable to categorical data. This calculator computes all three along with standard deviation, variance, range, sum, and count.

These statistics are used across every field: business analysts use them for sales data, researchers use them for experimental results, educators use them for test scores, and healthcare professionals use them for patient data. The U.S. Census Bureau, for example, reports median household income ($74,580 in 2022) rather than mean income because the median better represents a typical household when extreme wealth skews the distribution.

Formulas for Mean, Median, and Mode

Each measure of central tendency uses a different calculation method:

Mean = Sum of all values / Count of values

Median = Middle value of sorted data (average of two middle values if count is even)

Mode = Value(s) that appear most frequently

Worked example: Dataset: 5, 10, 10, 15, 20. Mean = (5+10+10+15+20)/5 = 12. Median = 10 (3rd value). Mode = 10 (appears twice). Range = 20-5 = 15. Variance = [(7^2 + 2^2 + 2^2 + 3^2 + 8^2)]/5 = 25.2. Standard deviation = 5.02.

Key Terms You Should Know

When to Use Mean vs Median vs Mode

Choosing the right measure of central tendency depends on your data type and distribution shape. The table below summarizes best practices used in academic research and data science.

Situation Best Measure Why
Symmetric data, no outliersMeanUses all data points, most efficient
Skewed data (income, prices)MedianNot affected by extreme values
Categorical data (colors, brands)ModeOnly measure for non-numeric data
Data with outliersMedianRobust against extreme values
Normal distributionMean = Median = ModeAll three converge in symmetric data

Practical Examples

Example 1 — Test scores: Class test scores: 55, 70, 72, 75, 78, 80, 82, 85, 90, 98. Mean = 78.5, Median = 79, Mode = none. This is approximately symmetric, so mean and median are close. Use either to summarize performance.

Example 2 — Home prices: Listing prices: $200K, $220K, $230K, $245K, $250K, $1.2M. Mean = $390,833 (misleading due to the $1.2M outlier). Median = $237,500 (better represents the typical home). This is why real estate reports use median price. Use the average calculator for quick mean computations.

Example 3 — Shoe sizes in inventory: Sizes sold: 8, 9, 9, 10, 10, 10, 11, 11, 12. Mode = 10 (most frequent). For inventory planning, the mode tells the retailer which size to stock the most. Use a sample size calculator to determine how many data points you need for reliable statistics.

Tips for Analyzing Your Data

Frequently Asked Questions

What is the difference between mean and median?

The mean is the arithmetic average calculated by summing all values and dividing by the count, while the median is the middle value when data is sorted in order. The key difference is sensitivity to outliers: a single extreme value can dramatically shift the mean but has no effect on the median. For example, incomes of $40K, $50K, $60K, $70K, and $500K have a mean of $144K but a median of $60K. The U.S. Census Bureau reports median household income rather than mean for this reason. Use the mean for symmetric, outlier-free data and the median for skewed distributions.

When should I use population vs sample standard deviation?

Use population standard deviation (dividing by N) when your dataset includes every member of the group you are studying, such as all employees in a company or all students in a class. Use sample standard deviation (dividing by N-1, called Bessel's correction) when your data is a subset of a larger population, such as a survey of 500 people representing a country. The N-1 correction produces an unbiased estimate of the population variance. In practice, most real-world analyses use sample standard deviation because complete population data is rarely available.

What if there is no mode in my dataset?

If every value in your dataset appears exactly once (or all values appear with equal frequency), there is no mode. This is common with continuous data like precise measurements (e.g., 2.341, 2.352, 2.367). In such cases, the mode is not a useful measure of central tendency. You can create a mode by grouping continuous data into bins or ranges. A dataset can also be bimodal (two modes) or multimodal (three or more modes), which often indicates the data contains distinct subgroups that may warrant separate analysis.

How is variance related to standard deviation?

Standard deviation is the square root of variance. Variance measures the average squared deviation from the mean, giving the spread in squared units (e.g., dollars-squared). Standard deviation converts this back to the original units by taking the square root. For example, if test scores have a variance of 225 points-squared, the standard deviation is 15 points. Standard deviation is more intuitive because it uses the same units as the data. About 68% of values fall within one standard deviation of the mean in a normal distribution, and 95% within two standard deviations.

How many data points do I need for reliable statistics?

There is no universal minimum, but statisticians generally recommend at least 30 observations for the Central Limit Theorem to apply, meaning sample means will approximate a normal distribution regardless of the underlying data shape. For detecting small differences, you may need hundreds or thousands of data points. Use our sample size calculator to determine the exact number needed for a given confidence level and margin of error. With fewer than 10 observations, treat any statistics as preliminary estimates rather than definitive measures.

Related Calculators