Skip to main content
🟢 Beginner 🔥 Popular

Mean, Median & Mode Calculator

Calculate mean, median, mode, range, and other statistics for any data set. Use this free online math calculator for instant, accurate results. No signup.

★★★★★ 4.8/5 · 📊 0 calculations · 🔒 Private & free

Understanding Measures of Central Tendency

In statistics, measures of central tendency are single values that describe the center or typical value of a data set. The three most important are the mean, median, and mode — each tells you something different about the data, and each is most appropriate in different situations.

Consider this data set: test scores {55, 60, 70, 75, 75, 80, 95}. Each measure gives a different perspective:

MeasureValueHow CalculatedBest For
Mean (average)72.9(55+60+70+75+75+80+95) / 7Symmetric distributions
Median (middle value)75Middle value of sorted dataSkewed distributions, outliers
Mode (most frequent)75Most repeated valueCategorical data, finding peaks
Range40Max − Min = 95 − 55Measuring spread

No single measure is universally "best." A data analyst chooses the appropriate measure based on the distribution shape, the presence of outliers, and the question being asked. Understanding all three — plus their limitations — is fundamental to statistical literacy.

Mean (Arithmetic Average): How to Calculate It

The arithmetic mean is the sum of all values divided by the count of values. It is the most commonly used measure of central tendency and is what most people mean when they say "average."

Formula: Mean (x̄) = (Σxᵢ) / n

Where Σxᵢ is the sum of all values and n is the count.

Example: Data = {3, 7, 8, 5, 12, 4, 9, 6}

  1. Sum: 3 + 7 + 8 + 5 + 12 + 4 + 9 + 6 = 54
  2. Count: 8 values
  3. Mean = 54 / 8 = 6.75

The mean is sensitive to outliers — extreme values pull the mean toward them. For example, if one value in the above set were 100 instead of 12, the mean would jump to (54 − 12 + 100) / 8 = 142 / 8 = 17.75, far from the "typical" value of the remaining data.

Other types of means for specialized use:

Median: The Middle Value

The median is the middle value of a data set when sorted in ascending order. It divides the distribution exactly in half: 50% of values fall below the median and 50% above.

For an odd number of values: Median = the (n+1)/2 th value.

For an even number of values: Median = average of the n/2 th and (n/2 + 1) th values.

Data SetnSortedMedian
{4, 1, 9, 2, 6}5 (odd){1, 2, 4, 6, 9}4 (3rd value)
{7, 3, 8, 5}4 (even){3, 5, 7, 8}(5+7)/2 = 6
{10, 20, 30, 40}4 (even){10, 20, 30, 40}(20+30)/2 = 25
{1, 1, 1, 1000}4 (even){1, 1, 1, 1000}(1+1)/2 = 1

Note the last example: the mean of {1, 1, 1, 1000} = 250.75, but the median = 1. This perfectly illustrates why median is preferred over mean for skewed distributions with outliers — median income, housing prices, and hospital stay durations are all reported as medians because a few extremely high values would make the mean unrepresentative of typical experience.

Mode: The Most Frequent Value

The mode is the value that appears most frequently in a data set. A data set can have:

Mode is particularly useful for:

Data SetModeType
{1, 2, 3, 4, 5}NoneNo mode
{2, 4, 4, 6, 8}4Unimodal
{1, 1, 3, 5, 5}1 and 5Bimodal
{a, b, b, c, c, d, d}b, c, dTrimodal

Range and Other Measures of Spread

While mean, median, and mode describe the center of a distribution, measures of spread describe how much the data varies. They are equally important for understanding a data set.

MeasureFormulaExample ({2, 4, 4, 6, 8})Sensitivity to Outliers
RangeMax − Min8 − 2 = 6Very sensitive
Interquartile Range (IQR)Q3 − Q17 − 3 = 4Resistant
Variance (σ²)Σ(xᵢ − x̄)² / n3.44Sensitive
Standard Deviation (σ)√Variance1.855Sensitive
Mean Absolute DeviationΣ|xᵢ − x̄| / n1.6Moderate

For {2, 4, 4, 6, 8}: mean = 4.8, so deviations are: (2−4.8)²=7.84, (4−4.8)²=0.64, (4−4.8)²=0.64, (6−4.8)²=1.44, (8−4.8)²=10.24. Variance = (7.84+0.64+0.64+1.44+10.24)/5 = 20.8/5 = 4.16. SD = √4.16 ≈ 2.04.

Standard deviation is the workhorse of statistics — it appears in hypothesis testing, confidence intervals, normal distribution calculations, and process control. A lower standard deviation means data is clustered near the mean; a higher standard deviation means data is more spread out.

When to Use Mean vs Median vs Mode

Choosing the wrong central tendency measure can be misleading. Here's a practical guide:

