How to use the sharpe ratio calculator
- Choose to start from a return and volatility or from a list of returns.
- For the first, enter the annual return, the annual volatility (standard deviation) and the risk-free rate. For the second, paste the returns per period in percent and pick how many periods make a year.
- Enter the risk-free rate per year. The starting value is an example of a short-term baseline you choose.
- Read the Sharpe ratio. For a list, the page also shows the average, the sample standard deviation and the annualized values.
Formula
Sharpe ratio = (return - risk-free rate) / volatility
per period ratio = (mean return - risk-free / periods) / sample standard deviation
annualized = per period ratio x square root of periods per year
The standard deviation of a list uses n - 1 in the denominator, which is the sample version. Annualizing with the square root of the periods assumes returns are independent from one period to the next.
A summary and a list of twelve months
A return of 9%, a risk-free rate of 3% and a volatility of 14% give an excess return of 6 points and a ratio of 6 / 14 = 0.429. A negative excess return, such as a 1% return against 3% risk-free and 10% volatility, gives (0.2), shown in parentheses.
For twelve monthly returns of 2.1, -1.3, 3.4, 0.8, -2.2, 1.9, 2.7, -0.6, 1.1, 0.4, -1.8 and 2.5 percent, the average is 0.75% and the sample standard deviation is 1.8711%. With a risk-free rate of 3% a year, which is 0.25% a month, the per period ratio is (0.75 - 0.25) / 1.8711 = 0.2672, and the annualized ratio is 0.2672 x the square root of 12, which is 0.926.
What the ratio describes
The Sharpe ratio compares the return above a baseline with the variation in that return. A higher ratio means more return for each unit of variation, over the period measured. It lets you compare two investments that have different returns and different ups and downs on one scale, which a return figure alone cannot do.
It is a description of the past or of numbers you assume, and it predicts nothing. It treats gains and losses alike, so a large upward jump raises the volatility just as a large drop does. It also assumes returns are roughly symmetric, which is a poor fit for strategies with rare large losses. Treat it as one view among several, not as a verdict.
Choosing inputs
The risk-free rate is the baseline return you would get with little risk, such as a short-term government rate. Pick the one that matches your period and currency, and keep it the same when comparing investments. The volatility should use the same period as the return: an annual return pairs with an annual volatility, and a monthly list pairs with a monthly standard deviation, which the page converts for you.
Short lists give noisy results. Twelve points are enough to calculate a number but not enough to trust it much. For the spread of a list on its own, see the Standard Deviation Calculator. To combine two assets, use the Two-Asset Portfolio Calculator, and to compare several returns, the Investment Return Comparison Calculator. This page is informational and is not advice about any investment.
Assumptions and limits
- Returns are in percent, not decimals. A return of 2.1 means 2.1%. Each must be -100 or more.
- A list needs at least 3 and at most 5,000 returns, and they must not all be equal.
- The risk-free rate is divided evenly across periods for a list. Compounding is not modeled.
- Nothing is stored or uploaded, and nothing here is investment advice.
Frequently asked questions
How do you calculate the Sharpe ratio?
Subtract the risk-free rate from the return and divide by the volatility. A 9% return with a 3% risk-free rate and 14% volatility gives 6 / 14 = 0.429.
What is a good Sharpe ratio?
No single value separates good from bad, since it depends on the period, the market and what you compare against. The ratio is most useful for comparing two investments measured the same way, not as a pass or fail grade.
How do you annualize a monthly Sharpe ratio?
Multiply the per period ratio by the square root of the number of periods in a year. For monthly returns that is the square root of 12. This assumes returns are independent from month to month.
Why is the standard deviation divided by n - 1?
A list of returns is a sample, and dividing by n - 1 corrects the tendency of a sample to underestimate the spread. The page labels it the sample standard deviation so you know which version it uses.