# What is my Sharpe ratio?

Computes the Sharpe ratio of a portfolio, its return above the risk-free rate per unit of standard deviation, from summary figures or from a list of period returns, with the annualized ratio.

- Page: https://www.acalculator.org/finance/sharpe-ratio-calculator
- JSON spec: https://www.acalculator.org/finance/sharpe-ratio-calculator.json
- Version: f1e9309ad3a7

## Default answer

Example with the default inputs (Data Return and standard deviation, Portfolio return 20%, Risk-free rate 3%, Standard deviation of the return 26%): The Sharpe ratio is 0.65.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| from | Data | Type the average return and standard deviation, or a list of returns for each period. |
| rp | Portfolio return | The return of the portfolio or fund over the period, for example a year. |
| rf | Risk-free rate | The return on a riskless investment, such as a Treasury bill, over the same period. |
| sd | Standard deviation of the return | How much the portfolio’s return varies, as a standard deviation over the same period. |
| returns | Returns for each period (%) | The portfolio’s return in each period, in percent, separated by spaces or new lines. |
| rfy | Risk-free rate per year | The yearly return on a riskless investment; it is divided by the periods per year. |
| per | Periods per year | 12 for monthly returns, 52 for weekly, 252 for trading days, 1 for yearly. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| sharpe | Sharpe ratio | Excess return ÷ standard deviation; from a list of returns, the per-period ratio × √(periods per year). |
| perPeriod | Sharpe ratio per period | List of returns: mean excess return ÷ its sample standard deviation. |
| excess | Excess return | Return − risk-free rate; from a list, the mean excess return per period. |
| sdExcess | Standard deviation of excess returns | List of returns: √(Σ (Dₜ − D̄)² ÷ (n − 1)), per period. |
| count | Periods | How many returns are in the list. |

## Method

S = (Rp − Rf) ÷ σp. From returns: Dₜ = Rₜ − Rf ÷ m, S = D̄ ÷ σ_D with σ_D = √(Σ (Dₜ − D̄)² ÷ (n − 1)), annual S = √m × S, where m is the periods per year.

## Assumptions

- Returns and the risk-free rate are for the same period; a yearly risk-free rate is divided evenly over the periods of a year.
- Annualizing by √(periods per year) assumes the excess returns of different periods are not correlated.
- Arithmetic is exact on the typed decimals; the standard deviation uses a floating-point square root.

## Worked examples

1. from = summary, rp = 20%, rf = 3%, sd = 26% gives sharpe = 0.653846, excess = 17%. Source: OpenStax, Principles of Finance, 15.4 Applications in Performance Measurement (Sharpe ratio = (R_P − R_f) ÷ σ_P; McKinley: 17% ÷ 26% = 0.65; Mr. Wong 1.5, Ms. Petrov 1.4). https://openstax.org/books/principles-finance/pages/15-4-applications-in-performance-measurement: 17% ÷ 26% = 0.65.
2. from = summary, rp = 14%, rf = 2%, sd = 8% gives sharpe = 1.5. Source: OpenStax, Principles of Finance, 15.4 Applications in Performance Measurement (Sharpe ratio = (R_P − R_f) ÷ σ_P; McKinley: 17% ÷ 26% = 0.65; Mr. Wong 1.5, Ms. Petrov 1.4). https://openstax.org/books/principles-finance/pages/15-4-applications-in-performance-measurement: (14% − 2%) ÷ 8% = 1.5.
3. from = summary, rp = 16%, rf = 2%, sd = 10% gives sharpe = 1.4. Source: OpenStax, Principles of Finance, 15.4 Applications in Performance Measurement (Sharpe ratio = (R_P − R_f) ÷ σ_P; McKinley: 17% ÷ 26% = 0.65; Mr. Wong 1.5, Ms. Petrov 1.4). https://openstax.org/books/principles-finance/pages/15-4-applications-in-performance-measurement: (16% − 2%) ÷ 10% = 1.4.
4. from = summary, rp = 6%, rf = 0%, sd = 15% gives sharpe = 0.4. Source: William F. Sharpe, "The Sharpe Ratio", The Journal of Portfolio Management, Fall 1994: Dₜ = R_Ft − R_Bt (3), D̄ = Σ Dₜ ÷ T (4), σ_D = √(Σ (Dₜ − D̄)² ÷ (T − 1)) (5), S_h = D̄ ÷ σ_D (6), and over T periods σ grows as √T (9), so the ratio does too; an annual excess return of 6% with a 15% standard deviation gives about 0.40. https://web.stanford.edu/~wfsharpe/art/sr/sr.htm: about 0.40.
5. from = series, returns = 2 or -1, rfy = 2.4%, per = 12 gives perPeriod = 0.615491, sharpe = 2.132122, excess = 0.966667%, sdExcess = 1.570563%, count = 6. Source: William F. Sharpe, "The Sharpe Ratio", The Journal of Portfolio Management, Fall 1994: Dₜ = R_Ft − R_Bt (3), D̄ = Σ Dₜ ÷ T (4), σ_D = √(Σ (Dₜ − D̄)² ÷ (T − 1)) (5), S_h = D̄ ÷ σ_D (6), and over T periods σ grows as √T (9), so the ratio does too; an annual excess return of 6% with a 15% standard deviation gives about 0.40. https://web.stanford.edu/~wfsharpe/art/sr/sr.htm.

