Mean, Median & Mode Calculator
Central tendency · frequency table · step-by-step
Result
Enter data and click Calculate
Paste numbers to find mean, median, mode with step-by-step solution.
Histogram & Box Plot
No graph yet
Calculate to see histogram and box plot.
Python Compiler
What Are Mean, Median, and Mode?
Mean, median, and mode are the three measures of central tendency — they each describe the “center” of a dataset in different ways. Understanding when to use each one is a fundamental skill in statistics.
Mean (Average)
Sum all values, divide by count. Uses every data point. Sensitive to outliers.
Median (Middle)
Sort data, pick the middle value. Robust to outliers. Best for skewed data.
Mode (Most Frequent)
The value that appears most often. Works for categorical data too. May not be unique.
Formulas & Definitions
The arithmetic mean sums all values and divides by the count. It is the balance point of the data and uses every value in the calculation.
Sort the data from smallest to largest. If n is odd, the median is x((n+1)/2). If n is even, it is the average of x(n/2) and x(n/2+1).
Count how often each value appears. The mode is the one with the highest count. Data can be unimodal (one mode), bimodal (two), multimodal (many), or have no mode (all equally frequent).
Worked Example
Mean: (3+7+7+12+15+20+25)/7 = 89/7 = 12.714
Median: 7 values → middle = x4 = 12
Mode: 7 appears twice (most frequent) → 7
When to Use Which Measure
| Measure | Best For | Weakness | Example |
|---|---|---|---|
| Mean | Symmetric data, no outliers | Pulled by extreme values | Average test score in a class |
| Median | Skewed data, outliers present | Ignores actual extreme values | Median household income |
| Mode | Categorical data, finding peaks | May not exist or be unique | Most popular shoe size |
How Outliers Affect the Mean
The outlier pulls the mean to the right, while the median stays near the cluster of data points.
Understanding Outlier Detection
The IQR (Interquartile Range) method is the most common approach for outlier detection. It uses the spread of the middle 50% of data (Q1 to Q3) to define “fences” beyond which values are considered unusually extreme.
Don’t Auto-Remove
Outliers may be real data (e.g., a CEO’s salary). Always investigate before removing them.
Report Both Measures
When outliers exist, report both mean and median to give a complete picture of the data.
Alternative Methods
Z-score method (|z| > 2 or 3), modified Z-score, Grubbs’ test, or visual inspection with box plots.