Weighted Standard Deviation Calculator

Weighted standard deviation calculator: enter values and their weights to get the weighted mean, weighted variance, weighted standard deviation and effective sample size. For values 10, 20, 30 with weights 1, 2, 3, the weighted mean is 23.333, the population weighted standard deviation is 7.454 and the sample weighted standard deviation is 9.535.

Weighted Standard Deviation Calculator

Paste paired values and weights below, separated by commas, spaces or line breaks. Each value needs exactly one weight, and weights cannot be negative. Choose whether your values are a whole population or a sample with reliability weights — the calculator shows both results and states which divisor it used.




What is a weighted standard deviation?

A weighted standard deviation is a standard deviation in which every value counts according to its weight. A value with a weight of 3 influences the result three times as much as a value with a weight of 1. It is the right measure when some observations matter more than others — for example, when exam marks count for different percentages of a final grade, when survey answers are weighted to match a population, or when measurements have different levels of reliability. If every weight is the same, the weighted result is the same as the result from our standard deviation calculator.

The weighted mean is the starting point: multiply each value by its weight, add those products, and divide by the sum of the weights. The weighted standard deviation then measures the spread around that weighted mean, with each squared deviation weighted in the same way. Two datasets can share the same ordinary mean yet have very different weighted standard deviations once the weights are taken into account.

How do you calculate weighted standard deviation?

Work through five steps. First, find the weighted mean: x̄w = Σw₂x₂ / Σw₂. Second, subtract the weighted mean from each value to get each deviation. Third, square each deviation and multiply it by its weight. Fourth, add the weighted squared deviations and divide by the right divisor to get the weighted variance. Fifth, take the square root of the variance. That square root is the weighted standard deviation. For the unweighted version, see our guide on how to calculate standard deviation.

The divisor is where the population and sample formulas differ. For a population, divide by Σw₂: σw = √[Σw₂(x₂ − x̄w)² / Σw₂]. For a sample with reliability weights, divide by Σw₂ − Σw₂²/Σw₂: sw = √[Σw₂(x₂ − x̄w)² / (Σw₂ − Σw₂²/Σw₂)]. The calculator above shows both results side by side, so you can see exactly what each convention gives.

State the convention before you quote a number. Rival calculators are inconsistent here: some divide the sample version by Σw₂ − 1, others treat weights as frequencies and divide by n − 1, and many do not say which they use. Those choices give different answers from the same data, so a weighted standard deviation without a stated convention is not reproducible. This page uses the reliability-weight sample formula above and says so next to every result.

Population vs sample weights: the convention this calculator uses

Use the population formula when your values, with their weights, are the whole group you care about — for example, every module in a degree, weighted by its credit value. Use the sample (reliability-weight) formula when your values are a sample from a larger group and the weights express how reliable or precise each observation is; the divisor Σw₂ − Σw₂²/Σw₂ corrects for the fact that a sample usually understates the spread of the whole population. The same population-vs-sample choice applies without weights, as explained in our guide to population vs sample standard deviation.

The correction is largest when the weights are uneven. With equal weights, the reliability-weight divisor becomes Σw₂ − Σw₂²/Σw₂ = n − 1 (in units of the common weight), so the sample formula reduces exactly to the ordinary sample standard deviation. With one dominant weight, the divisor shrinks towards zero and the sample result grows — a warning that almost all of your information comes from a single value. If the divisor ever reaches zero, as it does with a single value, the sample standard deviation is undefined, and the calculator will tell you so.

Worked example: values 10, 20, 30 with weights 1, 2, 3

Take the values 10, 20 and 30 with weights 1, 2 and 3. The sum of the weights is 6, and the weighted total is 1×10 + 2×20 + 3×30 = 140, so the weighted mean is 140 ÷ 6 = 23.333. The deviations from 23.333 are −13.333, −3.333 and 6.667. Squaring them gives 177.778, 11.111 and 44.444; weighting those squares gives 1×177.778 + 2×11.111 + 3×44.444 = 333.333.

For the population, divide 333.333 by 6 to get a variance of 55.556, and √55.556 = 7.454. For the sample, the divisor is 6 − (1 + 4 + 9) ÷ 6 = 3.667, so the variance is 333.333 ÷ 3.667 = 90.909, and √90.909 = 9.535. The effective sample size is 6² ÷ 14 = 2.571 — the uneven weights carry about as much information as 2.571 equally weighted values. Try the same numbers in the calculator above and you should see exactly the same table.

A second check: the values 80 and 90 with weights 0.3 and 0.7 have a weighted mean of 0.3×80 + 0.7×90 = 87. The weighted squared deviations are 0.3×49 + 0.7×9 = 21, so the population variance is 21 ÷ 1 = 21 and the population standard deviation is √21 = 4.583. Decimal weights work exactly like whole-number weights: only their relative sizes matter.

What is effective sample size?

