Math

Weighted average calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a weighted average calculator?

A weighted average calculator is a tool that finds the mean of a set of values when some of those values matter more than others. In a plain average every number counts equally, but in many real situations that assumption is wrong: a final exam should count for more than a short quiz, and a price that applies to many units should influence an overall figure more than a price that applies to only a few. By attaching a weight to each value, this calculator lets the more important entries pull the result toward themselves, producing a number that reflects the data more faithfully than a simple mean.

Simple average vs. weighted average

A simple average adds up the values and divides by how many there are. It is the right choice only when every value carries the same importance.

A weighted average instead multiplies each value by its weight, sums those products, and divides by the total of the weights. Whenever the entries differ in significance, sample size, frequency, or contribution, the weighted average is the correct tool. When all the weights happen to be equal, the weighted average collapses back into the ordinary mean.

Formula

The weighted average of nn values x1,x2,,xnx_1, x_2, \dots, x_n with weights w1,w2,,wnw_1, w_2, \dots, w_n is:

xˉ=w1x1+w2x2++wnxnw1+w2++wn\bar{x} = \frac{w_1 x_1 + w_2 x_2 + \dots + w_n x_n}{w_1 + w_2 + \dots + w_n}

which can be written compactly with summation notation as:

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

Where:

  • xix_i is each individual value,
  • wiw_i is the weight assigned to that value,
  • nn is the number of value-weight pairs.

The denominator is the sum of all the weights. If that sum is zero, the weighted average is undefined, and the calculator returns no result.

How does the calculator work?

To use the weighted average calculator, follow these steps:

  1. Enter each value in its own row, alongside the weight you want to give it. You can add as many rows as you need.

  2. Make sure every value has a weight. A row with a value but no weight is skipped, because without a weight it cannot contribute to the average.

  3. Read the result. The calculator returns the weighted average and the number of value-weight pairs it used, updating automatically as you type.

Example calculations

Weighting course grades

Suppose three assignments scored 90, 80, and 70, and they count for 3, 2, and 1 units of importance respectively. Multiply each score by its weight, add the products, and divide by the total weight:

(903)+(802)+(701)3+2+1=270+160+706=500683.33\frac{(90 \cdot 3) + (80 \cdot 2) + (70 \cdot 1)}{3 + 2 + 1} = \frac{270 + 160 + 70}{6} = \frac{500}{6} \approx 83.33

The weighted average is about 83.33, higher than the plain mean of 80 because the best score carries the most weight.

Weighting prices by quantity

Imagine buying the same item at three different prices: 5 units at $19.99, 3 units at $13.99, and 2 units at $25.00. Weight each price by the quantity bought:

(19.995)+(13.993)+(25.002)5+3+2=99.95+41.97+50.0010=191.9210=19.19\frac{(19.99 \cdot 5) + (13.99 \cdot 3) + (25.00 \cdot 2)}{5 + 3 + 2} = \frac{99.95 + 41.97 + 50.00}{10} = \frac{191.92}{10} = 19.19

The average price paid per unit is $19.19.

Equal weights reduce to the simple mean

If two values of 10 and 20 are each given a weight of 1, the weighted average equals the ordinary average:

(101)+(201)1+1=302=15\frac{(10 \cdot 1) + (20 \cdot 1)}{1 + 1} = \frac{30}{2} = 15

The result is 15, exactly the simple mean.

Practical applications

  1. Grades and GPA. Schools combine exam, quiz, and homework scores using weights that reflect how much each component counts toward the final grade.

  2. Finance and pricing. Investors and buyers compute weighted average costs, returns, or prices, weighting each figure by the amount of money or number of units it represents.

  3. Surveys and statistics. Analysts merge measurements taken from groups of unequal size by weighting each measurement by its sample size.

Frequently asked questions

What happens if the weights add up to zero?

The weighted average divides by the total of the weights, so a total of zero leaves the result undefined. In that case the calculator shows no result. This can happen if you mix positive and negative weights that cancel out.

Do the weights need to add up to 1 or 100%?

No. The weights can be any numbers on any scale, because the formula divides by their total. Using fractions that sum to 1, percentages that sum to 100, or whole-number counts all give the same answer for the same proportions.

What is the difference between this and a plain average calculator?

The average calculator treats every number as equally important, while this tool lets you weight each value differently. To average percentages with optional sample sizes, use the average percentage calculator.

Report a bug

This field is required.