Personal Finance Investing

Standard Deviation Formula

Close up hand of businesswoman accountant or banker making standard deviation calculations.
If you break down the equation step-by-step, you'll find it's not too difficult to calculate on your own. sukanya sitthikongsak/Getty
Read in app

Investors need to consider different types of risk when they're choosing which investments to buy and sell. One of these risks is related to an investment or a portfolio's volatility. Higher volatility may be riskier as big price swings can be hard to stomach and may make predicting an investment's returns more difficult, thereby making it more difficult to plan for the future. Also, big swings can cause you to make irrational decisions.  

These price swings can be expressed in terms of standard deviation. Standard deviation is used in many fields and situations to help determine a data point's typical distance from a data set's average. Within investing, which is what we'll focus on, an asset or portfolio's standard deviation is one way to assess its potential volatility.

Understanding standard deviation

In investing, standard deviation refers to the range of typical outcomes for investment returns. Sometimes, returns fall outside of one standard deviation, but most of the time you can expect returns to fall within one standard deviation, either above or below the average, if historical patterns hold similarly in the future.

Definition of standard deviation

Standard deviation — also referred to by the Greek letter sigma (σ) — measures how far an asset's returns have been from its average return, either over the full history of that asset or for a specific period. Investments that have a higher standard deviation may be more volatile, meaning they could be prone to larger price swings.  

"It's like when you're meeting a friend, and you tell him you'll arrive at 1 p.m., plus or minus 15 minutes," says Alvin Carlos, a financial planner at District Capital Management. "The 15 minutes is your standard deviation."

In other words, you can expect your friend to arrive between 12:45-1:15 p.m. Similarly, if an investment fund averages 10% returns with a standard deviation of 15%, you could expect its returns to range between -5% and 25% per year.

Importance in statistics

Standard deviation is an important measurement in the field of statistics, whether that's looking at average investment returns, average height, or essentially any other average with a range of expected results. 

You might see results expressed in terms of the number of standard deviations away from the mean. For example, a city might receive an average of 50 rainy days per year, with a standard deviation of 10, so most years there's between 40-60 rainy days. But if next year there happens to be 70 rainy days, that would be two standard deviations above the mean. In other words, it's not impossible for results to fall outside the standard deviation, but usually they fall within one standard deviation.

The same concept applies to investment returns. There's often an expected range of returns, but there's nothing technically stopping an asset from having much higher or lower returns.

68–95–99.7 rule

In statistics, the 68–95–99.7 rule states that 68% of results fall within one standard deviation, 95% fall within two standard deviations, and 99.7% fall within three standard deviations for a data set with normal distributions.

In other words, you can expect the majority of results to fall within one standard deviation, and almost all within two. With investment returns, there's no guarantee that the results will follow this rule, but it can be a helpful general guideline.

The standard deviation formula

There are two main ways to calculate standard deviation, depending on whether you're working with a full data set or just trying to measure the standard deviation for a particular period.

Formula for a sample

To find an asset's standard deviation when working with a subset of data, like only a certain range of years regarding an asset's returns, you use what's known as the formula for a sample. Specifically, the formula looks like the following, where you're taking the square root of the variance over a given period.

Standard deviation formula
Rachel Mendelson/Insider

Because it's a commonly used financial metric, some investment analysis websites and apps will show you an asset's standard deviations over different periods, using the formula for a sample.

Formula for a population

To calculate what's known as the formula for a population, meaning all possible data points in a series, like all the annual returns in the S&P 500's history, you follow the same formula except you don't subtract one in the denominator. 

Steps to calculate standard deviation

If you break down the equation step-by-step, you'll find it's not too difficult to calculate on your own. As an example of a standard deviation calculation, we can look at the S&P 500 during the first six months of 2024, which would be a formula for a sample, since it's a limited period. Note that numbers may be slightly affected by rounding. 

Step 1. Calculate the average return (the mean) for the period

Start by finding the average return, or mean, of the data points within the period. Here, we looked up historical returns to find how well the S&P 500 performed each month. 

S&P 500 returns for Jan. 2024 to June 2024

MonthReturn
January 20241.59%
February 20245.17%
March 20243.10%
April 2024-4.16%
May 20244.80%
June 20243.47%

To find the average, add up the six monthly returns and divide by six.

