HomeInvesting & Real Estate › Sharpe Ratio Calculator

Sharpe Ratio Calculator

Computes the Sharpe ratio of a portfolio from its return, the risk-free rate and the standard deviation of returns, annualizes it for monthly, weekly or daily data and gives a rule-of-thumb interpretation.

When to use

You want to compare investments or strategies on return per unit of total risk, or annualize a Sharpe ratio measured on periodic data.

Do not use when: You only care about downside risk (use a Sortino ratio) or the return per unit of market risk (Treynor ratio). Informational only; not financial advice.

Formula

sharpe_ratio = (portfolio_return_percent − risk_free_rate_percent) / standard_deviation_percent; annualized_sharpe_ratio = sharpe_ratio × √periods_per_year

Ex-post Sharpe ratio (Sharpe 1994) with the risk-free rate as benchmark; √t annualization assumes independent, identically distributed period returns. Informational mathematics only; not financial advice.

Inputs

ParameterTypeUnitRequiredDescription
portfolio_return_percentnumber% per periodyesAverage (or total) return of the portfolio per period in percent. Range: ≥ -100, ≤ 1000
risk_free_rate_percentnumber% per periodyesRisk-free return over the same period in percent. Range: ≥ -20, ≤ 100
standard_deviation_percentnumber% per periodyesStandard deviation of the portfolio's returns per period in percent. Range: > 0, ≤ 1000
periods_per_yearintegerdefault 11 for annual figures, 12 for monthly, 52 for weekly, 252 for trading-daily; the ratio is annualized by √periods. Range: ≥ 1, ≤ 366

Outputs

OutputTypeUnitDescription
sharpe_rationumber(portfolio_return − risk_free_rate) / standard_deviation.
annualized_sharpe_rationumbersharpe_ratio × √periods_per_year (equal to sharpe_ratio for annual data).
excess_return_percentnumber%portfolio_return − risk_free_rate per period.
interpretationstringRule of thumb applied to the annualized ratio: below 1 sub-optimal, 1–2 acceptable, 2–3 very good, above 3 excellent.

Example

12 % return, 3 % risk-free, 15 % volatility (annual): {"portfolio_return_percent":12,"risk_free_rate_percent":3,"standard_deviation_percent":15}{"sharpe_ratio":0.6,"annualized_sharpe_ratio":0.6,"excess_return_percent":9,"interpretation":"Sub-optimal (below 1)"}

Monthly data: 1 % return, 0.25 % risk-free, 3 % deviation: {"portfolio_return_percent":1,"risk_free_rate_percent":0.25,"standard_deviation_percent":3,"periods_per_year":12}{"sharpe_ratio":0.25,"annualized_sharpe_ratio":0.866,"excess_return_percent":0.75}

GET https://tttkmbb.com/api/v1/calculate/sharpe-ratio?portfolio_return_percent=12&risk_free_rate_percent=3&standard_deviation_percent=15

Machine access

Sources

FAQ

Which risk-free rate should I use?

A government bill yield over the same period as the returns: an annual yield for annual data, or the yield divided by 12 for monthly data.

Can the Sharpe ratio be negative?

Yes, when the portfolio returned less than the risk-free rate. Negative ratios are not comparable with each other because a higher deviation then makes the ratio look better.

Related calculators