Free · Step-by-step · 7 charts · Full statistics suite

Mean, Median, Mode Calculator — With Every Descriptive Statistic

Paste numbers, get every descriptive statistic instantly. Mean, median, mode, geometric mean, harmonic mean, weighted mean — plus range, quartiles, IQR, variance, standard deviation, MAD, skewness, kurtosis, z-scores, percentiles, confidence intervals, and outlier detection. Full step-by-step working. Seven interactive charts. Regression, correlation, two-sample comparison, and data transformation. All calculations run in your browser.
📊 7 interactive charts 🧮 Step-by-step working 📋 4 input modes 📈 Regression & correlation 🎯 Outliers, z-scores, CIs 🔒 100% in-browser

Mean, Median & Mode Calculator

Live calculation · 7 chart types · regression · full working.
0 chars
Try:

Drop a CSV or TXT file here — or click to browse

ValueFrequency

Enter class intervals with frequencies. The calculator uses class midpoints. For open classes like "60+", enter a plausible upper bound.

LowerUpperFrequency

Enter value + weight pairs. Use this for weighted grades, expected values, or anything where each observation has different importance.

ValueWeight
⚙️ Options & precision
Enter some numbers above to see the statistics.
Parsed preview 0 values
Your parsed values will appear here as you type.
Mean
—
arithmetic average
Median
—
middle value
Mode
—
most frequent
Geometric mean
—
for growth rates

📈 What the shape tells you

Enter data above to see an interpretation of the distribution's shape and which average is most representative.

Distribution
Enter at least two numbers to see the distribution.
Bins: 10

All statistics

🧮 Step-by-step working

Enter numbers above to see the calculation steps.

📋 Sorted data & frequency table

Enter numbers above to see the sorted table.

Data set B

Welch's t-test

Enter a second data set to see the comparison.

Paired data (x, y)

Results

Enter paired data to see the regression.

Apply a transformation to your data and see the resulting statistics. Transformations are useful for reducing skew, stabilising variance, or comparing on a different scale.

Choose a transformation to see its effect on the mean, median, and spread.

Recent data sets

No data sets yet.

What mean, median and mode actually measure

The mean, median and mode are the three standard measures of central tendency — three different answers to the question: what single number best represents this whole data set? They are not competitors. They are three tools, each of which answers the question well for some kinds of data and badly for others.

The mean is the arithmetic average: sum ÷ count. It uses every observation and is the basis of most statistical inference, but a single extreme value can pull it far from the bulk of the data. The median is the middle value after sorting. It ignores how far the extremes are, so it stays close to the "typical" value even when the data are skewed. The mode is the most frequent value and is the only average that works on categorical data.

For a quick example, take 4, 8, 15, 16, 23, 23, 42. Mean: 131 ÷ 7 ≈ 18.71. Median: the 4th sorted value = 16. Mode: 23 (appears twice). A "typical value" is probably 16 — the median — because the single 42 stretches the mean upward.

The complete formula sheet

Every statistic has one job, and knowing what that job is makes the numbers much easier to trust. This is the full reference for all the statistics the calculator produces.

Measures of center

StatisticFormulaWhen to use it
Mean (arithmetic)x̄ = Σx ÷ nSymmetric data without outliers. Foundation of most inference.
Medianmiddle of sorted xSkewed data, ordinal data, any data with outliers.
Modemost frequent xCategorical data. Also useful to spot bimodality or clustering.
Geometric mean(∏xᵢ)^(1/n)Growth rates, ratios, multiplicative processes. Requires all x > 0.
Harmonic meann ÷ Σ(1/xᵢ)Rates and per-unit ratios — speeds, price-earnings, F1 scores. Requires all x > 0.
Weighted meanΣ(wᵢxᵢ) ÷ ΣwᵢWeighted grades, survey weights, expected value.
RMS√(Σxᵢ² ÷ n)Root-mean-square — signal processing, error metrics.
Trimmed meanmean after dropping p% each endCompromise between mean and median. Common in sports judging.

Measures of spread

