What Is Standard Deviation? Formula, Uses, and Variance
By Markets & Investing DeskUpdated Nov 10, 2026

Definition
Standard deviation measures how far values in a dataset typically sit from their mean. In finance, the standard deviation of returns is the most widely used measure of an investment's volatility.
Key takeaways
- Standard deviation measures dispersion around the mean, in the same units as the data.
- It equals the square root of the variance, the average of the squared deviations from the mean.
- The sample formula divides by n - 1; the population formula divides by n.
- In investing, the standard deviation of returns is the standard measure of historical volatility and a core input to the Sharpe ratio and portfolio risk models.
- It treats gains and losses the same, gives extra weight to outliers, and is easiest to interpret when the data is roughly bell-shaped.
Standard deviation is a statistical measure of how far the values in a dataset typically sit from their mean. It is calculated as the square root of the variance. A small standard deviation means the values cluster tightly around the average. A large one means they are spread out. In finance, the data is usually a series of returns, and their standard deviation is the most widely used measure of an investment’s volatility.
What Is Standard Deviation?
Two datasets can share the same mean and still behave very differently. A savings account and a small-cap stock fund might both average 5% a year over some period, but the account lands near 5% every year while the fund swings from a large loss one year to a large gain the next. The difference in their standard deviations is what an investor experiences as risk.
Standard Deviation Formula
The formula most often used in finance and statistics is the sample standard deviation:
s = √[ Σ (xᵢ - x̄)² / (n - 1) ]
where:
- xᵢ = the value of the i-th data point
- x̄ = the mean of the data points
- n = the number of data points
- Σ = the sum across all data points
The expression inside the square root is the variance. Standard deviation is its square root.
Sample vs. Population Standard Deviation
There are two versions of the formula, and the only difference is the denominator.
- Population standard deviation (σ) divides the sum of squared deviations by n. Use it when the data includes every member of the group you care about, for example the final exam scores of every student in one class.
- Sample standard deviation (s) divides by n - 1. Use it when the data is a sample drawn from a larger group and you want to estimate that group’s spread.
Returns on an investment are almost always treated as a sample: ten years of monthly returns is one slice of a process that produced returns before and will keep producing them after. Dividing by n - 1 (known as Bessel’s correction) offsets the fact that a sample’s own mean sits closer to its data points than the true mean would, which otherwise understates the spread. With large datasets the two versions converge; with five or ten observations the gap is noticeable.
How to Calculate Standard Deviation
- Find the mean. Add all the values and divide by the number of values.
- Find each deviation. Subtract the mean from each value. Some results will be negative.
- Square each deviation. This removes the negative signs and gives larger deviations more weight.
- Add the squared deviations. The result is the sum of squares.
- Divide by n - 1 for a sample (or by n for a full population). This gives the variance.
- Take the square root of the variance. The result is the standard deviation, back in the original units.
Why not simply average the raw deviations? Because the deviations from the mean always sum to zero; the positives and negatives cancel by definition. Squaring is one way around that. Taking absolute values is another, and it produces a different statistic, the mean absolute deviation, covered below.
Example of Standard Deviation
Hypothetical example. Fund A, an illustrative fund, returned the following over five years: 8%, -4%, 12%, 6% and 3%.
Step 1: mean. 8 + (-4) + 12 + 6 + 3 = 25. Divided by 5, the mean is 5%.
Step 2: deviations from the mean.
- 8 - 5 = 3
- -4 - 5 = -9
- 12 - 5 = 7
- 6 - 5 = 1
- 3 - 5 = -2
Step 3: squared deviations. 9, 81, 49, 1 and 4.
Step 4: sum of squares. 9 + 81 + 49 + 1 + 4 = 144.
Step 5: variance. Treating the five years as a sample: 144 ÷ (5 - 1) = 36, measured in “percent squared.”
Step 6: standard deviation. √36 = 6%.
If the five years were instead treated as the entire population, the variance would be 144 ÷ 5 = 28.8 and the standard deviation about 5.37%.
Notice how much of the result comes from one year. The -4% year contributed 81 of the 144 total, more than half, because its deviation of -9 was squared. This is the outlier sensitivity of standard deviation in miniature.
Now compare Fund B, also hypothetical, with returns of 5%, 4%, 6%, 5% and 5%. Its mean is also 5%. The deviations are 0, -1, 1, 0 and 0, the squares sum to 2, the sample variance is 0.5 and the standard deviation is about 0.71%. Both funds averaged 5%, but an investor in Fund A lived through returns spread more than eight times as widely.
Interpreting Standard Deviation
The Normal Distribution Rule
Standard deviation is most informative when the data roughly follows a normal distribution, the symmetric bell curve. In a normal distribution:
- About 68% of values fall within one standard deviation of the mean.
- About 95% fall within two standard deviations.
- About 99.7% fall within three standard deviations.
This is often called the 68-95-99.7 rule or the empirical rule. Graphically, standard deviation sets the width of the bell: a larger value produces a flatter, wider curve, and a smaller value produces a tall, narrow one.
Applied to Fund A, and assuming normally distributed returns with a mean of 5% and a standard deviation of 6%, a year’s return would fall between -1% and 11% about two years in three, between -7% and 17% about 19 years in 20, and between -13% and 23% almost always. These are statements about a model, not guarantees, and five data points are far too few to establish that the distribution is normal.
What a High or Low Standard Deviation Means
“High” and “low” are relative. A standard deviation is meaningful compared with something: another fund in the same category, a benchmark such as the S&P 500, the same asset in a different period, or the investor’s own tolerance for swings.
For datasets with very different scales, the coefficient of variation (standard deviation divided by the mean) can make comparisons fairer, because it expresses spread relative to the size of the average. It loses meaning when the mean is close to zero or negative, which is common for short-period returns.
Standard Deviation in Finance and Investing
Measuring Volatility
When analysts call an asset “volatile,” they usually mean its returns have a high standard deviation. Fund fact sheets, portfolio analytics and research reports commonly report it, often as a three-year or five-year figure based on monthly returns. A fast-growing technology stock typically shows a much higher standard deviation than a large, mature dividend payer, and a bond index fund typically shows less than either.
Standard deviation should be calculated on returns, not prices. A stock’s price is a level that trends over time, so the standard deviation of a price series mostly reflects how far the price has drifted, not how much it fluctuates. Returns (percentage changes from one period to the next) remove that drift and make assets with different price levels comparable.
Annualizing Standard Deviation
Volatility is usually quoted on an annual basis even when it is calculated from daily or monthly data. The standard conversion multiplies by the square root of the number of periods in a year:
Annual standard deviation ≈ periodic standard deviation × √(periods per year)
Hypothetical examples. A monthly standard deviation of 2% annualizes to about 2% × √12 ≈ 6.93%. A daily standard deviation of 1%, using the common convention of 252 trading days, annualizes to about 1% × √252 ≈ 15.87%.
The square-root rule assumes returns in each period are independent of one another and that volatility stays constant. When returns trend or volatility clusters, which happens in real markets, the scaled figure is an approximation. Note that the mean return scales differently (roughly linearly with time), so you cannot annualize both with the same factor.
Rolling Standard Deviation
A single standard deviation summarizes an entire period, which can hide changes within it. A rolling standard deviation recalculates the figure over a moving window, for example the last 20 trading days or the last 36 months, and plots each result. When the line rises, recent returns have been more dispersed than earlier ones; when it falls, the market has calmed. The window length is a trade-off: short windows react quickly but jump around, while long windows are smoother but slow to reflect a regime change.
Comparing Funds With Benchmarks
Standard deviation can also measure how closely a fund follows its benchmark. The standard deviation of the difference between a fund’s return and its benchmark’s return is called tracking error. An index fund or index ETF is designed to replicate an index, so a low tracking error is the goal. An actively managed fund that makes concentrated bets is expected to have a higher tracking error, because its returns are meant to differ from the index. Whether that difference is positive is a separate question, measured by alpha.
Risk-Adjusted Return: The Sharpe Ratio
The Sharpe ratio accounts for how bumpy the ride was by dividing excess return by standard deviation:
Sharpe ratio = (portfolio return - risk-free rate) ÷ standard deviation of portfolio returns
Hypothetical example. A portfolio returning 9% when the risk-free rate is 3%, with a standard deviation of 12%, has a Sharpe ratio of (9 - 3) ÷ 12 = 0.5. A second portfolio earning 7% with a standard deviation of 6% scores (7 - 3) ÷ 6 ≈ 0.67, more excess return per unit of volatility despite the lower headline return.
Portfolio Standard Deviation and Diversification
The standard deviation of a portfolio is not the weighted average of its holdings’ standard deviations. It also depends on how the holdings move relative to each other, measured by correlation (ρ). For two assets:
σₚ = √[ w₁²σ₁² + w₂²σ₂² + 2w₁w₂ρσ₁σ₂ ]
where w is each asset’s weight and σ its standard deviation.
Hypothetical example. Split a portfolio 50/50 between an asset with a 20% standard deviation and one with 10%, and assume their correlation is 0.2.
- 0.5² × 0.20² = 0.0100
- 0.5² × 0.10² = 0.0025
- 2 × 0.5 × 0.5 × 0.2 × 0.20 × 0.10 = 0.0020
The variance is 0.0145, and the portfolio standard deviation is √0.0145 ≈ 12.0%. The weighted average of the two standard deviations would be 15%. Only if the correlation were exactly 1 would the portfolio figure equal 15%; any correlation below 1 brings it lower. That gap is the mathematical basis for diversification and for Modern Portfolio Theory, which uses standard deviation as its measure of risk.
Bollinger Bands
Traders also apply standard deviation to price charts. Bollinger Bands, developed by John Bollinger in the 1980s, draw a moving average (commonly 20 periods) with bands set a number of standard deviations above and below it (commonly two), so they widen when prices become more dispersed and narrow when they calm. Here the standard deviation is computed on prices within a short window rather than on returns, and the bands describe recent dispersion, not a probability that price will stay inside them.
Other Uses of Standard Deviation
The same calculation appears well beyond portfolio analysis:
- Business risk management and forecasting: measuring how much costs, revenues, product return rates, sales or demand vary from expectations, which feeds into inventory buffers and cash planning.
- Quality control: tracking how far manufacturing measurements stray from a target. Six Sigma methodology takes its name from the standard deviation (sigma).
- Project management, actuarial work and research: estimating uncertainty in task durations and costs, and describing variability in claims, test results and survey responses.
Standard Deviation vs. Variance
Variance and standard deviation carry the same information; one is the square of the other. The practical difference is units. If returns are in percent, variance is in percent squared; if a dataset is in dollars, variance is in dollars squared. Neither unit has an intuitive meaning, and a variance cannot be plotted on the same axis as the data. Standard deviation returns to the original units, so “a 6% standard deviation” can be compared directly with “a 5% average return.”
Variance still matters in the math. Variances of independent variables add, while standard deviations do not, which is why portfolio formulas, regression and many risk models work in variance terms and take the square root at the end. In the two-asset example above, every term inside the square root is a variance or covariance.
Measures Often Confused With Standard Deviation
- Range: the highest value minus the lowest. It uses only two data points and ignores everything between them. Standard deviation uses every observation.
- Mean absolute deviation (MAD): the average of the absolute deviations from the mean. It is easier to explain and less sensitive to outliers, but harder to work with algebraically. For Fund A, the MAD is (3 + 9 + 7 + 1 + 2) ÷ 5 = 4.4%, below the 6% standard deviation, because squaring amplified the -9 deviation.
- Standard error: the standard deviation divided by the square root of n. It measures how precisely the mean is estimated, not how dispersed the data is. More data shrinks the standard error but does not shrink the standard deviation.
- Beta: measures how much an asset moves relative to the market. A stock can have a high standard deviation and a low beta if its swings come from company-specific events unrelated to the broad market.
- Downside deviation: like standard deviation, but it counts only returns below a target (such as zero or the risk-free rate). It addresses the fact that investors usually worry about losses, not unexpected gains. The Sortino ratio uses it in place of standard deviation.
- Value at Risk (VaR): estimates a loss threshold at a given confidence level over a given period. Some VaR methods are built from standard deviation, but VaR answers a different question: how bad a bad outcome could be, rather than how spread out outcomes are.
Limitations of Standard Deviation
It treats upside and downside the same. A fund that occasionally jumps 30% gets the same penalty as one that occasionally drops 30%. For investors who define risk as the chance of losing money, standard deviation overstates the risk of assets with large upside surprises.
Outliers carry extra weight. Because deviations are squared, one extreme observation can dominate the result, as in the Fund An example. A single crash or spike in the sample period can make an asset look much riskier, and a quiet sample can make it look safer than it is.
It is most meaningful for bell-shaped data. Many financial return series are skewed or have fat tails, meaning extreme moves happen more often than a normal distribution implies. When that is true, the 68-95-99.7 rule underestimates the chance of large losses. Two assets with identical standard deviations can have very different worst cases.
It is backward-looking. A historical standard deviation describes the period it was calculated over. Volatility changes, sometimes abruptly, and a figure based on a calm stretch can say little about the next stress event. The choice of window and data frequency (daily, weekly, monthly) also changes the result.
It ignores the order of returns. Shuffling the same returns into a different sequence leaves standard deviation unchanged, but the sequence can matter a great deal for drawdowns and for anyone adding or withdrawing money.
It does not capture every kind of risk. Liquidity risk, credit risk and the risk of permanent loss of capital can all be present in an asset whose price history looks smooth, especially if that asset is rarely traded or priced.
How to Calculate Standard Deviation in Excel
In Excel:
- =STDEV.S(range) returns the sample standard deviation (divides by n - 1). This is the usual choice for return data.
- =STDEV.P(range) returns the population standard deviation (divides by n).
- =VAR.S(range) and =VAR.P(range) return the corresponding variances.
Entering Fund A’s five returns and using STDEV.S returns 6%, matching the hand calculation. Google Sheets uses STDEV for the sample version and STDEVP for the population version. For a rolling standard deviation, apply STDEV.S to a fixed-size window and fill the formula down so the window moves one row at a time.
FAQs
Can standard deviation be zero or negative?
It can be zero but never negative. Because it is the square root of an average of squared numbers, zero is the minimum, reached only when every value in the dataset is identical. Any variation at all makes it positive.
How many data points do you need for a reliable standard deviation?
The formula works with as few as two values, but small samples give unstable estimates, and a single unusual period can swing the result. In fund reporting, three years of monthly returns (36 observations) is a common minimum convention. More observations help only if the asset's underlying behavior has not changed over that span.
The Bottom Line
Standard deviation matters to anyone comparing funds, building a diversified portfolio or reading a Sharpe ratio. Calculate it on returns rather than prices, use the sample version for return data, and judge it against a peer fund or benchmark. Treat it as a backward-looking summary that weights losses and gains alike, magnifies outliers and can understate extreme moves when returns are skewed or have fat tails.















