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.

ODD count (n): Median = value at position (n+1)/2
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.

No mode: All values appear equally often [1,2,3,4]
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

Mean: Best for symmetric distributions without outliers
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

Q1 = Median of the lower half (25th percentile)
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)

Mean − Mode ≈ 3 × (Mean − Median)

This is Karl Pearson's empirical relation.
It holds approximately for moderately skewed distributions.

Frequently Asked Questions

The median is the middle value of a sorted dataset. Sort all values from smallest to largest. If odd count: median = value at position (n+1)÷2. If even count: median = average of values at positions n÷2 and n÷2+1. Example (odd): [3,7,9,15,21] → n=5, median at position 3 = 9. Example (even): [4,8,12,16] → n=4, median = (8+12)÷2 = 10. The median is unaffected by outliers - adding a value of 10,000 to the even dataset above keeps the median at 10.
The mode is the value appearing most frequently. A dataset can have: no mode (all values unique), one mode (unimodal: [1,2,2,3,4] → mode = 2), two modes (bimodal: [1,1,2,2,3] → modes = 1 and 2), or many modes (multimodal). Mode is the only measure of centre that applies to categorical data - 'most popular product' or 'most common answer' - where mean and median are meaningless. If all values appear equally often, the dataset has no mode.
Yes - when two or more values share the highest frequency, all are modes. [1,1,2,2,3] → bimodal with modes 1 and 2. [1,1,2,2,3,3] → trimodal with modes 1, 2, and 3. If all values appear the same number of times, there is no mode. A bimodal distribution often indicates two distinct groups in the data - for example, test scores might be bimodal if half the class studied thoroughly and half did not, creating two clusters.
Use the median when data is skewed or contains outliers. Classic examples: income distributions (a few very high earners pull the mean far above what most people earn), house prices, medical costs, website response times, and wealth data. Median is resistant to outliers - one extreme value cannot shift it. Use the mean when data is symmetric with no significant outliers and when you need the value for further calculations (standard deviation, variance, and most statistical tests use the mean).
The difference reveals skewness. Mean > Median: right-skewed (positive skew) - a tail of high values pulls the mean up. Income is the classic example. 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 - a normal distribution has mean = median = mode. The larger the gap between mean and median relative to the standard deviation, the more skewed the distribution.
IQR (Interquartile Range) = Q3 − Q1, the range of the middle 50% of data. It measures spread while ignoring outliers. Used for outlier detection: values below Q1 − 1.5×IQR or above Q3 + 1.5×IQR are potential outliers (the box plot rule). IQR is robust - adding a massive outlier to the dataset barely changes the IQR. Compare this to range (max − min) which is completely distorted by one extreme value. IQR is the preferred spread measure for skewed data.
For moderately skewed distributions: Mode ≈ Mean − 3(Mean − Median). Equivalently: Mean − Mode ≈ 3(Mean − Median). This approximation is useful when exact mode calculation is difficult (especially in grouped/continuous data). Example: Mean = 25, Median = 24. Estimated Mode = 25 − 3(25−24) = 25 − 3 = 22. The relationship holds reasonably well for distributions that are not extremely skewed and is widely used in introductory statistics examinations in India.
A bimodal distribution has two distinct peaks - two values or ranges with higher frequency than their neighbours. It often signals that the data comes from two overlapping groups. Examples: test scores (group that studied vs group that didn't), height data mixing males and females, product review ratings (highly polarised: 1-star and 5-star heavy). When you see bimodal data, consider whether splitting the dataset into two subgroups would reveal cleaner patterns. A bimodal distribution can't be meaningfully described by a single mode.

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.

Same data, three different answers: Dataset: [18, 21, 22, 23, 24, 25, 95]. Mean = (18+21+22+23+24+25+95) ÷ 7 = 32.6 (pulled up by the outlier 95). Median = 23 (middle value, unaffected by 95). Mode = no mode (all values appear once). The "typical" value is 23, not 32.6.

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:

  1. Sort all values from smallest to largest
  2. Count the total number of values (n)
  3. 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.
  4. 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.

How this calculator works, and where the numbers come from

The Median & Mode Calculator applies the standard formula for this calculation to the values you enter and updates the result as you type. The calculation itself happens in your browser, and the page explains the method so you can check any result by hand.

Please note: Results are provided for general information and are calculated from the values you enter.

Sources and further reading

Last reviewed: by the CalcQube Editorial Team. See our editorial policy for how we build and check calculators, or report an error.