Skip to main content
ilovecalcs logoilovecalcs.

Math · Live

Average Calculator, five types of average.

Calculate the arithmetic mean, geometric mean, harmonic mean, median, and mode of any dataset, plus sum, count, range, quartiles, and a deviation table. Enter numbers individually or paste a comma-separated list.

Full guideReal-time

Inputs

Enter your numbers

Quick examples

6 values · max 50

1
2
3
4
5
6

Includes decimals and negatives. Results update instantly.

Arithmetic mean (average)

6 values

18

Sum 108 ÷ count 6

Median
15.5

middle value

Mode
None

all values unique

Midrange
23

(min + max) / 2

Geometric mean
13.9655

ⁿ√(product)

Harmonic mean
10.4995

n / Σ(1/xᵢ)

Mean abs. dev.
9.6667

Σ|xᵢ−mean| / n

Summary statistics

Count, sum, and spread

Count
6
Sum
108
Min
4
Max
42
Range
38
Q1
8
Q3
23
IQR
15

Distribution

442
Mean (18)Median (15.5)Data point

Deviations from mean

Values sorted ascending

mean = 18
#ValueDeviation (xᵢ − x̄)|Deviation|
14-1414
28-1010
315-33
416-22
523+55
642+2424

MAD = Σ|xᵢ − x̄| / n = 58 / 6 = 9.6667

Complete guide

What is an average?

An average is a single number that represents the "centre" or "typical value" of a dataset. The word average is used loosely in everyday speech to mean the arithmetic mean, but in mathematics there are at least five distinct types of average — each measuring centrality in a different way and suited to different kinds of data.

The arithmetic mean, the most common average

The arithmetic mean (or simply "the average") is the sum of all values divided by the count of values:

x̄ = (x₁ + x₂ + … + xₙ) / n = Σxᵢ / n

Example: mean of {4, 8, 15, 16, 23, 42}
= (4 + 8 + 15 + 16 + 23 + 42) / 6
= 108 / 6
= 18

The arithmetic mean is sensitive to outliers — extreme values that differ significantly from the rest of the data. A single very large value can pull the mean upwards substantially, making it a misleading representative when data is skewed. This is why median is often preferred for income or house-price data.

The median: the middle value

The median is the value that falls exactly in the middle when the data is sorted in ascending order. For an odd count of values, it is the literal middle value. For an even count, it is the arithmetic mean of the two middle values:

Sorted: {4, 8, 15, 16, 23, 42} (n = 6, even)
Median = (15 + 16) / 2 = 15.5

Sorted: {4, 8, 15, 23, 42} (n = 5, odd)
Median = 15 (3rd value)

The median is resistant to outliers: it does not change when you add an extreme value at either end. This makes it the preferred measure of centre for skewed distributions.

The mode: the most frequent value

The mode is the value (or values) that appears most frequently in a dataset. A dataset can have no mode (all values unique), one mode (unimodal), two modes (bimodal), or many modes (multimodal). The mode is the only average that applies to non-numeric data (e.g., "the most popular colour").

The geometric mean: for ratios and growth

The geometric mean is the nth root of the product of n values. It is only defined for positive numbers:

Geometric mean = ⁿ√(x₁ × x₂ × … × xₙ)

Geometric mean of {2, 8, 32}:
= ³√(2 × 8 × 32)
= ³√512
= 8

Use the geometric mean when averaging rates of change, growth factors, or ratios. For example, if an investment grows by 10%, 20%, and 30% in three consecutive years, the geometric mean growth rate gives the equivalent constant annual rate. The arithmetic mean would overstate the true compound return.

Formally: geometric mean ≤ arithmetic mean (AM–GM inequality), with equality only when all values are identical.

The harmonic mean: for rates and speeds

The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals:

Harmonic mean = n / (1/x₁ + 1/x₂ + … + 1/xₙ)

Harmonic mean of {60, 40} (two speeds):
= 2 / (1/60 + 1/40)
= 2 / (0.0167 + 0.025)
= 2 / 0.0417
≈ 48 mph (not 50 mph)

The harmonic mean is the correct average for situations where you are averaging rates with a fixed quantity; for example, the average speed for a round trip where you travel equal distances at different speeds. Using the arithmetic mean would give the wrong answer.

Formally: harmonic mean ≤ geometric mean ≤ arithmetic mean (HM–GM–AM inequality).

The midrange

The midrange is the arithmetic mean of the minimum and maximum values: (min + max) / 2. It is the simplest measure of centre but the most sensitive to outliers, since it uses only the two extreme values and ignores everything in between. It is rarely used in serious statistics but is sometimes reported alongside other measures for completeness.

Which average should you use?

AverageUse whenSensitive to outliers?
Arithmetic meanSymmetric distributions, general-purpose averageYes, strongly
MedianSkewed data, income, house prices, any data with outliersNo, resistant
ModeCategorical data, finding most common valueNo
Geometric meanGrowth rates, investment returns, ratiosModerate
Harmonic meanRates: speed, frequency, price-to-earningsModerate
MidrangeRough centre estimate when only extremes are knownYes, most sensitive

Mean absolute deviation (MAD)

The mean absolute deviation measures how spread out a dataset is: specifically, how far each value is from the mean on average:

MAD = Σ|xᵢ − x̄| / n

Dataset {2, 4, 6, 8, 10}, mean = 6:
|2−6| + |4−6| + |6−6| + |8−6| + |10−6|
= 4 + 2 + 0 + 2 + 4 = 12
MAD = 12 / 5 = 2.4

The deviation table in the calculator above shows each value's distance from the mean. Positive deviations (above the mean) are shown in amber; negative deviations (below the mean) are shown in blue. The MAD is a simple, interpretable measure of variability — "on average, values in this dataset are {MAD} away from the mean."

Quartiles and the IQR

Quartiles divide sorted data into four equal groups:

  • Q1 (25th percentile): 25% of values fall below this.
  • Q2 (50th percentile): the median.
  • Q3 (75th percentile): 75% of values fall below this.
  • IQR (Interquartile Range) = Q3 − Q1, the spread of the middle 50% of data.

The IQR is the basis for box-and-whisker plots and the standard definition of outliers: values more than 1.5 × IQR below Q1 or above Q3 are considered potential outliers.

Worked example: comparing averages

Dataset: {10, 12, 12, 15, 18, 20, 100}

Arithmetic mean = (10+12+12+15+18+20+100) / 7 = 26.71
Median = 15 (4th of 7 sorted values)
Mode = 12 (appears twice)
Geometric mean = ⁷√(10×12×12×15×18×20×100) ≈ 19.42
Harmonic mean ≈ 16.25
Midrange = (10 + 100) / 2 = 55

Notice how the arithmetic mean (26.71) and midrange (55) are pulled high by the outlier (100), while the median (15) and harmonic mean (16.25) are barely affected. When your data contains outliers or is right-skewed, the median is usually the most representative "centre."