📊 Median & Mode Calculator
Paste any dataset to instantly get the median, mode, mean, range, IQR, quartiles, standard deviation, and outliers - with step-by-step solutions for median and mode. The Frequency tab shows how often each value appears, and the chart visualises the distribution shape so you can immediately see if it's symmetric, left-skewed, or right-skewed.
📊 Enter Your Data
📋 Frequency Table
Enter data in the Calculator tab first, then come here for the full frequency analysis.
No data yet - enter numbers in the Calculator tab.
📐 Median & Mode Formulas
Median - Middle Value
Sort the data, then find the middle value. If two middle values, average them.
EVEN count (n): Median = average of values at n/2 and n/2+1
Example (odd): [2, 4, 6, 8, 10] → n=5, pos=3 → Median = 6
Example (even): [2, 4, 6, 8] → n=4, pos=2&3 → Median = (4+6)/2 = 5
Mode - Most Frequent Value
The value that appears most often. A dataset can have 0, 1, or multiple modes.
Unimodal: One value is most frequent → [1,2,2,3] → Mode=2
Bimodal: Two values tie for most freq → [1,1,2,2,3] → Mode=1,2
Multimodal: Three or more modes → [1,1,2,2,3,3,4]
Mean vs Median - When to Use Which
→ Test scores, heights, weights
Median: Best for skewed data or when outliers are present
→ Income, house prices, response times
If Mean > Median → data is right-skewed (outliers high)
If Mean < Median → data is left-skewed (outliers low)
If Mean = Median → data is symmetric
Quartiles & IQR
Q2 = Median of whole dataset (50th percentile)
Q3 = Median of the upper half (75th percentile)
IQR = Q3 − Q1
Outlier if: x < Q1 − 1.5×IQR
or: x > Q3 + 1.5×IQR
Empirical Relationship (For Normal Distributions)
This is Karl Pearson's empirical relation.
It holds approximately for moderately skewed distributions.
❓ Frequently Asked Questions
Median & Mode Calculator - Three Measures of Centre and When to Use Each
Median, mode, and mean are three different ways of describing the "centre" of a dataset - but they give very different answers for the same data, and choosing the wrong one can lead to misleading conclusions. Understanding when each measure is appropriate is as important as knowing how to calculate it.
How to Calculate Median - Step by Step
The median always requires sorting first. The method then depends on whether the count is odd or even:
- Sort all values from smallest to largest
- Count the total number of values (n)
- If n is odd: The median is the value at position (n+1)÷2. For n=7: position 4. Dataset [2,4,6,8,10,12,14] → median = 8.
- If n is even: The median is the average of values at positions n÷2 and (n÷2)+1. For n=6: positions 3 and 4. Dataset [2,4,6,8,10,12] → median = (6+8)÷2 = 7.
Mean vs Median vs Mode - When to Use Each
Use Mean When...
- Data is roughly symmetric (no significant skew)
- No extreme outliers are present
- You need the value for further statistical calculations (standard deviation uses mean)
- Examples: test scores within a normal range, daily temperatures, manufacturing measurements
- Mean uses all values - sensitive to every data point
Use Median or Mode When...
- Median: Skewed data or outliers present - income, house prices, response times, hospital wait times
- Mode: Categorical data where "average" makes no sense - most popular product, most common shoe size, most frequent vote
- Mode: identifying clustering - "where does the data concentrate?"
- Both: exploring bimodal distributions (two distinct groups)
IQR and Outlier Detection - The Box Plot Method
The IQR (Interquartile Range) = Q3 − Q1 represents the spread of the middle 50% of the data. It's a robust measure of spread - outliers don't affect it. The standard outlier detection rule:
- Lower fence = Q1 − 1.5 × IQR
- Upper fence = Q3 + 1.5 × IQR
- Any value below the lower fence or above the upper fence is a potential outlier
Example: Q1 = 20, Q3 = 40. IQR = 20. Lower fence = 20 − 30 = −10. Upper fence = 40 + 30 = 70. A value of 95 would be flagged as an outlier. This is the method used in box plots (box-and-whisker plots) and is the most common outlier detection approach in descriptive statistics.
Skewness - What Mean vs Median Tells You
Comparing the mean and median reveals the shape of a distribution without needing to plot it:
- Mean > Median: Right-skewed (positive skew) - a tail of high values is pulling the mean up. Income distributions typically show this pattern.
- Mean < Median: Left-skewed (negative skew) - a tail of low values pulls the mean down. Test scores near the maximum often show this.
- Mean ≈ Median: Roughly symmetric distribution - the normal (bell curve) distribution has mean = median = mode.
Karl Pearson's empirical relationship provides a useful approximation for moderately skewed distributions: Mode ≈ Mean − 3(Mean − Median). This lets you estimate the mode from the mean and median when exact calculation is not possible - useful in grouped data problems.