Weighted Standard Deviation Calculator

A weighted standard deviation measures the spread of a set of values when some of them matter more than others. Ordinary standard deviation treats every observation equally, but in many real situations one value should count more, perhaps because it rests on a larger sample, a more reliable instrument, or a bigger holding. Weighting lets each value carry its own importance. This calculator takes three value-and-weight pairs, computes the weighted mean, and then returns the weighted variance and the weighted standard deviation built around it. The method follows the standard definition: the weighted mean is the sum of value times weight divided by total weight, and the weighted variance is the weight-averaged squared distance from that mean. You supply the values and their weights, and the tool reports the weighted mean, variance and standard deviation, computed deterministically from the formula shown below, never estimated, so the worked example reconciles exactly with the figures on screen. Because the formula divides by total weight, the weights need not add to one; only their relative sizes matter. Weighted spread appears throughout statistics, finance and the physical sciences, wherever combined results come from sources of differing precision. Use this tool to summarize grouped data or to measure the dispersion of a weighted portfolio.

The weighted standard deviation is the square root of the weighted variance, sum of w(x - weighted mean)^2 / sum of w. For values 2, 4 and 6 with weights 1, 2 and 3, the weighted mean is 4.67 and the weighted standard deviation is 1.49.

Source: US National Institute of Standards and Technology (NIST). As at 25 June 2026.

Weighted mean--
Weighted variance--
Weighted standard deviation--

Weighted standard deviation formula

weighted mean = ( sum of w_i x_i ) / ( sum of w_i )
weighted variance = ( sum of w_i (x_i - weighted mean)^2 ) / ( sum of w_i )
weighted SD = sqrt( weighted variance )
x_i = each value, w_i = its weight

The weighted mean is the weight-averaged value. The weighted variance averages the squared distances from that mean using the same weights, and its square root is the weighted standard deviation, in the same units as the values.

Worked example

Values 2, 4 and 6 carry weights 1, 2 and 3.

  1. Total weight = 1 + 2 + 3 = 6
  2. Weighted mean = (2x1 + 4x2 + 6x3) / 6 = (2 + 8 + 18) / 6 = 28 / 6 = 4.67
  3. Weighted squared deviations: 1x(2-4.6667)^2 + 2x(4-4.6667)^2 + 3x(6-4.6667)^2 = 7.1111 + 0.8889 + 5.3333 = 13.3333
  4. Weighted variance = 13.3333 / 6 = 2.2222
  5. Weighted standard deviation = sqrt(2.2222) = 1.49

The weighted standard deviation is about 1.49. These are the calculator's default inputs, so the result above matches the widget exactly.

Weighted standard deviation: frequently asked questions

What is a weighted standard deviation?

A weighted standard deviation measures spread when some values count more than others. Instead of treating every observation equally, each carries a weight that reflects its importance, frequency or reliability. The result describes how far the values lie from the weighted mean, with more weight given to the heavier observations.

How is it calculated?

First compute the weighted mean: the sum of each value times its weight, divided by the total weight. Then compute the weighted variance: the sum of each weight times the squared distance from the weighted mean, divided by the total weight. The weighted standard deviation is the square root of that variance.

When should I weight the data?

Weight your data when observations are not equally important. Common reasons include differing sample sizes behind each value, varying measurement reliability, frequencies of repeated values, or portfolio holdings of different sizes. Weighting lets the more significant observations influence the mean and spread more strongly.

Does it matter if the weights sum to one?

No. The formula divides by the total weight, so the result is the same whether your weights sum to one, to one hundred, or to any other total. Only the relative sizes of the weights matter. This calculator handles any positive weights.

How does this differ from an unweighted standard deviation?

An unweighted standard deviation treats every value equally, effectively giving them all a weight of one. A weighted standard deviation generalizes this by allowing each value its own weight, so the two agree when all weights are equal and diverge when they are not.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.