Weighted Average Calculator

Calculate a weighted average from your values and weights. Compare it with a simple average, see the totals behind it, and find the value needed to hit a target. Great for grades, GPA, and portfolios.

https://hexacalculator.com/calculators/mathematics/statistics/weighted-average-calculator

Mathematics

Statistics

Weighted Average Calculator

Calculate a weighted average from your values and weights. Compare it with a simple average, see the totals behind it, and find the value needed to hit a target. Great for grades, GPA, and portfolios.

Weighted Average Calculator

Your data

6 values

Add detail (optional)

Compare with a plain average

Show the unweighted average and how much the weights move the result.

Plan a target average

Work out the value a new item needs to pull the weighted average to a target.

Sum of weights
Number of values
Total of weight x value

Visualize the weighting

Loading calculator…

A weighted average gives some numbers more say than others. Instead of treating every value the same, it multiplies each one by a weight that reflects how much it should count, adds those up, and divides by the total weight. Enter your values and their weights and this calculator returns the weighted average, the totals behind it, and, if you want, how far the weighting moved the result away from a plain average.

What is a weighted average?

A weighted average, also called a weighted mean, is an average in which each value carries a weight that sets its importance. A plain average treats every number as equal. A weighted average lets you say that some numbers matter more, whether because they happen more often, cover more of a total, or simply deserve more emphasis.

The weights can be almost anything: how many times a value occurs, the credit hours behind a grade, the share of a portfolio held in an asset, or a judgment about which factors count most. What matters is the ratio between them, so the weights do not have to add up to 100 or to 1.

The weighted average formula

The weighted average is the sum of each value times its weight, divided by the sum of the weights:

xˉ=i=1nwixii=1nwi\bar{x} = \frac{\sum_{i=1}^{n} w_i \, x_i}{\sum_{i=1}^{n} w_i}

Here x_i is each value, w_i is its weight, and n is how many values you have. Take a simple example with three data points weighted 2, 5, and 3:

xˉ=(2)(10)+(5)(50)+(3)(40)2+5+3=20+250+12010=39010=39\bar{x} = \frac{(2)(10) + (5)(50) + (3)(40)}{2 + 5 + 3} = \frac{20 + 250 + 120}{10} = \frac{390}{10} = 39

The value 50 carries the heaviest weight, so the weighted average of 39 sits closer to it than the plain average of the three values, which is about 33.3. The table shows how each row contributes.

Value

Weight

Weight x value

10

2

20

50

5

250

40

3

120

Total

10

390

Weighted average

39

How to use this calculator

Type a value and a weight on each row. The weighted average updates as you go. A row only counts once its weight is above 0, so you can leave spare rows blank, and a value of 0 or a negative value is fine as long as it has a weight. Switch on more rows to enter up to eight items.

Turn on compare with a plain average to see the ordinary average of the same values next to the weighted one, along with the gap between them. Turn on plan a target average to work out the value a new item would need in order to pull your weighted average to a level you choose.

Weighted average versus simple average

A simple, or arithmetic, average adds the values and divides by how many there are, giving every value equal weight. A weighted average divides by the total weight instead, so values with larger weights count for more.

When all the weights are equal the two answers match. They only diverge when the weights differ, and the size of that gap tells you how much the weighting is really doing. The compare option in this calculator makes that gap visible.

Weights as frequencies

One of the most common uses of a weighted average is to fold in how often each value occurs. Suppose a class scored 70 twice, 80 three times, and 90 once. Rather than list all six grades, you can weight each distinct grade by its frequency:

xˉ=(2)(70)+(3)(80)+(1)(90)2+3+1=470678.33\bar{x} = \frac{(2)(70) + (3)(80) + (1)(90)}{2 + 3 + 1} = \frac{470}{6} \approx 78.33

The result is exactly the average of all six grades, reached with three rows instead of six. This is why a weighted average is often used to correct for uneven sample sizes, such as a survey with too few responses in one age group.

Where weighted averages are used

Grades and GPA are a classic case: a final exam worth 50 percent of a course counts far more than a quiz worth 5 percent, and your course grade is the weighted average of every assessment. Enter each score as a value and its share of the grade as the weight.

In investing, the average price you paid for a stock bought at several prices is a weighted average, with the number of shares as the weight. A portfolio's return is the weighted average of its holdings' returns, weighted by how much money sits in each. A portfolio of 55 percent stocks, 40 percent bonds, and 5 percent cash returning 10, 5, and 2 percent has a weighted return of 7.6 percent.

The same idea drives inventory accounting, where the weighted average cost smooths out price changes across purchases, and measures such as the weighted average cost of capital and the volume weighted average price.

Things to watch

A weighted average is only as good as its weights, and choosing them can add a dose of judgment. Make sure a heavy weight really belongs on the values you are emphasizing, because a small change in the weights can swing the result. Check that every value that should count has a weight, since a row with a weight of 0 is quietly left out.

This calculator is for general education and planning. Check the weighting rules that apply to your own grades, portfolio, or data before relying on the result.

Frequently asked questions

What is a weighted average calculator?

This is a tool to calculate the average of a set of values while also allowing you to assign each value a weight to determine its importance. You enter a value and a weight in each row, and it calculates the weighted average, sum of weights, and sum of products of weight and value.

How do you calculate a weighted average?

Multiply each value by its weight, add up those products and divide the result by the sum of weights. For values 10, 50 and 40 with corresponding weights 2, 5 and 3, the calculation is (20 + 250 + 120) divided by 10, which equals 390 divided by 10, or 39.

Do the weights have to sum up to 100 or 1?

No it is not necessary. Only the ratio between the weights matters since the formula divides by the sum of the weights. The weights 2, 5 and 3 give the same result as 20, 50 and 30 or 0.2, 0.5 and 0.3. You can use original frequencies, credit points, amounts or percentages.

What is the difference between a weighted average and an unweighted average?

A simple average treats each value equally and divides by the number of values. A weighted average divides by the sum of weights so that values with higher weight have more influence. The two are only identical if all weights are equal.

Can I use this to calculate grades or GPA?

Yes. Enter the grade you received for each assignment or subject as a value and its corresponding weight whether it is a percentage of your final grade or credits. The weighted average will be your overall performance or GPA. With Goal Planner, you can see what next grade you need to achieve your goal.

Related calculators

Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.

References

  1. Investopedia: Weighted Average

    Definition, purpose, and finance uses of the weighted average.

  2. NIST Special Publication 811: Guide for the Use of the International System of Units

    The US national standard for SI units, unit names and symbols, and conversion factors.