How to Calculate the Standard Deviation of a Portfolio: 6 Steps

A portfolio can look wonderfully diversified on a brokerage screenseveral stocks, a bond fund, perhaps an ETF with an impressively serious nameyet still behave like a shopping cart with one bad wheel. To understand how much its returns may bounce around, investors often calculate the standard deviation of a portfolio.

Portfolio standard deviation is a statistical measure of volatility. It estimates how widely a portfolio’s periodic returns have varied around their average return. A relatively low figure suggests that historical returns were more tightly clustered, while a higher figure indicates wider swings. In finance, portfolio variance is commonly treated as a measure of risk, and standard deviation is simply the square root of that variance.

The calculation is not merely a weighted average of each investment’s volatility. It must also account for how the investments move in relation to one another. That relationshipmeasured through correlation or covarianceis where diversification performs its mathematical magic trick. No cape required.

What Does Portfolio Standard Deviation Tell You?

Standard deviation describes the dispersion of returns around their arithmetic mean. Suppose a portfolio earned an average annual return of 8%. A portfolio with a 4% standard deviation has historically produced returns that stayed closer to that average than a portfolio with a 15% standard deviation.

That does not mean the first portfolio is automatically better. A conservative bond portfolio may have low volatility but limited growth potential. An equity-heavy portfolio may fluctuate more while offering a higher expected long-term return. Standard deviation measures variability, not investment quality, future return, maximum loss, or the probability that you will panic-sell on a Tuesday afternoon.

The figure becomes most useful when comparing portfolios with similar objectives, time periods, return frequencies, and asset classes. It can also help investors:

  • Compare the historical volatility of two portfolios.
  • Evaluate whether diversification has reduced overall risk.
  • Check whether portfolio risk matches an investor’s time horizon and risk tolerance.
  • Calculate risk-adjusted measures such as the Sharpe ratio.
  • Compare a portfolio’s volatility with a relevant market benchmark.

Government and investment-industry guidance consistently emphasizes that diversification can reduce portfolio fluctuations, although it cannot guarantee profits or prevent losses during a broad market decline.

The Portfolio Standard Deviation Formula

Formula for a Two-Asset Portfolio

For a portfolio containing two investments, the formula is:

σp = √[(w12σ12) + (w22σ22) + (2w1w2ρ1,2σ1σ2)]

Where:

  • σp is the portfolio standard deviation.
  • w1 and w2 are the portfolio weights of the two investments.
  • σ1 and σ2 are their individual standard deviations.
  • ρ1,2 is the correlation between their returns.

Correlation ranges from -1 to +1. A correlation near +1 means the assets tend to move in the same direction. A correlation near zero suggests little consistent relationship. A negative correlation means they have historically tended to move in opposite directions.

Formula for a Portfolio With Multiple Assets

For three or more investments, analysts normally use matrix notation:

σp = √(wTΣw)

In this expression, w is the column vector of portfolio weights, wT is its transpose, and Σ is the covariance matrix. The covariance matrix contains each asset’s variance along the diagonal and the covariance between every pair of assets in the remaining cells.

This method follows the mean-variance framework used in modern portfolio theory. It captures both individual asset volatility and the interaction among all holdings.

How to Calculate the Standard Deviation of a Portfolio in 6 Steps

Step 1: Determine the Weight of Each Investment

Begin by calculating how much each holding represents as a percentage of the total portfolio.

Portfolio weight = Market value of the investment ÷ Total portfolio value

Imagine a $100,000 portfolio containing:

  • $60,000 in Asset A
  • $40,000 in Asset B

The weights are:

  • Asset A: $60,000 ÷ $100,000 = 0.60
  • Asset B: $40,000 ÷ $100,000 = 0.40

The weights should add up to 1.00, or 100%, unless the portfolio includes leverage, short positions, or cash that has been deliberately excluded. If your ordinary long-only portfolio weights total 137%, the math may not be the only thing needing attention.

Step 2: Gather Consistent Historical Return Data

Use historical returns rather than raw share prices. Returns place investments with different prices on the same percentage scale.

A simple periodic return can be calculated as:

Return = (Ending adjusted price ÷ Beginning adjusted price) − 1

Adjusted prices are generally preferable because they account for distributions and events such as stock splits. Use the same dates and frequency for every asset. Do not combine daily returns for one asset with monthly returns for another. That is less “advanced analytics” and more “spreadsheet stew.”

