Average Calculator: Mean and Weighted Average
Paste a list of numbers to get the average, with the sum, count, smallest and largest. Or switch to a weighted average, where each value has a weight, as with course grades.
Last reviewed
Average (mean)
5
of 8 numbers: sum 40 ÷ 8
- Sum
- 40
- Count
- 8
- Smallest
- 2
- Largest
- 9
The average is the arithmetic mean. One very large or very small number can pull it a long way, so look at the smallest and largest too.
What an average is
When people say “average” they usually mean the arithmetic mean: add up the numbers and divide by how many there are. It gives one number that stands for a whole list, the value each item would have if the total were shared out equally.
This calculator finds that average for a list you paste in, and it also finds a weighted average, where some values count for more than others.
The formula
average = sum of the numbers ÷ how many numbers there are
An example. The numbers are 2, 4, 4, 4, 5, 5, 7 and 9.
- The sum is 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40.
- There are 8 numbers.
- The average is 40 ÷ 8 = 5.
The calculator also shows the smallest and largest, because the mean always lies between them. If it does not, something is wrong with the data.
Exact answers
The sums use exact decimal arithmetic. Most software works in binary fractions, which cannot represent 0.1 exactly, so the average of 0.1, 0.2 and 0.3 can come out as 0.20000000000000004. Here the sum is exactly 0.6 and the average exactly 0.2.
Weighted average
A weighted average is used when the items do not count equally, such as course grades where an exam is worth more than a quiz.
weighted average = sum of (value × weight) ÷ sum of the weights
A grade example. A course has three parts. The scores are 90, 80 and 70 and they are worth 30%, 20% and 50% of the grade.
- 90 × 30 = 2,700; 80 × 20 = 1,600; 70 × 50 = 3,500.
- The total is 2,700 + 1,600 + 3,500 = 7,800.
- The weights add to 100, so the weighted average is 7,800 ÷ 100 = 78.
The plain average of 90, 80 and 70 is 80. The weighted average is lower because the lowest score carries the most weight.
Weights need not add up to 100. A value of 80 with weight 2 and 90 with weight 3 gives (160 + 270) ÷ 5 = 86. The division by the total weight takes care of the scale, so you can use credits, hours, counts or percentages as weights.
To enter weighted data, put one value and its weight on each line, separated by a comma, a space or an x. A weight of zero ignores that value. A negative weight is refused.
Averaging averages
Taking the average of several averages is a classic trap. It only works if each group is the same size.
- Class A has 10 students and averages 80.
- Class B has 30 students and averages 60.
- The plain average of 80 and 60 is 70, which is wrong.
- The correct overall average is a weighted average: (10 × 80 + 30 × 60) ÷ 40 = (800 + 1,800) ÷ 40 = 65.
Class B has three times as many students, so it pulls the result towards 60.
When the mean misleads
The mean uses every value, so one extreme value can drag it a long way. For the numbers 1, 2, 3 and 100 the sum is 106 and the mean is 106 ÷ 4 = 26.5. Three of the four numbers are far below that. The median, the middle value, is (2 + 3) ÷ 2 = 2.5, which describes the typical number better. When a few values are very large or very small, as with incomes or house prices, look at the median too.
For the median, mode, spread and more, use the statistics calculator.
Not every average is a mean
Some averages have to be worked out differently. Take a car that goes 100 km at 60 km/h and then 100 km at 40 km/h.
- The plain average of the two speeds is 50 km/h, but that is not the average speed.
- The time taken is 100 ÷ 60 + 100 ÷ 40 = 1.667 + 2.5 = 4.167 hours.
- The distance is 200 km, so the average speed is 200 ÷ 4.167 = 48 km/h.
The car spent longer at the slower speed, so the true average is pulled towards 40. If it had driven for one hour at each speed, the simple average of 50 km/h would be right. Whether a plain mean works depends on what the values are weighted by.
Percentages and fractions
If your numbers are percentages that apply to different totals, weight them by those totals, as with the two classes above. To work out the change between two values, use the percentage change calculator, and for one-off percentage sums the percentage calculator. The fraction calculator handles fractions exactly.
How it is calculated
Numbers are read as exact decimals and summed to 50 digits. The average is the sum divided by the count, shown to up to 30 significant digits and then to 12 on screen with trailing zeros removed. A weighted average is the sum of each value times its weight, divided by the sum of the weights. The weights must not be negative and must not all be zero. Numbers such as 1,000 are refused, because a comma could mean a separator or the end of one number and the start of another.
Frequently asked questions
How do you calculate an average?
Add up the numbers and divide by how many there are. For 2, 4, 4, 4, 5, 5, 7 and 9 the sum is 40 and there are 8 numbers, so the average is 40 ÷ 8 = 5.
What is a weighted average?
An average where some values count for more. Multiply each value by its weight, add the results, and divide by the total of the weights. 90 at weight 30, 80 at weight 20 and 70 at weight 50 give (2,700 + 1,600 + 3,500) ÷ 100 = 78.
Do the weights have to add up to 100?
No. The division by the sum of the weights takes care of the scale. A value of 80 with weight 2 and 90 with weight 3 averages (160 + 270) ÷ 5 = 86.
Can I average two averages?
Only if the groups are the same size. If class A of 10 students averages 80 and class B of 30 averages 60, the overall average is (10 × 80 + 30 × 60) ÷ 40 = 65, not 70.
What is the difference between mean, median and mode?
The mean is the sum divided by the count, the median is the middle value and the mode is the most common. For 1, 2, 3 and 100 the mean is 26.5 but the median is 2.5, so one extreme value can drag the mean a long way. The statistics calculator gives all three.
Why are the results exact?
The calculator works in exact decimals. Computers that use binary fractions give 0.1 + 0.2 as 0.30000000000000004, and so can show the average of 0.1, 0.2 and 0.3 as 0.20000000000000004. Here it is exactly 0.2.
Related calculators
- Statistics CalculatorEnter your numbers, separated by commas, spaces or new lines.
- Percentage CalculatorPick the question you are actually asking.
- Percentage Change CalculatorEnter a starting and a new value to get the percentage change, or apply a percentage to a value, or find the value before a change.
- Fraction CalculatorEnter two fractions, mixed numbers, whole numbers or decimals and choose an operation.
- Number Sequence CalculatorChoose the type of sequence, give the first term and the rule, and say how many terms.
- Common Factor CalculatorEnter two to six whole numbers.