StatisticFormulaMeaning
Rangemax(x) − min(x)Total span. Very sensitive to a single extreme value.
Q1, Q2, Q325th, 50th, 75th percentilesThe "quarter markers". Q2 is the median.
IQRQ3 − Q1Spread of the middle 50%. Resistant to outliers.
Variance (population)σ² = Σ(x−μ)² ÷ NAverage squared deviation from the mean.
Variance (sample)s² = Σ(x−x̄)² ÷ (n−1)Same, with Bessel's correction.
Standard deviationσ or s = √varianceSpread in the same units as the data.
MAD (around mean)Σ|x − x̄| ÷ nAverage absolute distance from the mean.
Median absolute deviationmedian(|xᵢ − median|)Robust spread. Often paired with the median.
Coefficient of variationσ ÷ |x̄| × 100%Relative spread. Only meaningful for ratio data.
Standard error of the meanSE = s ÷ √nUncertainty in the sample mean estimate.

Shape and distribution

StatisticFormulaInterpretation
Skewnessadjusted Fisher–Pearson g₁Asymmetry. Positive = right tail. Negative = left tail. |g₁| < 0.5 ≈ symmetric.
Bowley skewness(Q3 + Q1 − 2Q2) ÷ (Q3 − Q1)Robust quartile-based skewness. Bounded −1 to +1.
Kurtosisexcess (Fisher) g₂Tail weight vs normal. 0 = normal. Positive = heavier tails.
PercentilesPpValue below which p% of the data fall.
Z-scorez = (x − x̄) ÷ sHow many SDs from the mean.
Outlier fencesQ1 − 1.5·IQR & Q3 + 1.5·IQRStandard Tukey outlier test.

Inference

StatisticFormulaWhat it tells you
CI for the meanx̄ ± t*·(s ÷ √n)Range of plausible values for the population mean.
Welch's t statistic(x̄₁−x̄₂) ÷ √(s₁²/n₁+s₂²/n₂)Two-sample test of equal means.
Pearson rΣ(x−x̄)(y−ȳ) ÷ √(Σ(x−x̄)²Σ(y−ȳ)²)Linear association. −1 to +1.
Spearman ρPearson r on ranked dataMonotonic association. Robust to outliers.
Least-squares lineŷ = a + b·xLine minimising squared residuals.
R²r²Proportion of variance in y explained by x.

Worked example — 4, 8, 15, 16, 23, 42

This is the classic six-value data set used in almost every statistics textbook. Here is what each statistic tells you.

Mean. 4 + 8 + 15 + 16 + 23 + 42 = 108. n = 6. Mean = 108 ÷ 6 = 18.

Median. Sorted: 4, 8, 15, 16, 23, 42. Even count → average middle pair: (15 + 16) ÷ 2 = 15.5.

Mode. Every value appears exactly once. There is no mode.

Range. 42 − 4 = 38.

Quartiles (Tukey). Split into {4, 8, 15} and {16, 23, 42}. Q1 = 8, Q3 = 23. IQR = 15. Fences: −14.5 and 45.5 → no outliers.

Standard deviation. Deviations from 18: −14, −10, −3, −2, 5, 24. Squared sum: 910. Population variance: 910/6 ≈ 151.67, σ ≈ 12.32. Sample variance: 910/5 = 182, s ≈ 13.49.

Geometric mean. (4×8×15×16×23×42)^(1/6) = (7,418,880)^(1/6) ≈ 13.98.

Skewness. Right tail is longer → right-skewed. Mean (18) above median (15.5). Classic right-skew signature.

Geometric and harmonic mean — when the arithmetic mean lies

The arithmetic mean is only "the" average when data are on an additive scale. For multiplicative processes — investment returns, price ratios, growth rates — it systematically overestimates the true average.

Geometric mean: for growth rates and ratios

If an investment returns +10%, −20%, then +15%, the arithmetic mean return is 1.67%. But trace the money: $1000 × 1.10 × 0.80 × 1.15 = $1012, which is +1.2% total, or about +0.4% per year. The geometric mean of the multipliers (1.10 × 0.80 × 1.15)^(1/3) ≈ 1.00399 correctly reports the compound growth.

💡 Rule of thumb. If your data are ratios, growth rates, or on a log scale, use the geometric mean. If your data are counts or measurements that add naturally, use the arithmetic mean.

Harmonic mean: for rates and per-unit ratios

If you drive 60 mph for half a trip and 40 mph for the other half, the intuitive average of 50 mph is wrong. You spend more time at the slower speed. The correct average is the harmonic mean: 2 ÷ (1/60 + 1/40) = 48 mph.

Use the harmonic mean for: average speed over equal distances, average price-to-earnings across equal-dollar positions, average fuel efficiency when the denominator varies, F1 score (harmonic mean of precision and recall).

