Weighted Mean Calculator
Calculate the weighted mean of a dataset where each value has its own weight. Enter your values and weights to get the weighted average instantly — useful for grades, scores, and financial data.
Calculate Weighted Average of Values with Custom Weights
Weighted Mean Formula
Where:
- \(x_i\) — the individual values of the dataset
- \(w_i\) — the weight assigned to each value
- \(n\) — the number of values
Each value is multiplied by its weight, the products are summed, and the total is divided by the sum of all weights. The larger a value's weight, the more it influences the final result.
Weighted Mean – Calculation Example
Example: a student's grade is based on two components: homework worth weight 2 and a final exam worth weight 1. The homework score is 10 and the exam score is 20.
\[ \bar{x}_w = \frac{10 \cdot 2 + 20 \cdot 1}{2 + 1} = \frac{20 + 20}{3} = \frac{40}{3} \approx 13.33 \]
Result: the weighted mean is \( \bar{x}_w \approx 13.33 \).
Note that the ordinary (unweighted) average of 10 and 20 would be 15 — the weights pull the result toward the more important value.
How to Use the Calculator
- Enter the Number of values you want to include in the calculation (minimum 2). The calculator automatically adds or removes value/weight fields.
- Fill in each Value field (\(x_1, x_2, \ldots\)) with your data points.
- Enter the corresponding Weight for each value (\(w_1, w_2, \ldots\)). Weights express relative importance and are typically positive numbers.
- Read the Average result, which is the weighted mean of your data.
If the sum of all weights is zero, the calculator shows an error, because dividing by zero is undefined — make sure at least one weight is non-zero.
What Is the Weighted Mean?
The weighted mean (also called the weighted average) is a generalization of the arithmetic mean. Instead of treating every value equally, it lets you assign a weight to each value, reflecting how much that value should count toward the final average. It answers the question: "What is the typical value of this data, taking importance into account?"
A simple example shows why this matters. Imagine a course where the final exam counts for 60% of the grade and quizzes for 40%. A student who scores 90 on the exam and 70 on quizzes should not get a plain average of 80 — the weighted mean gives \(0.6 \cdot 90 + 0.4 \cdot 70 = 82\). Any grade, index, or rating that combines components with different importance is really a weighted mean.
Beyond education, the weighted mean appears everywhere: in finance (portfolio returns, price-weighted indices), in statistics (when some observations are more reliable or frequent than others), and in decision-making models where criteria carry different priorities. Whenever values in a dataset do not contribute equally, the weighted mean is the correct measure of central tendency — not the plain average.
The weighted mean is one member of a family of means. When all weights are equal, it reduces to the ordinary arithmetic mean. Other members behave differently and are useful in other situations, such as the geometric mean for growth rates, the harmonic mean for rates and speeds, and the quadratic mean (root mean square) for varying signals and errors.
Interpreting the Result
The weighted mean always lies between your smallest and largest values — no amount of weighting can push it outside the range of the data. Increasing a value's weight moves the result toward that value; in the limit, a value whose weight dominates all others gives a result close to that value.
Weights are relative. Doubling every weight (e.g., changing weights 2, 1 into 4, 2) leaves the weighted mean unchanged, because both the numerator and denominator scale by the same factor. This means you can use percentages, counts, or any proportional scale for weights and get the same answer.
Assumptions and Limitations
- Weights should sum to more than zero. If all weights are 0, the result is undefined and the calculator will report an error.
- Negative weights are mathematically possible but rarely meaningful. In most applications (grades, scores, indices) weights represent importance or frequency and should be non-negative.
- Weighted vs. percentage weights: if your weights are percentages, they should ideally sum to 100 (or 1). The formula still works if they don't, because it normalizes by the total weight.
- Sensitivity to outliers: a value with a large weight strongly affects the result. Double-check weights for unusual data points.
- The weighted mean assumes your data can meaningfully be averaged on a linear scale. For growth rates over multiple periods, the geometric mean is usually more appropriate.
Quick Reference: Weights as Percentages
When weights are given as percentages of a total (common in grading), the weighted mean simplifies to a direct sum:
\[ \bar{x}_w = x_1 \cdot \frac{w_1}{100} + x_2 \cdot \frac{w_2}{100} + \cdots + x_n \cdot \frac{w_n}{100} \]
This works only when \(w_1 + w_2 + \cdots + w_n = 100\). The calculator handles this case automatically, since dividing by the total weight (100) is part of the general formula.
Frequently Asked Questions
How do I calculate a weighted mean by hand step by step?
Follow four steps: 1) multiply each value by its weight (×ᵢ·wᵢ); 2) add all these products together; 3) add all the weights; 4) divide the sum of products by the sum of weights. For example, with values 4, 8 and weights 3, 1: (4·3 + 8·1) ÷ (3 + 1) = 20 ÷ 4 = 5. Always divide by the total weight, never by the number of values.
How do I calculate my final grade if assignments count for different percentages?
Convert each percentage into a weight and use the weighted mean. If homework is worth 30% and you scored 85, and the exam is worth 70% with a score of 90, the result is (85 × 0.3 + 90 × 0.7) = 88.5. You can also enter the percentages directly as weights (30 and 70) — the answer is the same, because the calculator divides by the total weight.
What is the difference between the weighted mean and the ordinary average?
The ordinary (arithmetic) mean treats every value as equally important, while the weighted mean lets some values count more. Mathematically, the arithmetic mean is just a weighted mean where every weight equals 1. Use the plain average only when all observations genuinely contribute equally (e.g., ten identical quiz attempts); use the weighted mean whenever frequency, importance, or share of a total differs.
Can I use frequencies or counts as weights?
Yes. Frequencies are the most natural weights: if the value 5 appears 12 times and the value 9 appears 3 times, enter values 5 and 9 with weights 12 and 3. The result is (5·12 + 9·3) ÷ 15 = 5.8, which equals the average of the full 15-observation list. This is handy when a dataset is summarized as a frequency table.
What units does the weighted mean have?
The weighted mean has the same units as the original values, because weights only express relative importance and cancel out in the division. If your values are dollars, the result is in dollars; if they are test scores, the result is a score. This also means the weighted mean is not affected by the scale of the weights — using 2 and 1 or 200 and 100 gives an identical answer.
How can I calculate a weighted average in Excel or Google Sheets?
Use =SUMPRODUCT(values, weights)/SUM(weights). For example, with values in cells A2:A5 and weights in B2:B5, enter =SUMPRODUCT(A2:A5, B2:B5)/SUM(B2:B5). A common mistake is using =AVERAGE(A2:A5), which ignores the weights entirely. Alternatively, use =SUMPRODUCT(A2:A5, B2:B5) alone only when the weights are proportions that already sum to 1.
Why does one unusual value change my result so much?
A value's influence is proportional to its weight, so a heavily weighted outlier can dominate the result. Check two things: whether the extreme value is a data-entry error, and whether its weight is truly correct. If the data has a few very large or small values and you want a result less sensitive to them, consider reporting the median alongside the weighted mean — they measure central tendency differently.