(1.59 + 5.17 + 3.10 + -4.16 + 4.80 + 3.47 / 6 = 2.33

Step 2. Find the square of the difference between the return and the mean

Once you have the mean, you can find the square of the difference between the actual rate of return (ri ) and the average rate of return (ravg) for each month.

For example, in January, it would be (1.59 - 2.33)2 = 0.55

February is (5.17 - 2.33)2 = 8.07

Repeat the process for all six months.

Step 3. Add the results

Now, add the results from step two to find the numerator (the number above the line) in the equation. 

In this case, the result is 58.73.

Step 4. Divide the result by the number of data points minus one

Next, divide the amount from step three by the number of data points (i.e., months) minus one. 

So, 58.73 / (6 - 1) = 11.75

Step 5. Take the square root

Finally, take the square root of the result — expressed as √11.75 — to find the standard deviation, which is 3.43, and this end result is usually expressed as a percentage. So, that means that monthly returns within one standard deviation of the mean (2.33%) for the first six months of 2024 range from -1.10% to 5.76%. As the actual results show, April's results fell out outside of one standard deviation but within two standard deviations. The other months fell within one standard deviation exemplifying how the 68–95–99.7 rule can be a useful generalization.

Still, this is a limited data set, so it's important to not draw too many conclusions. In general, though, looking at standard deviations like these helps you form expectations of what you might potentially lose and what you might potentially gain each period, rather than assuming you'll hit the average all the time.

If this all seems like a lot of math, don't worry too much about how to calculate standard deviation. Even if you can't find this information published online already for an asset, there are plenty of online calculators you can use, and spreadsheet programs like Excel and Google Sheets have a built-in formula:

=STDEV(point, [point2, ...])


Quick tip: The standard deviation formula we're using for analyzing an investment is the standard deviation of a sample of data. There's also a formula to find the standard deviation of an entire population, which is identical, except you divide by N rather than (N-1) in step four.

Interpreting standard deviation

The standard deviation can be a helpful guideline, but it isn't always accurately predictive. Instead, it tells you how volatile the asset has been in the past. That measurement can be used to analyze price performance trends and get a sense of how much an investment might fluctuate from its expected return over a given period of time if past trends continue, but you can't assume that will always be the case. Still, you might prefer assets with certain standard deviation results that fit your investment goals and risk tolerance.

High standard deviation

"A higher standard deviation means the investment has more volatility potential with higher highs and lower lows," says Brian Stivers, an investment advisor and founder of Stivers Financial Services

As an investor, you can consider the standard deviation of a particular asset to evaluate what rate of return is acceptable for the risks you are taking on.

"For a very active investor, who trades on a regular basis, to try and follow the trends or momentum in the marketplace, they may prefer a higher standard deviation if they believe the market is heading upward with the goal of reallocating their investment if it hits an acceptable high before the market begins to trend downward," Stivers says.

Low standard deviation

On the flip side, investors with a lower risk tolerance may steer toward securities with a lower standard deviation, which tend to vary less from their average rate of return. 

For example, the stock of a stable blue-chip company tends to have a lower standard deviation, while a fast-growing tech startup is more likely to have a higher standard deviation. Each carries different expectations for its return to stock investors.

Applications of standard deviation

Standard deviation calculations can be used in different fields, such as:

In finance

Investors may use the standard deviation for an asset, whether that's a specific stock or an index fund, as part of technical analysis. It can also be an indicator of an asset's potential volatility and rate of return.

Within a normal distribution — an inverted bell-shaped curve — an asset's returns may fall within one standard deviation of the average 68% of the time, within two standard deviations 95% of the time, and within three standard deviations 99.7% of the time (the 68–95–99.7 rule). 

"In investing, you may have read that the stock market has historically returned 10%," says Carlos. "That doesn't mean you'll get a 10% return each year." Instead, explains Carlos, you might expect a return of 10% plus or minus one standard deviation. 

For example, over the last 10 years, the S&P 500's average annual return was 11.21%, and it had an annual standard deviation of about 15.25%, according to Morningstar. So, you might conclude that there's around a two–in-three chance the next year's returns will fall within the -4.04% to 26.4% range.

In quality control

Outside of finance, standard deviation can be used as part of quality control processes. For example, calculating the standard deviation of how many units per hour a manufacturer can produce can help quality control teams identify if they're starting to stray too far outside the average, which might indicate issues like faulty equipment or inconsistent oversight.

In research and development

Standard deviation calculations can also be used to improve R&D, such as to assess the success of various R&D projects. Some companies, for example, might have high standard deviations in terms of R&D projects that turn into profitable ventures, with some years producing lots of great outcomes and some not. So, calculating the standard deviation here can help companies better assess the performance of new R&D projects in the context of the range of typical outcomes for previous ones.

The bottom line on finding standard deviation

An asset's standard deviation isn't enough to tell you whether or not investing is a good idea. It's also not necessarily predictive, as an asset's historical price changes don't necessarily align with its future returns. Still, it can be informative. 

Carlos points to emerging market and U.S. small-cap stocks, which have a higher standard deviation than U.S. investment-grade bonds. "The higher your investment's standard deviation, the wilder the price swings you'll experience," he says. 

More volatile investments may be desirable in some cases, particularly if you have a long time horizon and can wait out the ups and downs in exchange for a higher return potential. But it can also be risky to hold volatile assets if you're actively trading or may need the money soon.

FAQs about standard deviation

What is the standard deviation formula for a population?

Chevron icon It indicates an expandable section or menu, or sometimes previous / next navigation options.

The standard deviation formula for a population is σ = √(Σ(xi - μ)² / N). In this formula,σ stands for standard deviation, and xi is each value in the population, μ is the mean of all values, and N is the number of values. This formula is used when you have a full data set for all possible periods/situations measured.

What is the standard deviation formula for a sample?

Chevron icon It indicates an expandable section or menu, or sometimes previous / next navigation options.

The standard deviation formula for a sample is almost the same as the formula for a population, except you subtract N by 1 in the denominator, so it's: σ = √(Σ(xi - μ)² / N-1). This helps calculate the variance over a specific period.

Why is standard deviation important?

Chevron icon It indicates an expandable section or menu, or sometimes previous / next navigation options.

Standard deviation is important for investors to understand the typical range of returns for an asset historically. It doesn't necessarily say what will happen in the future, but it indicates how volatile an asset has been in the past.

How do you interpret a low standard deviation?

Chevron icon It indicates an expandable section or menu, or sometimes previous / next navigation options.

A low standard deviation generally means that the data points in a data set don't stray too far from the mean, so with investing, it could mean an asset has low volatility.

How do you interpret a high standard deviation?

Chevron icon It indicates an expandable section or menu, or sometimes previous / next navigation options.

A high standard deviation generally means that the data points in a data set are widely spread out, so with investing, it could mean an asset has high volatility.

Read next

Louis DeNicola is the president of LD Money Media LLC and an experienced writer who specializes in consumer credit, personal finance, and small-business finance. He is a Nav-certified credit and lending specialist, a multi-year attendee of an 18-hour advanced credit education seminar, and a volunteer tax preparer through the IRS's VITA program.  Louis works with various publishers, credit bureaus, Fortune 500 financial services firms, and FinTech startups. In addition to Insider, you can find his work on Experian, FICO, Credit Karma, FICO, and Lending Tree.  You can connect with Louis on LinkedIn or reach out to him directly at ladenicola@gmail.com.
Jake Safane is a freelance writer specializing in finance and sustainability. He runs a corporate sustainability blog, Carbon Neutral Copy, and his work has appeared in publications such as The Economist, CBS MoneyWatch, and the Los Angeles Times.ExperienceJake has been working in financial journalism since 2011, covering areas such as banking and investing for both businesses and individuals. His career has included a mix of in-house reporting jobs at B2B finance publications such as Global Custodian and FundFire, a role in sponsored research at The Economist, and freelance engagements with online publications, financial advisors, and fintech companies.His interest in personal finance dates back to joining his middle school stock trading club, where he learned about markets by doing simulated trading. A high school field trip to the New York Fed further cemented his fascination with the financial system and how seemingly academic concepts can make a big difference in the average person's life.His personal interest in the environment has also carried over into finance, such as by covering ESG and impact investing. He believes that one of the top ways to solve the climate crisis is by helping both businesses and individuals realize the long-term financial benefits that sustainability can bring.In his personal life, he also enjoys playing tennis, going to the gym, and going to the beach with his family — though often just for walks along a paved path, because vacuuming sand trekked in by a toddler and dog really cuts into writing time.ExpertiseJake’s areas of personal finance expertise include:
  • Investing
  • Banking
  • Financial Planning
  • Retirement
  • Insurance
EducationJake is a graduate of Boston University, where he wrote for The Daily Free Press and had a show on the school's radio station.