You might use:

  • Daily returns for short-term risk analysis.
  • Weekly returns to reduce some daily market noise.
  • Monthly returns for long-term asset-allocation analysis.

Your chosen lookback period also matters. A one-year sample may reflect recent market conditions, while a 10-year sample may include several economic environments but place less emphasis on current relationships.

Step 3: Calculate Each Asset’s Standard Deviation

Next, calculate the standard deviation of each investment’s return series. In most historical analyses, the observations are treated as a sample of possible market outcomes, so the sample standard deviation is commonly used.

Assume the calculation produces:

  • Asset A standard deviation: 12%, or 0.12
  • Asset B standard deviation: 8%, or 0.08

Keep the measurement frequency consistent. If those figures were calculated from monthly returns, they are monthly standard deviations until they are annualized.

In Excel, the sample standard deviation formula is:

=STDEV.S(return_range)

Use STDEV.P only when the values represent the entire population you intend to analyze rather than a sample. For historical market observations, STDEV.S is often the more defensible choice.

Step 4: Calculate Correlation or Covariance

Now determine how the two investments’ returns move together. Suppose Asset A and Asset B have a correlation of 0.25.

Covariance can be derived from correlation:

Covariance = Correlation × Standard deviation of Asset A × Standard deviation of Asset B

Using the example:

Covariance = 0.25 × 0.12 × 0.08 = 0.0024

A positive covariance indicates that the assets have generally moved in the same direction. A negative result indicates an inverse relationship. The size of covariance is harder to interpret directly because it depends on the scale of the underlying returns, which is why correlation is often easier to discuss.

In Excel, sample covariance can be calculated with:

=COVARIANCE.S(asset_A_returns, asset_B_returns)

Alternatively, correlation can be calculated with:

=CORREL(asset_A_returns, asset_B_returns)

Step 5: Calculate the Portfolio Variance

Insert the weights, standard deviations, and correlation into the two-asset variance formula:

σp2 = (0.602 × 0.122) + (0.402 × 0.082) + (2 × 0.60 × 0.40 × 0.25 × 0.12 × 0.08)

Calculate each component:

Variance ComponentCalculationResult
Asset A contribution0.602 × 0.1220.005184
Asset B contribution0.402 × 0.0820.001024
Interaction term2 × 0.60 × 0.40 × 0.25 × 0.12 × 0.080.001152

Add the three components:

Portfolio variance = 0.005184 + 0.001024 + 0.001152 = 0.00736

Notice that the covariance or correlation term is essential. Ignoring it would incorrectly assume that the holdings have no relationship with one another.

Step 6: Take the Square Root and Interpret the Result

The final step is to take the square root of the portfolio variance:

Portfolio standard deviation = √0.00736 = 0.08579

Converted to a percentage, the portfolio standard deviation is approximately:

8.58%

For comparison, the simple weighted average of the two individual standard deviations would be:

(0.60 × 12%) + (0.40 × 8%) = 10.40%

The actual portfolio standard deviation is lower because the two investments are not perfectly correlated. That difference is the diversification benefit. The assets still move somewhat together, but not in identical lockstep.

How to Calculate Portfolio Standard Deviation in Excel

For a two-asset portfolio, the complete formula can be entered directly:

=SQRT((W1^2*S1^2)+(W2^2*S2^2)+(2*W1*W2*CORR*S1*S2))

For a portfolio with many holdings, create a covariance matrix and use matrix multiplication:

=SQRT(MMULT(MMULT(TRANSPOSE(weight_range),covariance_matrix),weight_range))

Modern versions of Excel generally process this as a dynamic-array calculation. Older versions may require array-entry procedures. The weight range must be arranged in dimensions that match the covariance matrix.

Excel’s MMULT function returns the matrix product of two arrays, while SUMPRODUCT can also be useful for weighted-return calculations. Check every range carefully. A beautifully formatted spreadsheet can still produce nonsense with tremendous confidence.

Annualizing Portfolio Standard Deviation

If the calculation uses periodic returns, you may want to annualize the result. Under the conventional square-root-of-time approach:

  • Daily standard deviation × √252 estimates annualized volatility using approximately 252 trading days.
  • Weekly standard deviation × √52 estimates annualized volatility.
  • Monthly standard deviation × √12 estimates annualized volatility.

For example, a monthly portfolio standard deviation of 2.5% would annualize to:

