# 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.

- Calculator id: `sharpe-ratio` · Category: Investing & Real Estate (`investing`) · Tool name: `calculate_sharpe_ratio`
- Canonical page: https://tttkmbb.com/investing/sharpe-ratio · This document: https://tttkmbb.com/investing/sharpe-ratio.md · JSON definition: https://tttkmbb.com/investing/sharpe-ratio.json

## Purpose

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.

**Use when:** 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.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `portfolio_return_percent` | number | % per period | required | Average (or total) return of the portfolio per period in percent. (min -100, max 1000) |
| `risk_free_rate_percent` | number | % per period | required | Risk-free return over the same period in percent. (min -20, max 100) |
| `standard_deviation_percent` | number | % per period | required | Standard deviation of the portfolio's returns per period in percent. (> 0, max 1000) |
| `periods_per_year` | integer |  | optional, default 1 | 1 for annual figures, 12 for monthly, 52 for weekly, 252 for trading-daily; the ratio is annualized by √periods. (min 1, max 366) |

## Output

| Field | 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. |

## 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.

## Data Sources

- Sharpe W. F. (1994) The Sharpe Ratio, Journal of Portfolio Management 21(1):49-58 — https://web.stanford.edu/~wfsharpe/art/sr/sr.htm (peer_reviewed, retrieved 2026-09-24)
- Wikipedia – Sharpe ratio — https://en.wikipedia.org/wiki/Sharpe_ratio (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/sharpe-ratio?portfolio_return_percent=…&risk_free_rate_percent=…&standard_deviation_percent=…`
- `POST https://tttkmbb.com/api/v1/calculate/sharpe-ratio` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/sharpe-ratio · OpenAPI operationId `calculate_sharpe_ratio` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "sharpe-ratio", "inputs": {…}}`

## Example

- 12 % return, 3 % risk-free, 15 % volatility (annual): inputs `{"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: inputs `{"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
```

## Limitations

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. 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. All values are computed from the formula above; no measurement or live data is involved.

## 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

- [Maximum Drawdown Calculator](https://tttkmbb.com/investing/max-drawdown.md) — A drawdown-based view of the same portfolio's risk.
- [Descriptive Statistics Calculator](https://tttkmbb.com/statistics/descriptive-statistics.md) — Compute the mean and standard deviation of a return series first.
- [CAPM Calculator](https://tttkmbb.com/investing/capm.md) — Expected return implied by beta rather than realised performance.