The AM-GM-HM chain

For any positive numbers: harmonic mean ≤ geometric mean ≤ arithmetic mean, with equality only when all values are identical. The gap between AM and GM is itself a measure of variability.

Which average should you report?

  • Roughly symmetric, no strong outliers. Report the mean.
  • Right-skewed (mean > median). Report the median. Incomes, house prices, view counts.
  • Left-skewed (mean < median). Report the median. Exam scores near a ceiling, retirement ages.
  • Non-numeric data. Only the mode.
  • Multiplicative data (growth, ratios). Geometric mean.
  • Rates and per-unit ratios. Harmonic mean.
  • Weighted data. Weighted mean.
  • Bimodal data. Report both modes plus the split point. A single "average" of a bimodal distribution is misleading.
💡 The mean-median gap is diagnostic. If the mean and median differ substantially, the data are skewed and reporting the mean alone will mislead readers.

Outliers and the 1.5 × IQR rule

An outlier is a value far from the rest. The standard definition, popularised by John Tukey:

lower fence = Q1 − 1.5 × IQR     upper fence = Q3 + 1.5 × IQR

Any value outside the fences is a "potential outlier". Other texts use 3 × IQR (extreme outlier), z-score thresholds (|z| > 3), or the modified z-score with median and MAD.

⚠ Do not delete outliers automatically. Removing a legitimate extreme value biases the mean and hides real signal. Investigate first: is the value plausible? Was it entered correctly? Does it come from the same process?

Z-scores: how unusual is a value?

z = (x − x̄) ÷ s standardises a value. z = 0 is at the mean; |z| ≥ 2 is outside the middle ~95%; |z| ≥ 3 is outside the middle ~99.7%.

Percentiles and percentile ranks

A percentile is a value below which a given percentage of the data falls. The 25th percentile (Q1) has 25% of the data below it. The calculator reports P5, P10, P25, P50, P75, P90, P95, and all nine deciles.

Percentiles are essential for income distributions, growth charts, test scores, service levels (p95 latency), and risk management (Value at Risk).

Confidence intervals — how uncertain is the mean?

The sample mean is an estimate of the true population mean. A confidence interval quantifies the uncertainty:

CI = x̄ ± t* · (s ÷ √n)

A 95% CI means: if we repeated this sampling many times, 95% of the intervals we constructed would contain the true population mean. The true mean is fixed; the interval is random.

Why quartiles can differ from Excel

There is more than one legitimate quartile definition. For 1, 2, 3, 4, 5:

MethodQ1Q3Used by
Tukey's hinges1.54.5Most textbooks (default here)
Linear interpolation, inclusive24Excel QUARTILE.INC, Google Sheets
Linear interpolation, exclusive1.54.5Excel QUARTILE.EXC, Minitab

All are legitimate. The calculator's Options panel lets you match whichever convention your course uses.

Stem-and-leaf, ogive, violin, and Q-Q plots

Beyond the histogram and box plot, the calculator offers four more chart types:

  • Stem-and-leaf plot — preserves every value while showing the distribution shape. The "stem" holds the higher-order digits, the "leaves" the rest.
  • Ogive (cumulative frequency curve) — shows the cumulative percentage below each value. Read any percentile directly off the plot.
  • Violin plot — a mirror-image density curve, showing the full shape of the distribution rather than just quartiles.
  • Q-Q plot — plots observed quantiles against expected normal quantiles. Points close to the diagonal suggest the data are approximately normal; S-shaped deviations indicate skew; heavy tails show as endpoints off the diagonal.

Grouped data — when you only have class intervals

Often raw data are unavailable — you only have a frequency distribution with class intervals. The calculator's Grouped mode accepts class bounds and frequencies and computes all statistics using the class midpoints.

⚠ Grouped data loses information. All statistics from class midpoints are approximations. Use raw data when available.

Regression and correlation

When your data are paired (x, y), the calculator can fit a least-squares line and compute correlations:

  • Pearson's r — strength and direction of the linear relationship, −1 to +1.
  • Spearman's ρ — Pearson's r on ranked data. Measures monotonic (not necessarily linear) association.
  • R² — proportion of variance in y explained by x.
  • Least-squares line — ŷ = a + b·x, minimising squared vertical residuals.
⚠ Correlation is not causation. A strong r does not mean x causes y. There could be a lurking variable, reverse causation, or coincidence.

