Weighted Average Calculator
Compute the weighted average using Sum(x * w) / Sum(w) for percentage weights, credit hours, stock portfolio allocations, or grouped inventory costs, alongside the simple unweighted mean and Excel SUMPRODUCT syntax.
How to Calculate Weighted Average & Worked Examples
A weighted average multiplies every value x by its assigned importance w before dividing by the sum of all weights: Sum(x * w) / Sum(w). When weights represent percentages adding up to 100%, the denominator equals 1 (or 100%), and when weights represent raw share counts, credit hours, or inventory quantities, the formula automatically normalizes them for you.
Step-by-Step Weighted Mean Workflow
- Add or select your value-weight rows: Enter each item value (score, share price, or unit cost) paired with its corresponding weight (percentage, credit hours, or quantity), or load a preset.
- Verify whether weights sum to 100%: Leave weights as raw counts, credit hours, or syllabus percentages; the calculator automatically divides by total weight Sum(w).
- Review weighted mean vs. simple unweighted mean: Compare the weighted average Sum(x * w) / Sum(w) directly against the equal-weight arithmetic mean and total weight.
- Copy the breakdown or Excel formula: Use the itemized contribution table and built-in Excel SUMPRODUCT syntax to audit coursework, DCA cost basis, or inventory WAC.
Worked Example 1: Academic Course Syllabus
Suppose Homework is 92 (20%), Midterm is 84 (30%), Lab Project is 95 (15%), and Final Exam is 88 (35%). Multiply and sum: (92 x 20) + (84 x 30) + (95 x 15) + (88 x 35) = 1,840 + 2,520 + 1,425 + 3,080 = 8,865. Divide by total weight 100 to get 88.65% (versus a simple unweighted mean of 89.75%).
Worked Example 2: Dollar-Cost Averaging (DCA) Stock Basis
Suppose you buy 10 shares at $120, 25 shares at $104, and 15 shares at $112. Total cost = (10 x $120) + (25 x $104) + (15 x $112) = $1,200 + $2,600 + $1,680 = $5,480 across 50 shares. Your weighted average cost basis is $5,480 / 50 = $109.60 per share (not the simple mean $112.00).
| Application | Value (x) | Weight (w) |
|---|---|---|
| Portfolio Cost Basis (DCA) | Share purchase price | Shares bought at each price |
| Portfolio Expected Return | Asset return (%) | Dollar allocation or portfolio % |
| Academic Syllabus Score | Assignment / exam score | Syllabus percentage weight |
| Inventory Unit Cost (WAC) | Batch unit purchase cost | Units purchased in batch |
Accuracy, Edge Cases & Common Mistakes
- Weights that do not total 100%: Mid-semester gradebooks often sum to only 65% before the final exam is graded. Dividing by Sum(w) = 65 accurately reflects your current standing; dividing by 100 treats ungraded assignments as zeros.
- Averaging percentages instead of underlying counts: Averaging store conversion rates (5% and 20%) as 12.5% is misleading if one store had 10,000 visitors and the other had 200. Always weight rates by their denominator volume.
- Negative weights or zero total weight: Standard weighted averages require non-negative weights whose sum exceeds zero; division by zero occurs if all weights equal 0.
Reviewed by the NepaCalc Math & Engineering Team under our Editorial & Verification Policy.
Frequently Asked Questions
What is the weighted average formula?
Multiply each data value (x_i) by its weight (w_i), add those products together, and divide by the sum of all weights: Weighted Average = Sum(x_i * w_i) / Sum(w_i). When weights are percentages totaling 100%, dividing by 100 yields the exact weighted score.
How do you calculate a weighted average in Excel?
Use =SUMPRODUCT(values_range, weights_range) / SUM(weights_range). For example, if values are in A2:A5 and weights are in B2:B5, type =SUMPRODUCT(A2:A5, B2:B5)/SUM(B2:B5).
Do my weights have to add up to 100%?
No. Because this calculator divides by the actual total sum of weights (Sum(w_i)), weights can represent percentages summing to 100, credit hours, stock share counts, unit inventory quantities, or survey sample sizes.
When is a weighted average higher or lower than an unweighted mean?
Whenever larger weights are attached to higher values, the weighted average pulls upward above the simple arithmetic mean. Conversely, heavier weights on smaller values pull the weighted average below the simple mean.
How is weighted average used in college GPA and inventory accounting?
College GPA weights each course grade points by credit hours attempted (Sum(Credits x Grade Points) / Total Credits). Under GAAP Weighted Average Cost (WAC) inventory accounting, total cost of goods available for sale is divided by total units available.