Treynor ratio calculator
A portfolio that returned 12% when cash paid 4% earned 8 points of excess return; with a beta of 1.2, the Treynor ratio turns that into reward per unit of market risk. Enter both returns in the same unit, plus beta. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Portfolio return
- 12
- Risk free rate
- 4
- Beta
- 1.2
- Excess return
- 8
- Treynor ratio
- 6.6666666667
The Treynor ratio — searched as a Treynor ratio calculator, Treynor measure, or reward-to-volatility ratio against beta — scores how much excess return a portfolio earned per unit of systematic market risk. Given a portfolio return, a risk-free rate, and a beta expressed so the two returns share the same unit, the identity is excess return (portfolio minus risk-free) divided by beta. Portfolio managers, consultants, and CFA-style students use this figure whenever they need one comparable number for well-diversified books after market risk is scaled out. This Treynor ratio calculator accepts those three numbers, rejects a zero beta instead of dividing by zero, and returns the ratio together with the echoed inputs and the excess-return remainder.
What the Treynor ratio means and how the Treynor formula works
A Treynor ratio answers one comparison question: how much excess return did this portfolio, sleeve, or strategy earn per unit of systematic market risk, as measured by beta? Searchers who type Treynor ratio calculator want that quotient, not a Sharpe ratio that scales total volatility against a cash rate, not an information ratio that scales residual tracking error versus a named benchmark, and not a raw beta print taken in isolation.
Portfolio return is the numerator's first term: the holding-period or annualized return of the book, written in the same unit as the risk-free rate (twelve for twelve percent, or 0.12 as a decimal, but not a mix of the two conventions). The risk-free rate is the second term: the matching cash or Treasury-style yield over the same window, the opportunity cost Jack Treynor subtracted so the remainder is compensation for bearing risk rather than holding the risk-free claim.
Beta is the denominator: the portfolio's sensitivity to the market, a dimensionless loading that must be non-zero because a zero-beta book makes the Treynor ratio undefined. The identity is Treynor ratio equals (portfolio return minus risk-free rate) divided by beta. A result of eight means eight units of excess return per unit of beta when both returns were entered as percents; a negative result means the book lagged cash after market risk is scaled in.
The calculator does not fetch live prices, does not estimate beta from a return series, and does not annualize a stub month: you supply the three scalars the identity needs. Prefer the same compounding convention and the same window for the two returns; mixing a calendar-year portfolio return with a quarterly T-bill yield is not a Treynor ratio, it is a mixed snapshot that will mislead any manager ranking you hang on the result.
Where a Treynor ratio calculator earns its keep
Asset-management scorecards use a Treynor ratio calculator when two well-diversified sleeves should be ranked by systematic-risk efficiency rather than by raw excess return or by total-volatility Sharpe. Consultants and RFP teams recompute the ratio from the published portfolio return, cash-rate line, and beta so the ranking pack matches the fact sheet, including the case of a market-neutral book whose beta has collapsed to zero and must fail rather than print Infinity.
Educators and CFA-style homework need an oracle that divides excess return by beta and rejects a zero denominator the way a marking scheme does, instead of letting a spreadsheet leak Infinity into a gradebook. Failed validation is not billed. Keep beta non-zero, pin the rounded ratio in tests, and you get reproducible Treynor-ratio figures for spreadsheets, workflow tools, and edge workers without standing up a performance-attribution library of your own.
Use this capability when you already have the three scalars; if you have only a return series and want beta estimated from it, or if you want a Sharpe ratio against total volatility, that is a different identity and does not belong in this Treynor-ratio definition.
What you can do with it
Well-diversified fund scorecards
Convert each sleeve's portfolio return, risk-free rate, and beta into a Treynor ratio so two diversified books rank by systematic-risk efficiency, not by raw excess return.
Consultant and RFP ranking packs
Reproduce the disclosed Treynor ratio from the fact-sheet return line, the cash-rate assumption, and the published beta, including rejection when beta is still zero.
Classroom and CFA homework
Mark Treynor-ratio items with a deterministic oracle that divides excess return by beta and fails loudly on a zero-beta base.
FAQ
Should I enter returns as percents or as decimals?
Either convention works if both returns use it. Twelve, four, and beta 1.2 (percents) yield the same 6.666… as 0.12, 0.04, and beta 1.2 (decimals) after you remember beta itself is dimensionless. Mixing the two return conventions does not.
Is this the same as the Sharpe ratio?
No. The Treynor ratio scales excess return versus a risk-free rate by beta (systematic market risk). The Sharpe ratio scales the same excess return by total volatility. They answer different questions, and Treynor is the better ranking tool only when the books are well diversified.
What happens if beta is zero?
The calculation is refused instead of printing an infinite ratio. A zero beta leaves no market risk to divide by, so the Treynor ratio is undefined. A negative beta, as in inverse or hedging books, is accepted.
What does a negative Treynor ratio mean?
It means the portfolio earned less than the riskless rate over the same window once market risk is scaled in. In plain terms, the book lagged cash.
Can I compare a yearly portfolio return with a quarterly cash yield?
No. Both returns must cover the same window and follow the same compounding convention. Mixing a calendar-year return with a quarterly bill yield gives a mixed snapshot that will mislead any manager ranking.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fin/treynor-ratio \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"portfolio_return":12,"risk_free_rate":4,"beta":1.2}'const res = await fetch("https://api.kit.forhosting.com/fin/treynor-ratio", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"portfolio_return": 12,
"risk_free_rate": 4,
"beta": 1.2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/treynor-ratio",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"portfolio_return": 12,
"risk_free_rate": 4,
"beta": 1.2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/treynor-ratio", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"portfolio_return":12,"risk_free_rate":4,"beta":1.2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"portfolio_return":12,"risk_free_rate":4,"beta":1.2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/treynor-ratio", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"portfolio_return": 12,
"risk_free_rate": 4,
"beta": 1.2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.treynor_ratio",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Input contract, response shape, rounding, and error behaviour
Negative beta is allowed for inverse or hedging books; only a true zero loading is rejected. A market-neutral book whose beta has collapsed to zero must fail rather than print Infinity. POST a JSON body with three required finite numbers: portfolio_return, risk_free_rate, and beta, with the two returns in the same unit and covering the same evaluation window. portfolio_return (aliases rp, r_p, portfolio, and port_return) must be finite; negative values are allowed when the book lost money. risk_free_rate (aliases rf, risk_free, and r_f) must be finite; negative values are allowed when the quoted cash rate itself is negative. beta (aliases beta_p and portfolio_beta) must be a finite number other than zero because the Treynor ratio divides excess return by beta. Missing fields, empty strings, non-finite values, booleans, and a zero beta fail with invalid_input naming the issue, and those failures are not billed. On success the body echoes the three inputs, returns excess_return as portfolio_return minus risk_free_rate rounded to twelve places, treynor_ratio as that remainder divided by beta also rounded to twelve places, and a formula string restating the identity. Example: a portfolio return of twelve, a risk-free rate of four, and a beta of one point two yields excess_return 8 and treynor_ratio 6.666666666667. Example: a portfolio return of ten, a risk-free rate of three, and a beta of one point five yields a repeating decimal rather than a silent empty payload. Pair the ratio with your own annualization notes if the memo needs a horizon flag; this endpoint computes the Treynor ratio only and does not invent a skill verdict, a t-statistic, or a beta estimate from a return series you did not supply.
Technical questions
How is the Treynor ratio calculated?
Send finite numbers portfolio_return, risk_free_rate, and beta (non-zero) with the two returns in the same unit. The API returns treynor_ratio = (portfolio_return − risk_free_rate) / beta, plus the excess_return remainder.
What happens if beta is zero?
The task fails with invalid_input. A Treynor ratio cannot divide by a zero beta, so the request is rejected and is not billed.
What does the Treynor ratio calculator cost?
The browser tool is free. API requests use prepaid balance at $0.002 per successful call; invalid input is not billed.