Common misconceptions

  • "The median is halfway between max and min." It is the middle of the sorted values, not the range midpoint. For 1, 1, 1, 1, 100 the median is 1, not 50.
  • "The mean and median should be the same." Only in perfectly symmetric distributions.
  • "If there are two middle values, add them." You add and divide by two.
  • "A data set must have a mode." Many do not.
  • "Outliers can be safely removed." Only after investigation.
  • "Standard deviation and variance are the same thing." Variance is the squared version; SD is in the original units.
  • "The mean of returns is your actual return." No — the compound return is the geometric mean.
  • "Correlation implies causation." It does not.

Study guide

  1. Start with hand calculation. Compute mean, median and mode for {4, 8, 15, 16, 23, 42} and for {1, 1, 2, 5, 6, 6, 9}. Verify against the calculator.
  2. Build shape intuition. Sketch a histogram of each data set. Notice the mean is pulled toward the tail.
  3. Learn formulas as definitions. Every formula has a plain-English reading.
  4. Practice quartiles with both methods. Compare Tukey and Excel conventions on the same data.
  5. Work through outliers. Compute fences. Verify flagged values.
  6. Understand sample vs population. Both SDs differ by √((n−1)/n).
  7. Do a regression by hand. Five pairs is enough. Compute Sxy, Sxx, slope, intercept, r.
  8. Interpret CIs carefully. "If we repeated the sampling, X% of intervals would contain the true mean."
  9. Test yourself. Use the example buttons as self-tests — cover results and compute by hand first.

Glossary

Arithmetic mean
The sum of all values divided by the count.
Median
The middle value of sorted data. For an even count, average the middle pair.
Mode
The most frequent value. A data set can have no mode, one mode, or multiple.
Geometric mean
nth root of the product of positive values. For growth rates and ratios.
Harmonic mean
n divided by sum of reciprocals. For rates with varying denominators.
Weighted mean
Each value multiplied by a weight, summed, divided by total weight.
Variance
Average of squared deviations from the mean.
Standard deviation
Square root of variance. Same units as data.
Range
Maximum minus minimum.
IQR
Q3 − Q1. Spread of the middle 50%.
Quartiles
Values splitting data into four equal parts: Q1, Q2, Q3.
Percentile
Value below which a given percentage of data falls.
Decile
Every 10th percentile.
Z-score
How many SDs from the mean: z = (x − x̄) ÷ s.
Outlier
Value far from the rest. Flagged by 1.5 × IQR rule.
Skewness
Asymmetry. Positive = right tail longer.
Kurtosis
Tail weight vs normal. Excess kurtosis is 0 for normal.
Coefficient of variation
SD ÷ mean, as %. Compares spread across scales.
Standard error
SD of the sample mean: s ÷ √n.
Confidence interval
Range of plausible values for the population mean.
MAD (mean)
Average absolute deviation from the mean.
Median absolute deviation
Median of |x − median|. Robust spread.
Trimmed mean
Mean after dropping top and bottom p%.
Bimodal
Two modes. Often sign of two subgroups.
Multimodal
Three or more modes.
Amodal
No mode — every value unique.
Stem-and-leaf
Display preserving every value with stems and leaves.
Ogive
Cumulative frequency curve.
Violin plot
Mirror-image density showing full distribution shape.
Q-Q plot
Observed vs expected normal quantiles. Tests normality.
Pearson correlation
Linear association, −1 to +1.
Spearman correlation
Monotonic association on ranked data.
R²
Proportion of y variance explained by x.
Least-squares regression
Line minimising squared residuals.
Welch's t-test
Two-sample test of equal means without equal variance assumption.
Class midpoint
Average of lower and upper class bounds.
Bessel's correction
Dividing by n−1 instead of n in sample variance.

Frequently asked questions

How do you calculate mean, median and mode?

Mean: sum ÷ count. For 4, 8, 15, 16, 23, 42 that's 108 ÷ 6 = 18. Median: sort, take the middle. For an even count, average the middle pair — 15 and 16 give 15.5. Mode: count frequencies. For 1, 1, 2, 5, 6, 6, 9 the modes are 1 and 6.

What is the difference between mean, median and mode?

The mean uses every value and is pulled by extremes. The median is the middle value and is robust to outliers. The mode is the most frequent value and the only average for categorical data.

How do you find the median with an even number of values?

Sort ascending, take the two middle values, average them. For 1, 1, 2, 6, 6, 9: (2 + 6) ÷ 2 = 4.

