Mathematics · Probability & Statistics · Descriptive Statistics
Weighted Average Calculator
Computes the weighted average (weighted mean) of up to six values by multiplying each value by its assigned weight and dividing by the total sum of weights.
Calculator
Formula
\bar{x}_w is the weighted average. x_i is the i-th data value. w_i is the weight assigned to the i-th value, reflecting its relative importance or frequency. n is the total number of value-weight pairs. The numerator sums each value multiplied by its weight; the denominator sums all weights to normalize the result.
Source: Kreyszig, E. — Advanced Engineering Mathematics, 10th Edition. Wiley, 2011. Also consistent with ISO 3534-1 statistical terminology standard.
How it works
A simple arithmetic mean treats every data point equally — summing all values and dividing by the count. In many real-world scenarios, this is inadequate. A final exam may be worth three times more than a quiz; a large-cap stock may represent 40% of a portfolio; a survey with 500 respondents should count more than one with 50. The weighted average resolves this by assigning each value a weight \( w_i \) that encodes its relative importance before averaging.
The formula is \( \bar{x}_w = \frac{\sum w_i x_i}{\sum w_i} \). For each data point, you multiply the value \( x_i \) by its corresponding weight \( w_i \), sum all these products to get the weighted sum, then divide by the total sum of all weights. Weights do not need to sum to 1 or to 100 — the division by the total weight automatically normalizes the result regardless of the scale chosen for weights. If all weights are equal, the weighted average reduces exactly to the arithmetic mean.
This calculator supports up to six value-weight pairs. Leave any pair blank to exclude it from the calculation. Common applications include academic grade point averages (GPA), investment portfolio returns, cost of capital (WACC) in corporate finance, statistical frequency distributions, and any engineering or scientific context where measurements carry different levels of reliability or significance.
Worked example
Consider a student with the following assessment results: a midterm exam scored 85 with weight 3, a final exam scored 90 with weight 2, and three homework assignments averaged to 78 with combined weight 5.
Step 1 — Multiply each value by its weight:
Midterm: 85 × 3 = 255
Final: 90 × 2 = 180
Homework: 78 × 5 = 390
Step 2 — Sum the weighted products:
255 + 180 + 390 = 825
Step 3 — Sum the weights:
3 + 2 + 5 = 10
Step 4 — Divide to get the weighted average:
825 ÷ 10 = 82.5
The student's weighted average is 82.5. Notice that the simple arithmetic mean of the three scores would be (85 + 90 + 78) ÷ 3 = 84.33 — a noticeably different result, because the homework assignments (the lowest score) carried the highest weight of 5.
Limitations & notes
This calculator supports a maximum of six value-weight pairs. For larger datasets — for example, a full frequency distribution table or a 30-stock portfolio — a spreadsheet or dedicated statistical software (such as R, Python's NumPy, or Excel's SUMPRODUCT function) is more practical. Negative weights are mathematically possible in some financial contexts (short positions, regression coefficients) but are not typical; verify that your use case supports them before interpreting the result. If all weights are zero or left blank, the result is undefined (division by zero). Additionally, this calculator computes the weighted arithmetic mean only — it does not compute weighted geometric or harmonic means, which are more appropriate when averaging rates, ratios, or multiplicative growth factors. Finally, the quality of the output is entirely dependent on the accuracy and appropriateness of the weights chosen — poorly assigned weights will produce a misleading average no matter how correctly the formula is applied.
Frequently asked questions
What is the difference between a weighted average and a simple average?
A simple average treats all values equally: you sum them and divide by the count. A weighted average assigns each value a weight before averaging, so values with higher weights pull the result more strongly toward themselves. For example, if you score 60 on a quiz worth 10% and 90 on a final worth 90%, a simple average gives 75, but the weighted average gives 0.10×60 + 0.90×90 = 87.
Do the weights have to add up to 1 or 100%?
No. The formula divides the sum of weighted products by the total sum of weights, so it normalizes automatically. You can use weights of 1, 2, 3 or 10, 20, 30 or 0.1, 0.2, 0.3 and get the same result. However, using percentage weights (summing to 100) or decimal weights (summing to 1) can make interpretation easier and reduces the chance of errors when assigning relative importance.
How is the weighted average used to calculate GPA?
In GPA calculation, each course grade (converted to a grade point, e.g. A = 4.0) is the value \( x_i \), and the number of credit hours for that course is the weight \( w_i \). The GPA is then the sum of (grade points × credit hours) divided by total credit hours. A 3-credit course has three times more influence on GPA than a 1-credit course.
Can I use the weighted average for investment portfolio returns?
Yes. The weighted average is the standard method for computing portfolio returns. Each asset's return is the value \( x_i \), and its proportion of the total portfolio value is the weight \( w_i \). For example, if Asset A has a 10% return and makes up 70% of the portfolio, and Asset B has a 4% return making up 30%, the portfolio return is 0.70×10 + 0.30×4 = 8.2%. This is the basis of the weighted average cost of capital (WACC) formula in corporate finance.
When should I use a weighted geometric mean instead of a weighted arithmetic mean?
Use a weighted geometric mean when averaging ratios, growth rates, or any multiplicative quantities. For instance, if you are averaging compound annual growth rates (CAGR) across multiple periods or investments, the arithmetic weighted mean can overstate performance due to volatility drag. The weighted geometric mean \( \bar{x}_g = \prod x_i^{w_i} \) (with normalized weights) is preferred in those contexts. For additive quantities such as grades, prices, or measurements, the arithmetic weighted mean computed here is correct.
Last updated: 2025-01-15 · Formula verified against primary sources.