Home › Investing & 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
portfolio_return_percent | number | % per period | yes | Average (or total) return of the portfolio per period in percent. Range: ≥ -100, ≤ 1000 |
risk_free_rate_percent | number | % per period | yes | Risk-free return over the same period in percent. Range: ≥ -20, ≤ 100 |
standard_deviation_percent | number | % per period | yes | Standard deviation of the portfolio's returns per period in percent. Range: > 0, ≤ 1000 |
periods_per_year | integer | default 1 | 1 for annual figures, 12 for monthly, 52 for weekly, 252 for trading-daily; the ratio is annualized by √periods. Range: ≥ 1, ≤ 366 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
sharpe_ratio | number | (portfolio_return − risk_free_rate) / standard_deviation. | |
annualized_sharpe_ratio | number | sharpe_ratio × √periods_per_year (equal to sharpe_ratio for annual data). | |
excess_return_percent | number | % | portfolio_return − risk_free_rate per period. |
interpretation | string | Rule 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
- API:
GET https://tttkmbb.com/api/v1/calculate/sharpe-ratio(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/sharpe-ratio · Markdown: https://tttkmbb.com/investing/sharpe-ratio.md · JSON definition: https://tttkmbb.com/investing/sharpe-ratio.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="sharpe-ratio" - OpenAPI operationId:
calculate_sharpe_ratio - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Sharpe W. F. (1994) The Sharpe Ratio, Journal of Portfolio Management 21(1):49-58 (peer_reviewed)
- Wikipedia – Sharpe ratio (reference)
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
- Maximum Drawdown Calculator — A drawdown-based view of the same portfolio's risk.
- Descriptive Statistics Calculator — Compute the mean and standard deviation of a return series first.
- CAPM Calculator — Expected return implied by beta rather than realised performance.