SituationRecommended MeasureWhy
Symmetric, no outliersMeanMost mathematically tractable; uses all data
Skewed distributionMedianNot pulled by extreme values
Income / housing pricesMedianA few millionaires skew the mean upward
Categorical dataModeMean/median don't apply to categories
Most common valueModeDirect answer to "most popular"
Grade averages / GPAMean (weighted)All scores contribute proportionally
Stock returns / growth ratesGeometric meanAccounts for compounding
Survival times, hospital staysMedianSkewed right by long-duration cases

The well-known observation: "The average American has one breast and one testicle" illustrates why mean can be misleading for bimodal distributions. In this case, the mode (separated by sex) and the median are more informative descriptors than the overall mean.

Real-World Examples: Mean, Median, and Mode in Practice

Understanding how these concepts apply in real situations builds statistical intuition:

Frequently Asked Questions

Which is better: mean or median?

Neither is universally better — they serve different purposes. The median is more robust against outliers and better represents "typical" in skewed distributions (income, housing prices, survival times). The mean uses all data points, is mathematically optimal for symmetric distributions, and is necessary for further statistical calculations like standard deviation and hypothesis testing. Use both together for a complete picture.

Can a data set have no mode?

Yes. If all values occur equally often, there is no mode (e.g., {1, 2, 3, 4, 5} — each value appears exactly once). A data set can also be multimodal — bimodal (two modes: {1, 1, 3, 3, 5}) or trimodal. In practice, a bimodal distribution often signals two distinct subgroups in your data, which is an important pattern to investigate.

How do I find the median of an even number of values?

Sort the values in ascending order, then average the two middle numbers. For {2, 4, 6, 8}: the two middle values are 4 and 6, so median = (4+6)/2 = 5. For {1, 3, 5, 7, 9, 11}: middle values are 5 and 7, so median = (5+7)/2 = 6. The median doesn't have to be a value in the data set.

What does it mean if mean = median = mode?

When all three measures are equal, the distribution is perfectly symmetric and unimodal — the classic bell curve (normal distribution). This means there are no outliers skewing the data, and all three measures are equally valid descriptors of the center. In practice, real-world data rarely achieves perfect symmetry, but close alignment of mean and median suggests approximate symmetry.

What is the relationship between mean, median, and skewness?

In a right-skewed (positive skew) distribution: Mean > Median > Mode. In a left-skewed (negative skew) distribution: Mean < Median < Mode. In a symmetric distribution: Mean = Median ≈ Mode. This relationship provides a quick visual check: compare mean and median to determine the direction of skew without looking at a graph.

How do you calculate the mean for grouped data?

For grouped frequency data, use the midpoint of each class interval: Mean = Σ(midpoint × frequency) / n. Example: if 10 students scored 50–60 (midpoint 55), 15 scored 60–70 (midpoint 65), and 5 scored 70–80 (midpoint 75): Mean = (10×55 + 15×65 + 5×75) / 30 = (550+975+375)/30 = 1900/30 ≈ 63.3.

What is the difference between population mean and sample mean?

Population mean (μ, "mu") is calculated from every member of the entire population. Sample mean (x̄, "x-bar") is calculated from a subset (sample) drawn from that population. The formula is identical, but the symbols differ. In practice, we almost always work with sample means and use them to estimate the population mean — which introduces sampling error and requires statistical inference techniques.

How does an outlier affect the mean vs median?

Outliers strongly influence the mean but have minimal effect on the median. Example: data {1, 2, 3, 4, 5} has mean = 3 and median = 3. Adding an outlier {1, 2, 3, 4, 5, 100}: mean jumps to 19.2 but median changes only to (3+4)/2 = 3.5. This robustness makes median the preferred measure whenever outliers are present or suspected.

What is the trimmed mean?

A trimmed mean (or truncated mean) removes a fixed percentage of the extreme values before calculating the mean. For example, a 10% trimmed mean on {1, 2, 3, 4, 5, 6, 7, 8, 9, 100}: remove the bottom and top 10% (roughly 1 value each), leaving {2, 3, 4, 5, 6, 7, 8, 9}; mean = 5.5. Trimmed means are used in scoring systems (Olympic judging, figure skating) and economic statistics to reduce outlier influence while retaining more data than the median.

How do I calculate weighted mean?

Weighted mean = Σ(weight × value) / Σ(weights). Example — GPA calculation: Grade A (4.0) in a 3-credit course, Grade B (3.0) in a 4-credit course, Grade C (2.0) in a 2-credit course: Weighted GPA = (4.0×3 + 3.0×4 + 2.0×2) / (3+4+2) = (12+12+4)/9 = 28/9 ≈ 3.11. Without weighting, the simple average would be (4+3+2)/3 = 3.0 — missing the heavier influence of the 4-credit course.

