How-to · Options
Historical Volatility Calculation, Step by Step
A historical volatility calculation turns a column of closing prices into one annual percentage. Every step can be done by hand or in a spreadsheet, and each choice along the way moves the answer.
Short answer
Take the natural log of each close divided by the previous close, find the sample standard deviation of those returns (dividing by n minus 1), then multiply by the square root of 252 to annualize. Eleven closes give ten returns; in the worked example a daily standard deviation of 1.34% becomes about 21.3% a year.
Two platforms can show different historical volatility for one ticker on one afternoon. Neither is broken. Each made a handful of choices, the length of the window, the divisor, whether to subtract the mean, and a historical volatility calculation done once by hand shows exactly where those choices sit and how much each one moves the result.
What do you need before you start?
A column of daily closing prices, oldest at the top.
Use closes adjusted for splits, because an unadjusted two-for-one split looks like a 50% collapse in one session and that single fake return would swamp everything else in the window, and check how your data source treats dividends as well, since a large special dividend can show up as a one-day drop when no trading loss took place.
Then pick the window: the number of returns you will measure. The example below uses ten returns, which takes eleven closes, because every return needs a close before it.
How do you calculate historical volatility, step by step?
- Divide each close by the close before it and take the natural log. That is the daily log return.
- Average the returns.
- Subtract the average from each return and square the result.
- Add the squares and divide by the number of returns minus one. That is the sample variance.
- Take the square root. That is the daily standard deviation.
- Scale the daily figure to a year with √252.
Here it is on a hypothetical stock trading near $50.
That check is the reason log returns are the default. The daily figures sum to the return for the whole stretch, so nothing leaks out when the scale changes.
So the stock’s ten-session historical volatility is about 21.3%. The implied vs historical volatility guide explains why the square root of 252 is the scaling factor; the steps above are what feeds it.
What does it look like in a spreadsheet?
Put dates in column A and closes in column B, from row 2 down to row 12. In C3, enter =LN(B3/B2) and fill it down to C12. That column holds the ten returns.
One cell does the rest. =STDEV.S(C3:C12) returns the daily standard deviation, already divided by n minus 1. Wrap it as =STDEV.S(C3:C12)*SQRT(252) for the annual figure. Format the cell as a percentage.
For a rolling figure, fill that last formula down beside the returns, and each row gives the volatility of the ten returns ending there.
Why divide by n minus 1?
The mean in step 2 came from the same ten returns. Measuring scatter around a mean the data itself produced understates the true spread a little, and dividing by one less than the count corrects for it. STDEV.S does this. STDEV.P divides by n.
The difference is small but visible. Run the example with n and it gives 20.19%. Some platforms also skip the mean entirely and treat it as zero, on the view that a daily drift is too small to estimate from a short window; that version gives 20.53% here. Each method is defensible, and the answers sit within about a point of each other.
Which window should you use?
Short windows react fast. Long windows hold on to old days.
A 10-session window covers about two trading weeks. Twenty or 21 sessions is roughly a month of trading, and it is a common choice because it lines up with a one-month option. Thirty sessions smooths further. On a stock whose daily moves look the same week after week, all three land close together: repeating the example’s returns across 20 and 30 sessions gives 20.71% and 20.53%.
They split apart when one day stands out.
Why does historical volatility suddenly drop?
Swap the fifth return in the example, the -1.39% session, for a -6.00% gap after bad news. Nothing else changes.
The shortest window nearly doubles. The big day stays in the window for exactly as many sessions as the window is long, and on the session it falls off the end, a 10-day HV can drop from the high 30s back toward 21% overnight, even though the stock did nothing unusual that day. The 30-session figure jumps less, stays high three times as long, and falls much later, 30 sessions after the gap, when anyone watching only the 10-day reading has long since seen it settle back to where it started.
Read a sudden drop in HV as arithmetic before you read it as calm. Count back through the window and see whether a large day just left it.
Is close-to-close the only estimator?
No. Close-to-close throws away everything that happened during each session. A stock can swing $3 between its high and low and close unchanged, and the calculation above records a zero.
Range-based estimators use that lost information. Parkinson’s version uses only the daily high and low: square the log of each day’s high divided by its low, average those squares, divide by 4 times the natural log of 2, take the square root and annualize. It squeezes more out of each day, and it misses overnight gaps, since a gap happens between one session’s low and the next session’s high. Later estimators from Garman and Klass, Rogers and Satchell, and Yang and Zhang fold in the open and close as well, with Yang and Zhang built to handle opening gaps.
Average true range also uses highs, lows and gaps, but it reports a typical dollar move per bar, never an annual percentage, so it answers a stop-placement question. Bollinger Bands apply a standard deviation to price levels, which is a different input again.
How do you compare the result with an option’s IV?
Line up the horizons first. Compare a 20 or 21 session HV with the implied volatility of an option about a month from expiry, and a 10-session figure only with something shorter.
Say the one-month option on the example stock carries an IV of 30%, against the 21.28% the stock has actually delivered.
The options are priced for moves about 40% larger than the recent ones. Look for the reason. An earnings date inside the option’s life is the usual one, and that premium tends to vanish once the news is out, which is IV crush. Turning that IV into a dollar range for the stock is covered in implied volatility and the expected move.
If no event explains the gap, check your HV first: the window, the divisor, a split in the data. Then decide whether the market is paying for something your eleven closes cannot show.
Questions traders ask next
Why use log returns and not simple percentage changes?
Log returns add up across days, so the ten daily figures sum to the log return for the whole stretch, which keeps the scaling to a year consistent. Over one day the two kinds of return are nearly identical for ordinary moves. The gap grows on large moves, and log returns treat a rise and an equal-sized fall back to the start symmetrically.
Should I use 252 or 365 to annualize historical volatility?
Use the number of periods your returns come from. Daily returns from trading sessions take 252, the usual count of sessions in a US market year. Weekly returns take 52. Calendar-day figures use 365 only when the returns were measured across every calendar day. Mixing conventions between two numbers you plan to compare makes the comparison meaningless.
Is historical volatility the same as realized volatility?
People use the two names for the same thing: the standard deviation of returns a stock actually produced over a past window, annualized. Some traders reserve realized volatility for the figure measured over the life of a specific option after it expires, so they can set it against the implied volatility they paid at the start.