Mean, Median, Mode Calculator

Outlier Detection Histogram + Box Plot Step-by-Step Free · No Signup

Free online mean, median, mode calculator with instant results. Paste your data to compute all three measures of central tendency, detect outliers using the IQR method, view sorted values with color-coded highlights, and explore interactive histogram and box plot.

Mean, Median, Mode
Enter numbers separated by commas, spaces, or newlines
Enter data above…

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

Mean:  x̄ = Σxi / n

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.

Median:  Middle value of sorted data; for even n, average of two middle values

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).

Mode:  Value(s) with the highest frequency

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

Data: [3, 7, 7, 12, 15, 20, 25]
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

MeasureBest ForWeaknessExample
MeanSymmetric data, no outliersPulled by extreme valuesAverage test score in a class
MedianSkewed data, outliers presentIgnores actual extreme valuesMedian household income
ModeCategorical data, finding peaksMay not exist or be uniqueMost popular shoe size

How Outliers Affect the Mean

Outlier Median Mean →

The outlier pulls the mean to the right, while the median stays near the cluster of data points.

Understanding Outlier Detection

IQR Method:  Outlier if value < Q1 − 1.5×IQR  or  value > Q3 + 1.5×IQR

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.

Frequently Asked Questions

Use the mean for symmetric data without outliers — it uses all values efficiently. Use the median for skewed data or data with outliers — it is resistant to extreme values. For example, median household income is preferred over mean income because a few billionaires skew the average upward.
Data can be bimodal (two modes) or multimodal (many modes). Our calculator reports all values that share the highest frequency. If every value appears equally often, there is no mode. Bimodal data often suggests two distinct groups in your dataset.
Outliers strongly pull the mean toward extreme values but have limited impact on the median and no effect on the mode. This is why the median is preferred for skewed distributions. The IQR method flags values below Q1 − 1.5×IQR or above Q3 + 1.5×IQR as outliers.
The mean is the arithmetic average (sum divided by count). The median is the middle value when data is sorted. The mode is the most frequently occurring value. For symmetric data all three are similar. For skewed data they diverge, with the mean pulled toward the tail.
Yes. If every value in the dataset appears exactly once, or all values appear with equal frequency, then there is no mode. This is common with continuous data or small samples where repeats are unlikely.
Sort the data, then split into two halves. Q1 is the median of the lower half and Q3 is the median of the upper half. The IQR (interquartile range) is Q3 − Q1 and represents the spread of the middle 50% of your data.

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.