Skip to main content

Average and Weighted Average Calculator

Paste a list of numbers for a simple average — mean, median, sum, smallest and largest included — or switch to weighted mode when some values should count more than others, like exam grades with different weights.

Everything is computed with exact fractions, so 1, 2, 4 averages to exactly 7⁄3; the display rounds to 6 decimal places and says so. If a token in your list is not a number, the error names it instead of failing silently.

Up to 1,000 numbers. Negatives and decimals are fine.

Mean (average)

20

Median

20

Sum 60 over 3 numbers; smallest 10, largest 30.

How it is worked out

  1. Sum = 10 + 20 + 30 = 60.
  2. Mean = sum ÷ count = 60 ÷ 3 = 20.
  3. Median: the middle value of the sorted list = 20.

Embed this calculator on your website →

The formula

mean = Σ(values) ÷ count · median = the middle value of the sorted list

weighted mean = Σ(value × weight) ÷ Σ(weights)

  • weights never have to add to 100 — the divisor is the weight total actually entered.
  • median with an even count is the mean of the two middle values; all arithmetic is exact, displayed to 6 decimal places.

Worked example: 80 with weight 1 and 90 with weight 2 → (80 + 180) ÷ 3 = 86.666667.

How it works

Simple average (mean) = the sum divided by the count. The median is the middle value of the sorted list (the mean of the two middle values when the count is even) — it resists outliers in a way the mean does not.

Weighted average = the sum of (value × weight) divided by the sum of the weights. The weights do not need to add up to 100 — weights of 1 and 2 work exactly like weights of 33.3 and 66.7, because the actual total weight is always the divisor. Each row's share of the total weight is shown so you can see what is driving the result.

Examples

  • 10, 20, 30 → mean 20, median 20, sum 60.
  • Weighted: 90 with weight 40, 70 with weight 60 → (3600 + 4200) ÷ 100 = 78 — the same arithmetic behind a weighted course grade.
  • Weights that do not sum to 100: 80 with weight 1 and 90 with weight 2 → 260 ÷ 3 = 86.666667.

Frequently asked questions

When should I use the median instead of the mean?

When the list has extreme values that would drag the mean away from the typical case — incomes, house prices, response times. The median is the middle observation, so one huge value cannot move it. This calculator reports both so you can see how much they differ.

My weights are percentages that add to 95, not 100. Is that a problem?

No. The weighted mean divides by the actual total weight (95), which is the mathematically correct treatment for partial weights — the missing 5 simply is not counted. The result table shows each weight's true share of the total.

Can a weight be zero?

Yes — a zero-weight row is listed with a 0% share and contributes nothing to the average, which is handy for excluding a value without deleting it. If every weight is zero there is nothing to average and the tool says so.

Can I average negative numbers?

Yes. The mean is just the total divided by the count, and both work with negatives — a week of temperatures or daily profit-and-loss figures averages the same way as positive values. Weights, though, should stay at zero or above: a negative weight has no sensible meaning here.

Why does one very large value pull the average up so much?

Because the mean gives every value an equal vote: each number contributes its full size divided by the count, so a single 10,000 among 10s moves the mean by about 1,000. That sensitivity is exactly why the median is shown alongside — comparing the two tells you whether an outlier is steering the result.