## FAQ

### What is the Sharpe ratio?

The Sharpe ratio is the return a portfolio earns above the risk-free rate, divided by the standard deviation of its return. It says how much extra return each unit of risk brought. William Sharpe introduced it in 1966 as the reward-to-variability ratio.

### How do I calculate the Sharpe ratio?

Subtract the risk-free rate from the portfolio’s return and divide by the standard deviation of the return. A portfolio that returned 20% with a 26% standard deviation, when Treasury bills paid 3%, has a Sharpe ratio of (20 − 3) ÷ 26 = 0.65.

### What is a good Sharpe ratio?

Higher is better, when you compare portfolios over the same period with the same risk-free rate. A portfolio with 14% return and an 8% standard deviation (1.5) did better per unit of risk than one with 16% and 10% (1.4), at a 2% risk-free rate, even though its return was lower.

### How do I annualize a Sharpe ratio?

Multiply the ratio for one period by the square root of the number of periods in a year: √12 for monthly returns, √52 for weekly, √252 for trading days. This assumes the returns of different periods are not correlated with each other; if they are, the result is only an estimate.

### Why does the standard deviation divide by n − 1?

Sharpe’s 1994 definition of the ex post ratio uses the sample standard deviation: the sum of squared differences from the mean, divided by the number of periods minus 1. This page does the same, so its results match a spreadsheet’s STDEV.S.

### What is the difference between the Sharpe ratio and the Treynor ratio?

Both divide the excess return by a measure of risk. The Sharpe ratio uses the standard deviation, which counts all ups and downs; the Treynor ratio uses beta, which counts only market risk.

## Sources

- William F. Sharpe, "The Sharpe Ratio", The Journal of Portfolio Management, Fall 1994 (author’s web edition): the differential return Dₜ = R_Ft − R_Bt, its mean D̄, its standard deviation σ_D = √(Σ (Dₜ − D̄)² ÷ (T − 1)), the ex post ratio S_h = D̄ ÷ σ_D, the √T growth of the standard deviation over T periods, and the 6% ÷ 15% = 0.40 example. https://web.stanford.edu/~wfsharpe/art/sr/sr.htm (retrieved 2026-10-18)
- OpenStax, Principles of Finance, 15.4 Applications in Performance Measurement: Sharpe ratio = (R_P − R_f) ÷ σ_P, Treynor ratio = (R_P − R_f) ÷ β_P; McKinley Investment Management (17% ÷ 26% = 0.65) and Mr. Wong (1.5) against Ms. Petrov (1.4). https://openstax.org/books/principles-finance/pages/15-4-applications-in-performance-measurement (retrieved 2026-10-18)
