Average calculator

Paste or type your numbers, separated by spaces, new lines, semicolons or a comma and a space, to get the mean, median, mode, range, smallest and largest value, count and sum at once. A second section takes value and weight pairs for a weighted average, such as a course grade.

Average of a list

Separate with spaces, new lines, semicolons, or a comma followed by a space.

Mean (average)—
Weighted average

Example: a score of 82 that counts 30% of the grade is written "82 30".

Weighted mean—

Calculated in your browser. Nothing you enter is sent or stored.

Three kinds of average

“Average” usually means the arithmetic mean, but statisticians use three measures of the center of a set of numbers, and each answers a slightly different question. The Australian Bureau of Statistics defines them in plain terms, and the calculator reports all three side by side:

  • Mean: add every value and divide by how many there are. It uses every number, so each one pulls on the result.
  • Median: sort the values and take the middle one. With an even count there are two middle values, and the median is halfway between them.
  • Mode: the value that appears most often. A list can have one mode, several, or none when every value appears once.

Alongside them you get the count (how many numbers were read), the sum, the minimum and maximum, and the range, which is the maximum minus the minimum and gives a rough sense of spread.

Formulas for the mean and the weighted mean

mean = (x₁ + x₂ + … + xₙ) ÷ nmedian = middle value of the sorted list (average of the two middle values if n is even)weighted mean = (x₁w₁ + x₂w₂ + … + xₙwₙ) ÷ (w₁ + w₂ + … + wₙ)

The sum is accumulated with a compensated method, so a long column of values like 0.1 and 0.2 does not pick up stray digits from binary floating-point. Results are displayed to a bounded number of significant digits.

A weighted mean gives some values more say than others. Each value is multiplied by its weight, the products are added, and the total is divided by the sum of the weights, not by the count. Weights can be percentages, credits, hours, liters or any other measure of importance; they do not have to add up to 100, but none can be negative. In the calculator, type one pair per line, value first: “72 30” is a score of 72 with weight 30.

When the median tells you more than the mean

The mean is sensitive to extreme values, and the median is not. Replace the largest value in a list with a much bigger one and the mean moves a long way, while the middle value stays where it was. That is why income, house prices and waiting times are usually summarized with the median: a few very large values drag the mean upward, and it ends up higher than what most people actually see. The ABS notes that the median is usually preferred when a distribution is not symmetrical.

The mean is still the right choice when you need a total back. If you know the mean amount spent per person and the number of people, multiplying them gives the total spent. The median cannot do that.

Worked examples

Commute times in minutes over seven days: 22, 25, 25, 28, 30, 31, 95
  1. Count 7, sum 256, so the mean is 256 ÷ 7 = 36.571…, about 36.6 minutes.
  2. Sorted, the fourth value is the middle one: 28.
  3. 25 appears twice, more than any other value, so the mode is 25.
  4. Range: 95 − 22 = 73.
  5. Without the 95-minute day, the mean drops to 26.8 and the median to 26.5. The one unusual day lifted the mean by almost 10 minutes but the median by only 1.5.
Mean ≈ 36.6, median 28, mode 25, range 73
An even count with no repeated value: 4; 8; 15; 16; 23; 42
  1. Sum 108 over 6 values: mean 18.
  2. The two middle values are 15 and 16, so the median is 15.5, a number that is not in the list.
  3. Every value appears once, so there is no mode.
Mean 18, median 15.5, no mode
A course grade: coursework 72 (30%), midterm 65 (20%), final exam 80 (50%)
  1. Multiply each score by its weight: 72 × 30 = 2,160; 65 × 20 = 1,300; 80 × 50 = 4,000.
  2. Add the products: 7,460.
  3. Divide by the total weight, 100: 74.6.
  4. A plain average of 72, 65 and 80 is 72.33, which ignores that the final counts for half the grade.
Weighted mean 74.6; the plain mean would be about 72.3
Average price per liter after two fill-ups
  1. Use the liters as weights: (1.20 × 30 + 1.50 × 10) ÷ (30 + 10).
  2. 36 + 15 = 51, and 51 ÷ 40 = 1.275.
  3. The plain mean of the two prices, 1.35, would be wrong because more fuel was bought at the lower price.
30 L at 1.20 and 10 L at 1.50 average 1.275 per liter

Two modes or more

When two or more values tie for the highest frequency, the calculator lists each of them. In 12, 15, 11, 15, 14, 12, 13, both 12 and 15 appear twice, so the list is bimodal with modes 12 and 15, while the median is 13 and the mean about 13.14. Several modes can be a sign that the data mixes two groups, such as weekday and weekend figures.

Errors that skew an average

  • Averaging averages. The mean of two class averages is only the overall average if the classes are the same size. Otherwise use a weighted mean with class size as the weight.
  • Dividing a weighted total by the count. In the grade example, dividing 7,460 by 3 instead of by 100 gives nonsense. The divisor is the sum of the weights.
  • Commas that change the numbers. A comma followed by a space separates values, but a comma inside a number is read as part of it: 1,500 is fifteen hundred, 2,5 is two and a half, and 1,2,3 typed without spaces is read as the single number 123. Use spaces or new lines when in doubt.
  • Reporting the mean of skewed data alone. If the mean and median are far apart, give both, or the reader will picture a typical value that few items actually have.

Anything that is not a number, such as a stray word or unit pasted with the values, is skipped, left out of the count and the sum, and listed under “Ignored”. Check that the count matches the number of values you meant to enter.

Sources

  1. Measures of central tendency, Australian Bureau of Statistics.
  2. Weighted Mean, Wolfram MathWorld.