# What is the historical volatility?

Computes the historical volatility of a stock or other asset from typed closing prices: the standard deviation of its log or percent returns, per period and annualized.

- Page: https://www.acalculator.org/finance/volatility-calculator
- JSON spec: https://www.acalculator.org/finance/volatility-calculator.json
- Version: d926455a82b4

## Default answer

Example with the default inputs (Closing prices [100, 102, 101, 104, 103, 106], Returns Log returns, Periods per year 252): From these 5 returns, the annualized historical volatility is 31.6%.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| prices | Closing prices | The price at the end of each period, oldest first, separated by spaces or new lines. |
| returns | Returns | Log returns ln(Pₜ ÷ Pₜ₋₁), the usual choice for volatility, or plain percent changes (Pₜ − Pₜ₋₁) ÷ Pₜ₋₁. |
| per | Periods per year | 252 for daily closes on trading days, 52 for weekly closes, 12 for monthly closes. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| annual | Volatility (annualized) | Standard deviation of the returns × √(periods per year), as a percent. |
| period | Volatility per period | The sample standard deviation of the returns, as a percent. |
| mean | Mean return per period | The average of the returns, as a percent. |
| count | Returns | How many returns: one fewer than the prices. |

## Method

rₜ = ln(Pₜ ÷ Pₜ₋₁) or (Pₜ − Pₜ₋₁) ÷ Pₜ₋₁ for t = 1 to n; s = √(Σ (rₜ − r̄)² ÷ (n − 1)); annual volatility = s × √m, where m is the periods per year.

## Assumptions

- Prices are typed, oldest first, one per period at equal spacing; no quote is looked up.
- Annualizing by √(periods per year) assumes the returns of different periods are not correlated.
- Dividends and splits are not adjusted for: type adjusted closes if the series has them.

## Worked examples

1. prices = 100 or 102, returns = log, per = 252 gives annual = 31.595223%, period = 1.990312%, mean = 1.165378%, count = 5. Source: NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6 Measures of Scale (s = √(Σ (Yᵢ − Ȳ)² ÷ (N − 1))). https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm; William F. Sharpe, "The Sharpe Ratio" (1994), equations 8 and 9: over T periods the variance is T times and the standard deviation √T times that of one period, for returns that are not serially correlated. https://web.stanford.edu/~wfsharpe/art/sr/sr.htm.
2. prices = 100 or 102, returns = simple, per = 252 gives annual = 31.880389%, period = 2.008276%, mean = 1.188198%. Source: OpenStax, Principles of Finance, 15.5 Using Excel to Make Investment Decisions (monthly return = (Pₜ − Pₜ₋₁) ÷ Pₜ₋₁; the standard deviation of the returns as their volatility). https://openstax.org/books/principles-finance/pages/15-5-using-excel-to-make-investment-decisions; NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6 Measures of Scale (s = √(Σ (Yᵢ − Ȳ)² ÷ (N − 1))). https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm; William F. Sharpe, "The Sharpe Ratio" (1994), equations 8 and 9: over T periods the variance is T times and the standard deviation √T times that of one period, for returns that are not serially correlated. https://web.stanford.edu/~wfsharpe/art/sr/sr.htm.
3. prices = 50 or 52, returns = simple, per = 12 gives annual = 20.166785%, period = 5.821649%, mean = 2.538885%. Source: OpenStax, Principles of Finance, 15.5 Using Excel to Make Investment Decisions (monthly return = (Pₜ − Pₜ₋₁) ÷ Pₜ₋₁; the standard deviation of the returns as their volatility). https://openstax.org/books/principles-finance/pages/15-5-using-excel-to-make-investment-decisions; NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6 Measures of Scale (s = √(Σ (Yᵢ − Ȳ)² ÷ (N − 1))). https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm; William F. Sharpe, "The Sharpe Ratio" (1994), equations 8 and 9: over T periods the variance is T times and the standard deviation √T times that of one period, for returns that are not serially correlated. https://web.stanford.edu/~wfsharpe/art/sr/sr.htm.

## FAQ

### What is historical volatility?

Historical volatility is how much an asset’s returns have varied in the past: the standard deviation of its returns over a period. If the returns are roughly normal, about two years in three land within one standard deviation of the average: a stock with a 10% average return and a 30% volatility would return between −20% and +40% in about two years out of three.

### How do I calculate volatility from prices?

Turn the prices into returns, one for each period: ln(today ÷ yesterday) for log returns, or (today − yesterday) ÷ yesterday for percent changes. Take the sample standard deviation of the returns (divide by the number of returns minus 1), then multiply by the square root of the periods in a year to annualize it.

### Should I use log returns or percent changes?

Log returns are the usual choice for volatility: they are continuously compounded returns, so the returns of several days add up to the return over all of them. For small daily moves the two give almost the same answer; they drift apart for large moves.

### Why multiply by the square root of 252?

If returns from different days are not correlated, their variance grows in proportion to time, so the standard deviation grows with its square root. 252 is a common count of trading days in a year (365 days less weekends and market holidays). Use 52 for weekly closes and 12 for monthly closes.

### Is this the same as implied volatility?

No. Historical volatility is measured from past prices. Implied volatility is the volatility that makes an option-pricing model match an option’s market price, so it is the market’s estimate of the volatility to come.

### How many prices should I use?

Enough to cover the window you care about, such as 21 trading days for about a month or 252 for a year. Few prices give a noisy estimate; very old prices may describe a market that has changed.

## Sources

- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6 Measures of Scale: the sample standard deviation s = √(Σ (Yᵢ − Ȳ)² ÷ (N − 1)). https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm (retrieved 2026-10-18)
- OpenStax, Principles of Finance, 15.1 Risk and Return to an Individual Asset and 15.5 Using Excel to Make Investment Decisions: return = (ending price − beginning price) ÷ beginning price, and the standard deviation of the returns (with N − 1) as the measure of volatility. https://openstax.org/books/principles-finance/pages/15-1-risk-and-return-to-an-individual-asset and https://openstax.org/books/principles-finance/pages/15-5-using-excel-to-make-investment-decisions (retrieved 2026-10-18)
- William F. Sharpe, "The Sharpe Ratio", The Journal of Portfolio Management, Fall 1994, equations 8 and 9: over T periods the variance is T times, and the standard deviation √T times, that of one period, for returns with no serial correlation. https://web.stanford.edu/~wfsharpe/art/sr/sr.htm (retrieved 2026-10-18)
- OpenStax, College Algebra 2e, 6.1 Exponential Functions: continuous growth A(t) = a × e^(rt), the basis of the log return r = ln(Pₜ ÷ Pₜ₋₁). https://openstax.org/books/college-algebra-2e/pages/6-1-exponential-functions (retrieved 2026-10-18)