2.5% × √12 = approximately 8.66%

This method assumes that returns are reasonably independent across periods and that volatility is stable enough for the scaling rule to be meaningful. Financial markets occasionally object to those assumptions in dramatic fashion, so annualized historical volatility should be treated as an estimate rather than a promise.

Common Portfolio Standard Deviation Mistakes

Using Prices Instead of Returns

Portfolio volatility should normally be calculated from percentage returns. Raw prices are not comparable across assets and may create misleading results.

Mixing Frequencies or Missing Dates

All return series should use matching dates and the same frequency. Holidays, missing data, and different trading calendars can misalign observations and corrupt the covariance matrix.

Forgetting the Correlation Terms

A portfolio’s risk is not the weighted average of individual risks. Pairwise relationships can materially increase or decrease total volatility.

Using Current Weights With Unrelated Historical Data

Current weights provide a snapshot of today’s portfolio. A historical portfolio that was rebalanced or changed substantially may require time-varying weights for a more faithful analysis.

Treating Standard Deviation as a Complete Risk Measure

Standard deviation treats upside and downside deviations as variability. Investors, however, usually complain less when returns surprise them on the upside. It also does not directly capture liquidity risk, credit risk, permanent capital loss, concentration risk, or extreme tail events.

Practical Experience: Lessons From Realistic Portfolio Calculations

In practical portfolio-analysis exercises, the arithmetic is rarely the hardest part. The difficult work usually happens before the formula is entered. Data must be cleaned, dates must line up, distributions must be included, and portfolio weights must reflect the question being asked. A calculator will happily process bad inputs. It has no moral objection to producing a precise answer that is precisely wrong.

One common lesson is that the result can change significantly depending on the lookback period. A stock-and-bond portfolio measured during a calm market may show modest volatility and favorable diversification. Measure the same allocation during a financial crisis or sudden rate shock, and both individual volatility and correlations may rise. This does not necessarily mean one calculation is defective. Each period describes a different market environment.

Another practical lesson involves correlation. Investors sometimes assume that owning several securities automatically creates meaningful diversification. Yet ten technology stocks can behave more like one oversized position than ten independent investments. The portfolio may contain many ticker symbols while remaining heavily exposed to the same economic forces, valuation trends, interest-rate sensitivity, or investor sentiment.

The opposite surprise can occur when a seemingly dull asset reduces portfolio volatility more than expected. A lower-returning bond or cash allocation may reduce the covariance terms enough to lower total risk substantially. This illustrates why portfolio construction should focus not only on what each asset does alone but also on what it contributes to the combination.

Spreadsheet organization also matters. A reliable model separates assumptions, return data, weights, individual standard deviations, correlations, the covariance matrix, and the final output. Hard-coding every number inside one enormous formula may save three minutes today and consume three hours when something breaks next month. Clear labels and unit checks are not glamorous, but neither is explaining why an annual volatility estimate accidentally used daily weights and monthly covariance.

It is also useful to perform reasonableness tests. If two assets have a correlation of +1, the portfolio’s standard deviation should equal the weighted combination of their volatilities. If correlation falls below +1, diversification should generally reduce risk. If the output is negative before taking the square root, the covariance matrix or formula is probably invalid because variance cannot be negative in a properly constructed model.

Finally, portfolio standard deviation works best as part of a broader review. Compare it with the portfolio’s benchmark, maximum drawdown, downside deviation, concentration, liquidity, expected return, and ability to meet the investor’s actual goals. A portfolio with mathematically efficient volatility can still be unsuitable if the investor needs near-term cash or cannot tolerate temporary losses.

The most useful experience-based habit is therefore simple: calculate carefully, test the result, and interpret it in context. Standard deviation is a valuable dashboard gauge. It is not the entire engine, the road ahead, or the weather forecast.

Conclusion

To calculate portfolio standard deviation, determine each holding’s weight, collect consistent return data, calculate individual volatility, measure correlation or covariance, compute portfolio variance, and take its square root. For larger portfolios, the same logic is expressed efficiently through a covariance matrix.

The calculation demonstrates why diversification depends on relationships, not merely on the number of holdings. Assets that do not move perfectly together can create a portfolio with less volatility than a simple weighted average of their individual risks. Still, historical standard deviation is only one measure. It should be combined with other risk metrics and considered alongside financial goals, time horizon, and risk tolerance.