How the average calculator works
"Average" usually means the arithmetic mean, but the median and mode are averages too, and each answers a different question about a list of numbers. This calculator reports all three along with the sum, count, minimum, maximum, range, and standard deviation, so you can see the center of the data and how spread out it is.
mean = sum of values / count median = middle value of the sorted list (mean of the two middle values if the count is even) mode = most frequent value(s) range = maximum - minimum
Worked example
The default list is 2, 4, 4, 4, 5, 5, 7, 9: eight numbers that sum to 40.
mean = 40 / 8 = 5 median = sorted list is already 2 4 4 4 | 5 5 7 9, middle pair is 4 and 5, so (4 + 5) / 2 = 4.5 mode = 4 (appears three times) range = 9 - 2 = 7
Standard deviation
Standard deviation measures how far values typically sit from the mean. Subtract the mean from each value, square the differences, average the squares (that average is the variance), and take the square root. The only choice is what to divide by: n for a population, n - 1 for a sample, which slightly inflates the estimate to correct for the fact that a sample tends to underestimate spread.
deviations from 5: -3, -1, -1, -1, 0, 0, 2, 4 squared: 9, 1, 1, 1, 0, 0, 4, 16 (sum 32) population variance = 32 / 8 = 4 -> standard deviation = 2 sample variance = 32 / 7 = 4.5714 -> standard deviation = 2.1381
The population figures are what a textbook exercise wants when it gives you "the data". The sample figures are what a survey or experiment wants. Spreadsheets follow the same split: STDEV.P and STDEV.S.
Which average to use
| Measure | Best when | Watch out for |
|---|---|---|
| Mean | Values are roughly symmetric with no extreme outliers; you need a total (mean x count = sum) | A single huge value drags it toward the tail |
| Median | Data is skewed (incomes, prices, wait times) or has outliers | Ignores the actual size of extreme values |
| Mode | Data is categorical or you want the most common value (shoe sizes, survey answers) | May not exist, or there may be several |
Mean of a skewed list
Consider five salaries: 40,000, 45,000, 50,000, 55,000, and 400,000. The mean is 118,000, which is higher than four of the five values; the median is 50,000, which describes the typical person. The mode does not exist. Whenever the mean and median differ a lot, the data is skewed and the median is usually the more honest summary.
Tips for entering data
- Paste a column straight from a spreadsheet; line breaks and tabs are fine.
- Negative numbers and decimals are supported. Scientific notation like 2e3 works.
- Any token that is not a number stops the calculation and is named in the message, so stray labels are easy to find.
- To average grades with category weights, use the grade calculator; for a GPA, use the GPA calculator.