Weighted Average Calculator Formula

Understand the math behind the weighted average calculator. Each variable explained with a worked example.

Formulas Used

Weighted Avg

weighted_avg = (w1 + w2 + w3 + w4) != 0 ? (v1*w1 + v2*w2 + v3*w3 + v4*w4) / (w1 + w2 + w3 + w4) : 0

Total Weight

total_weight = w1 + w2 + w3 + w4

Simple Avg

simple_avg = w4 > 0 ? (v1 + v2 + v3 + v4) / 4 : (v1 + v2 + v3) / 3

Variables

VariableDescriptionDefault
v1Value 185
w1Weight 13
v2Value 292
w2Weight 24
v3Value 378
w3Weight 32
v4Value 4 (0 to skip)0
w4Weight 40

How It Works

Weighted Average

Formula

Weighted Average = (v₁w₁ + v₂w₂ + ... + vₙwₙ) / (w₁ + w₂ + ... + wₙ)

Each value is multiplied by its weight, summed, then divided by the total weight.

When to Use

Use weighted averages when different items contribute unequally: course grades (different credit hours), stock portfolio returns (different investment amounts), or survey responses (different sample sizes).

Worked Example

Three scores: 85 (weight 3), 92 (weight 4), 78 (weight 2).

v1 = 85w1 = 3v2 = 92w2 = 4v3 = 78w3 = 2v4 = 0w4 = 0
  1. 01Weighted sum = 85×3 + 92×4 + 78×2 = 255 + 368 + 156 = 779
  2. 02Total weight = 3 + 4 + 2 = 9
  3. 03Weighted average = 779/9 ≈ 86.5556
  4. 04Simple average = (85+92+78)/3 = 85

Ready to run the numbers?

Open Weighted Average Calculator