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) : 0Total Weight
total_weight = w1 + w2 + w3 + w4Simple Avg
simple_avg = w4 > 0 ? (v1 + v2 + v3 + v4) / 4 : (v1 + v2 + v3) / 3Variables
| Variable | Description | Default |
|---|---|---|
v1 | Value 1 | 85 |
w1 | Weight 1 | 3 |
v2 | Value 2 | 92 |
w2 | Weight 2 | 4 |
v3 | Value 3 | 78 |
w3 | Weight 3 | 2 |
v4 | Value 4 (0 to skip) | 0 |
w4 | Weight 4 | 0 |
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).
- 01Weighted sum = 85×3 + 92×4 + 78×2 = 255 + 368 + 156 = 779
- 02Total weight = 3 + 4 + 2 = 9
- 03Weighted average = 779/9 ≈ 86.5556
- 04Simple average = (85+92+78)/3 = 85
Frequently Asked Questions
What is a weighted average?
A weighted average assigns different importance (weights) to values. Higher-weighted items influence the result more. When all weights are equal, it reduces to a simple average.
How do I calculate my GPA?
GPA is a weighted average: multiply each course grade by its credit hours, sum them all, and divide by total credit hours.
Can weights be negative?
In standard weighted averages, weights should be non-negative. Negative weights would indicate inverse importance, which is unusual and can lead to misleading results.
Learn More
Guide
How to Calculate Mean, Median, and Mode - Complete Guide
Learn how to calculate mean, median, and mode with clear explanations and examples. Understand when to use each measure of central tendency.
Ready to run the numbers?
Open Weighted Average Calculator