Volatility is the bane of many investors. Bumpy moves in your portfolio in response to market fluctuations can cause you to make emotionally driven mistakes in your investing, and that can cause you to earn less than ideal returns. By knowing how to calculate how volatile your portfolio is, you can get a better sense of its potential risk going forward.

Standard deviation and statistics
In order to analyze volatility, you need to create a dataset based on your returns at intervals over a given timeframe. Using a long interval, such as a year, might seem like a good way to capture a useful long-term investing metric, but the problem is that you need a large enough dataset from which to draw valid statistical conclusions. Therefore, shorter intervals over a longer timeframe typically provide better results, even though they have the drawback of carrying a short-term focus that isn't necessarily consistent with the holding periods that long-term investors seek.

Once you've chosen the overall time frame and the intervals within that timeframe, measure the return for each interval. Then take the average return across all intervals. This gives you the benchmark against which you'll compare each interval's actual return.

With the average return in hand, take each interval's return and subtract the average return from it. That will give you the outperformance or underperformance in each interval compared to the average return. Then, multiply the result by itself, and record the answers for each interval.

When you're done, find the average of the final results for the intervals as a whole. Take the square root of that number, and you'll get the standard deviation of the portfolio. In general, the higher the standard deviation, the more volatile the portfolio's returns will be.

What standard deviation won't tell you
There are some shortcomings to using standard deviation to calculate volatility. The most important is that standard deviations assume that returns are normally distributed, with more results near the average and fewer results far away from the average. In actuality, portfolio returns often have asymmetrical distributions, and they can be unusually high or low over time. In addition, volatility tends to change over time, challenging the assumption of an unchanging statistical distribution of returns.

Nevertheless, looking at the standard deviation of your portfolio can give you at least a baseline sense of how volatile your investments will be. Monitoring risk can be crucial in order to ensure that your portfolio behaves the way you expect it to regardless of market conditions.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at knowledgecenter@fool.com. Thanks -- and Fool on!