standarddeviationcalculator.net

Weighted standard deviation calculator

Enter each value with the weight it should carry. Weights can be any positive numbers — counts, allocations, or measures of confidence — and do not need to sum to 1.

Value (x)Weight (w)Remove

Weights may be counts, portfolio allocations, or any positive measure of importance. They do not need to sum to 1.

Treat the data as

The formulas

The weighted mean puts each value in proportion to its weight:

μw = Σ(w·x) / Σw

The weighted variance measures squared deviations from that mean, again weighted:

Population: σ²w = Σw(x − μw)² / V₁ Sample: s²w = Σw(x − μw)² / (V₁ − V₂/V₁) where V₁ = Σw and V₂ = Σw²

The sample denominator is the weighted analogue of Bessel's correction. Setting every weight to 1 makes V₁ = n and V₂ = n, so V₁ − V₂/V₁ becomes n − 1 — the ordinary formula falls out as the special case, which is the sign that the generalisation is the right one.

Two kinds of weight

The distinction matters for which denominator is correct, and it is glossed over often enough to cause real disagreements between software packages.

Frequency weightsReliability weights
A weight of 5 meansThis value occurred 5 timesTrust this value 5× as much
Effective nΣwV₁²/V₂ (Kish)
Sample denominatorΣw − 1V₁ − V₂/V₁
Typical useFrequency tables, talliesPortfolios, survey weights, meta-analysis

This calculator uses the reliability-weight convention, which is what NIST and most statistical software implement. For frequency data — where a weight is genuinely a repeat count — the grouped data calculator is the better fit and uses Σf − 1.

Where weighted spread is the honest measure

Weighted standard deviation in Excel

Excel has no built-in weighted SD, so build it from array formulas:

Weighted mean: =SUMPRODUCT(A2:A10, B2:B10) / SUM(B2:B10) Weighted var: =SUMPRODUCT(B2:B10, (A2:A10 - [mean])^2) / SUM(B2:B10) Weighted SD: =SQRT( [the above] )

With values in column A and weights in column B. That gives the population form; for the sample form divide by SUM(B2:B10) - SUMSQ(B2:B10)/SUM(B2:B10) instead.

Related calculators

Common questions

What is a weighted standard deviation?

A standard deviation in which each value counts in proportion to a weight rather than counting once. It is used when observations differ in importance, reliability or size — for example a portfolio where each holding carries a different allocation.

Do the weights need to add up to 1?

No. The formula divides by the total weight, so any consistent positive scale works identically. Weights of 2, 3, 5 give exactly the same answer as 0.2, 0.3, 0.5.

What is the n − 1 equivalent for weighted data?

With reliability weights the bias-corrected denominator is V₁ − V₂/V₁, where V₁ = Σw and V₂ = Σw². When every weight equals 1 this reduces to n − 1, which is the check that it is the right generalisation.

This is the "Sample" mode above. If your weights are frequency counts rather than reliabilities, the plain Σw − 1 is the more conventional denominator.

When should I use frequency weighting instead?

If a weight means "this value occurred w times", you are describing a frequency table, and the grouped data calculator matches that intent more directly. Reliability weights — where a weight means "trust this value more" — belong here.

Written and reviewed by our editorial team. Last updated . Method and sources: how these numbers are computed.