What if there is no mode?

If every value appears exactly once, there is no mode. That's a valid answer, not an error.

Can there be more than one mode?

Yes. Bimodal = two values tie for highest frequency. Multimodal = three or more tie.

What is the range?

Max − min. For 4, 8, 15, 16, 23, 42: 42 − 4 = 38.

What is the difference between sample and population standard deviation?

Population divides by n (you have all members). Sample divides by n−1 (Bessel's correction). Use sample when your numbers are a subset.

Why do my quartiles differ from Excel?

There is more than one legitimate definition. Tukey's hinges vs Excel's linear interpolation differ. The calculator lets you pick.

What is an outlier and how is it detected?

A value far from the rest. Detected by the 1.5 × IQR rule: values below Q1 − 1.5×IQR or above Q3 + 1.5×IQR are flagged.

When should I use the median instead of the mean?

When data are skewed or contain outliers — incomes, house prices, wait times. In 1, 2, 3, 4, 100 the mean is 22 but the median is 3.

When should I use the geometric mean instead of the arithmetic mean?

For growth rates, ratios, and multiplicative processes. The arithmetic mean systematically overestimates compound growth.

When should I use the harmonic mean?

For rates where the denominator varies — average speed over equal distances, average P/E ratio, average fuel efficiency when measured over equal fuel used.

What is a weighted mean?

Σ(value × weight) ÷ Σ(weight). Use for weighted grades, survey weights, expected value, portfolio returns, index numbers.

What is a z-score?

(x − x̄) ÷ s. How many standard deviations a value is from the mean. |z| ≥ 3 is often used as an outlier threshold.

What is a confidence interval?

x̄ ± t*·(s ÷ √n). A 95% CI means: if we repeated the sampling, 95% of intervals would contain the true mean.

How do I use the frequency table mode?

Enter each distinct value with its count. The calculator expands counts internally, so statistics are exact.

What is grouped data?

Data summarised as class intervals with frequencies. The calculator uses class midpoints.

Does the calculator handle negative numbers and decimals?

Yes. Negative values, decimals and scientific notation like 1.5e-3 are all accepted. Geometric and harmonic means require positive values.

Can I paste data from Excel?

Yes. Tabs and line breaks are treated as separators. You can also upload a CSV file.

What is a trimmed mean?

Remove p% from each end, then average. A 10% trimmed mean on 20 values drops the 2 lowest and 2 highest.

What is skewness?

Asymmetry. Positive means the right tail is longer (mean > median). Negative means the left tail is longer.

What is kurtosis?

Tail weight vs a normal distribution. Excess kurtosis = 0 for normal. Positive = heavier tails.

How does the two-sample comparison work?

Paste a second data set in the Compare tab. The calculator runs Welch's t-test, which tests whether two populations have equal means without assuming equal variances. Reports t, Welch degrees of freedom, and two-sided p-value.

How do I use the regression section?

Enter paired (x, y) values — one pair per line — in the Regression tab. Get the least-squares line, R², Pearson's r, Spearman's ρ, and a scatter plot.

What does R² mean?

The proportion of variance in y explained by x. R² = 0.64 means 64% of the variance in y is explained by the linear relationship with x.

Does correlation imply causation?

No. A strong correlation does not mean one variable causes the other. There could be a lurking variable, reverse causation, or coincidence.

What is the coefficient of variation?

SD ÷ |mean| × 100%. Compares spread across data sets with different units. Only meaningful for ratio data with a true zero.

How do I read a stem-and-leaf plot?

The stem holds higher-order digits (e.g. tens), the leaves hold lower-order digits (units). Stem 3 with leaves 1, 2, 5 represents 31, 32, 35.

What is an ogive?

A cumulative frequency curve. You can read any percentile directly by finding the x-value where the curve reaches that cumulative percentage.

What is a violin plot?

A mirror-image density curve showing the full distribution shape. Wider regions indicate higher density; the median and quartiles are usually overlaid.

What is a Q-Q plot?

Plots observed quantiles against expected normal quantiles. Points on the diagonal indicate normal data; S-shape indicates skew; heavy tails show as endpoints off the diagonal.

Is my data uploaded?

No. Everything runs in your browser using plain JavaScript. Nothing is sent to any server.

How many numbers can I enter?

Up to 50,000 individual values, or 100,000 total frequency in frequency mode. Charts render a capped preview for large data sets.

Sources & methodology

Scroll to Top