The effective sample size is (Σw₂)² / Σw₂². It answers the question: how many equally weighted values would carry the same information as these unevenly weighted ones? With equal weights it equals n, the number of values. With uneven weights it is always smaller than n, and with one dominant weight it falls close to 1 — no matter how many values you entered, almost all of the information comes from that one value.

It matters because it governs how much you can trust the result. A weighted mean with an effective sample size of 2.571 is far less certain than one built from 10 equal values, and that uncertainty feeds directly into the margin of error calculator when you build a confidence interval around the weighted mean. Report the effective sample size alongside the weighted standard deviation, and be wary of any weighted result whose effective sample size is close to 1.

Weighted standard deviation in Excel

Excel has no built-in weighted standard deviation function, so build it from SUMPRODUCT. Put your values in A2:A4 and your weights in B2:B4. The weighted mean is =SUMPRODUCT(A2:A4,B2:B4)/SUM(B2:B4). For the population weighted standard deviation, use =SQRT(SUMPRODUCT(B2:B4,(A2:A4-mean)^2)/SUM(B2:B4)) with the mean cell in place of "mean" — or, more simply, calculate each squared deviation in a helper column and use SUMPRODUCT on it. For the sample (reliability-weight) version, replace the divisor SUM(B2:B4) with SUM(B2:B4)-SUMPRODUCT(B2:B4,B2:B4)/SUM(B2:B4).

Google Sheets uses the same formulas. If you only need a quick check, the calculator at the top of this page gives the same numbers, including the step-by-step table you can compare with your spreadsheet cell by cell.

Frequently asked questions

What is a weighted standard deviation?

A weighted standard deviation is a standard deviation in which each value counts according to its weight. A value with a weight of 3 influences the result three times as much as a value with a weight of 1, so values with larger weights pull the weighted mean and the spread more than values with smaller weights.

How do I calculate weighted standard deviation?

Find the weighted mean, subtract it from each value, square each deviation, multiply each squared deviation by its weight, add them up, divide by the sum of the weights for a population or by the sum of the weights minus the sum of the squared weights divided by the sum of the weights for a sample with reliability weights, and take the square root.

What is the weighted standard deviation of 10, 20, 30 with weights 1, 2, 3?

The weighted mean is 23.333 and the weighted sum of squared deviations is 333.333. The population standard deviation is 7.454 and the sample standard deviation, using reliability weights, is 9.535. The effective sample size is 2.571.

When should I use the population or the sample formula?

Use the population formula when your values and weights are the whole group you care about, and the sample (reliability-weight) formula when your values are a sample from a larger group and the weights express how reliable each observation is. The population formula divides by the sum of the weights; the sample formula divides by the sum of the weights minus the sum of the squared weights divided by the sum of the weights.

What is effective sample size, and why does it matter?

Effective sample size is the square of the sum of the weights divided by the sum of the squared weights. It equals the number of values when all weights are equal and falls below that when weights are uneven. It tells you how much information the weights really carry, and a low value means the weighted result is less certain than the number of values suggests.

Can weights be decimals or percentages?

Yes. Weights can be decimals, percentages or whole numbers, and they do not need to add up to 1 or 100. Only their relative sizes matter: multiplying every weight by the same factor leaves the weighted mean, the weighted standard deviation and the effective sample size unchanged. Weights cannot be negative.

What happens if all the values are the same?

The weighted standard deviation is 0 in both modes. For example, the values 5, 5, 5 with weights 1, 1, 1 have a weighted mean of 5 and a weighted standard deviation of 0, because every deviation from the mean is 0.

How is weighted standard deviation different from ordinary standard deviation?

Ordinary standard deviation gives every value the same weight, while weighted standard deviation lets some values count more than others. With all weights equal, the two agree: the population formulas are identical, and the reliability-weight sample formula reduces exactly to the ordinary sample standard deviation.

Keep exploring: once you have the weighted mean and weighted standard deviation, feed them into our z-score calculator to turn any single value into a z-score, or use them in our normal distribution calculator to find probabilities and percentiles for the weighted distribution. You can also plot the weighted mean and standard deviation with our bell curve generator. To learn what margin of error is and how it is computed from a sample, read our guide, and browse all our free statistics tools. For the formal definitions behind these formulas, see the NIST/SEMATECH e-Handbook of Statistical Methods.

More Tools to Explore

Z-Score Calculator

Turn any value into a z-score and find its percentile and probability on the bell curve.

Try Calculator

Normal Distribution Calculator

Find probabilities, percentiles and critical values for any normal distribution.

Try Calculator

Margin of Error Calculator

Find the margin of error for a sample at any confidence level, and see the confidence interval it gives.

Try Calculator

IQ Bell Curve Calculator

Convert an IQ score into a z-score, percentile and rarity on the bell curve.

Try Calculator

Bell Curve Generator

Create custom bell curve plots for any normal distribution. Perfect for data analysis and presentations.

Try Calculator

Explore All Statistical Tools

Browse all 35 free statistics tools in one place — no sign-up, instant results.

Browse All Tools