Descriptive Statistics Summary: What You Always Need

A complete descriptive statistics summary for any data set should include all of the following. This is what you'd report in a scientific paper, business analysis, or academic assignment:

StatisticSymbolExample ({2,4,4,6,8,10})Interpretation
Countn6How many observations
Mean5.67Average value
MedianM5.0Middle value (50th percentile)
ModeMo4Most frequent value
RangeR8Spread from min to max
Standard Deviationσ or s2.58Typical deviation from mean
Varianceσ²6.67SD squared
Min / Max2 / 10Extreme values

In academic and scientific work, always report both a measure of center AND a measure of spread. Reporting only the mean (or median) without the standard deviation (or IQR) gives an incomplete picture of your data. A class where students scored a mean of 75% with SD = 5% is very different from one with mean = 75% but SD = 25% — the first is a tight cluster of B grades, the second is a wildly mixed group from failing to near-perfect.

Percentiles, Quartiles, and Box Plots

Beyond mean, median, and mode, a complete statistical summary often includes percentile analysis. Percentiles tell you what fraction of data falls below a given value — essential for understanding relative standing, identifying outliers, and comparing across populations.

PercentileMeaningExample (exam scores, n=100)
10th10% scored belowScore of 52 → scored better than 10% of class
25th (Q1)25% scored belowScore of 64 → bottom quartile boundary
50th (Median)50% scored belowScore of 75 → middle of the distribution
75th (Q3)75% scored belowScore of 87 → top quartile boundary
90th90% scored belowScore of 93 → top 10% of class
99th99% scored belowScore of 99 → top 1%

A box plot (box-and-whisker plot) visualizes this information: the box spans Q1 to Q3 (the IQR), a line marks the median, and "whiskers" extend to the smallest/largest non-outlier values. Individual outlier points are plotted as dots. Box plots are excellent for comparing distributions across multiple groups side-by-side, revealing differences in center, spread, and skewness that a simple mean comparison would miss. For example, comparing test scores across three schools using three side-by-side box plots immediately shows which school has higher median performance, which has more spread (indicating inconsistent teaching), and whether any school has a cluster of outlier students needing support. This visual density of statistical information in a compact display makes box plots one of the most powerful and underused tools in data communication.

Step-by-Step: Calculating Mean, Median, and Mode by Hand

Let's work through a complete example with a realistic data set: monthly sales figures (in thousands) for a small business over 12 months: {42, 38, 55, 61, 48, 52, 75, 48, 63, 44, 38, 57}.

Step 1: Sort the Data

Sorted ascending: {38, 38, 42, 44, 48, 48, 52, 55, 57, 61, 63, 75}

Step 2: Calculate the Mean

Sum = 38+38+42+44+48+48+52+55+57+61+63+75 = 621

n = 12, Mean = 621 / 12 = 51.75 (thousand)

Step 3: Find the Median

n = 12 (even): average the 6th and 7th values = (48 + 52) / 2 = 50

Step 4: Identify the Mode

Both 38 and 48 appear twice. Mode = {38, 48} (bimodal)

Step 5: Compute Range and Standard Deviation

Range = 75 − 38 = 37

Deviations from mean (51.75): (38−51.75)² = 189.06; (38−51.75)² = 189.06; (42−51.75)² = 95.06; (44−51.75)² = 60.06; (48−51.75)² = 14.06; (48−51.75)² = 14.06; (52−51.75)² = 0.06; (55−51.75)² = 10.56; (57−51.75)² = 27.56; (61−51.75)² = 85.56; (63−51.75)² = 126.56; (75−51.75)² = 540.56

Sum of squared deviations = 1,352.25; Variance = 1,352.25/12 = 112.69; SD = √112.69 ≈ 10.62

Interpretation

This business has average monthly sales of $51,750 with a median of $50,000. The standard deviation of ~$10,620 means most months fall within ±$10,620 of the mean. The bimodal distribution (two modes) might suggest seasonal patterns — check if the two 38s and two 48s cluster in specific months. The top outlier ($75,000 in one month) pulls the mean slightly above the median, indicating mild positive skew — likely one exceptional sales month (holiday season, large contract, etc.).

},{"@type":"Question","name":"Can a data set have no mode?","acceptedAnswer":{"@type":"Answer","text":"Yes. If all values occur equally often, there is no mode. A data set can also be multimodal — having two modes (bimodal) or more. Example: {1, 1, 2, 3, 3} is bimodal with modes 1 and 3."}},{"@type":"Question","name":"How do I find the median of an even number of values?","acceptedAnswer":{"@type":"Answer","text":"Sort the values, then average the two middle numbers. For {2, 4, 6, 8}: middle values are 4 and 6, so median = (4+6)/2 = 5."}}]}