agenttrading

RISK-ADJUSTED RETURN, MEASURED ON REAL HISTORY

Sharpe ratio calculator for stocks, portfolios, and trading strategies

State a rule or name a ticker and the bench computes the Sharpe ratio from 20+ years of split- and dividend-adjusted daily returns, printed next to the Sharpe ratio of simply buying and holding the same thing over the identical window. That second number is the one most calculators leave out, and it is the one that tells you whether the risk you took was worth taking.

See pricing
20+ yrs adjusted data Every assumption shown No code
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
01 THESIS · AS A TESTABLE RULE

02 EVIDENCE · FUNDAMENTALS

03 BACKTEST · GROWTH OF $10,000
Strategy Buy & hold

04 RISK · IN PLAIN ENGLISH

05 VERDICT · HISTORICAL, NOT PREDICTIVE

Past performance does not guarantee future results. Educational analysis only, not financial advice.

In short

The Sharpe ratio measures how much return an investment produced per unit of volatility, and the formula is (Rp minus Rf) divided by the standard deviation of Rp, where Rp is the portfolio or strategy return, Rf is the risk-free rate, and the denominator is the volatility of those same returns. William F. Sharpe introduced it in 1966 as the reward-to-variability ratio and revised the definition in the Journal of Portfolio Management in 1994 to use excess return over a benchmark. A Sharpe ratio calculator turns a return series into that single number so two very different investments can be compared on the same footing. Most online calculators ask you to paste an average return, a risk-free rate, and a standard deviation you worked out somewhere else. This one works the other way around: you describe a rule in a sentence, such as "buy SPY when the 14-day RSI closes below 30 and sell when it closes above 55", and the bench derives the return series itself from 20+ years of split- and dividend-adjusted daily history, charges 0.1% per trade, and reports the annualized Sharpe ratio alongside CAGR, maximum drawdown, trade count, and the buy-and-hold Sharpe over the same dates. To annualize from daily returns, multiply the daily Sharpe ratio by the square root of 252; from monthly returns, multiply by the square root of 12. The risk-free rate normally used in the United States is the 3-month Treasury bill, which yielded 3.80% on August 7, 2026. Two honest limits are worth stating up front. This is not a paste-your-own-returns box: if you already hold a column of monthly returns, an Excel formula computes the answer faster, and the method is written out on how to calculate the Sharpe ratio in Excel. And a Sharpe ratio produced by searching for the best-looking configuration is close to meaningless. Bailey, Borwein, Lopez de Prado and Zhu showed in the Notices of the American Mathematical Society (May 2014) that with only five years of daily data, testing more than 45 independent strategy configurations is nearly certain to produce an in-sample Sharpe ratio of 1.0 whose expected out-of-sample Sharpe is zero. This bench tests the rule you state rather than sweeping thousands of variants, which is a smaller feature list and a far more trustworthy number. Included from $19 per month. No trades are executed, nothing is recommended, and the output is educational analysis only: past performance does not guarantee future results.

Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.

WHAT YOU GET - SHARPE RATIO CALCULATOR

Sharpe ratio calculator, run on the bench

The buy-and-hold Sharpe ratio, always shown next to yours

A Sharpe ratio of 0.9 sounds strong until you learn that holding the same share over the same years scored 1.1. Every run draws both numbers over identical dates, because a risk-adjusted return only means something against the lazy alternative you could have had for free.

Annualized properly, from adjusted daily data

Daily returns are scaled by the square root of 252 and monthly by the square root of 12, on prices adjusted for splits and dividends. Raw closes invent volatility at every split and drop every dividend, which quietly distorts both the numerator and the denominator.

Trading costs charged before the ratio is computed

A rule that trades often can post a healthy Sharpe ratio on paper and lose the whole edge to friction. Costs of 0.1% per trade come out first by default, so the ratio you read is after the expense, not before it.

The number comes with its own sample size

A Sharpe ratio built on nine round trips is a sample of nine. Trade count, the length of the test window, and the worst drawdown are printed on the same screen, so you can see whether the ratio deserves any weight at all.

HOW IT WORKS - 4 STEPS

From a sentence to a stamped verdict

01

Name the ticker or state the rule

One sentence is enough: the instrument, the entry condition, the exit condition, and where the money sits when you are out. A plain ticker works too if you want the buy-and-hold Sharpe ratio on its own.

02

Confirm the restated rule

The bench prints the explicit rule it extracted before it runs anything, so you can correct a misreading rather than discover it in the result.

03

Run it across 20+ years

The rule is applied to split- and dividend-adjusted daily history with 0.1% charged per trade, and the equity curve is plotted against buying and holding the same instrument with the worst drawdown window shaded.

04

Read the Sharpe ratio in context

The verdict panel shows the annualized Sharpe ratio, CAGR, maximum drawdown, and trade count, each against the buy-and-hold figure for the same dates. Historical and educational, never a recommendation.

Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.

On the same bench

The Sharpe ratio is one tile on the risk panel described in full on investment risk analysis, and it is computed by the same engine documented on backtesting software and stamped by the trading strategy tester. The 20+ year adjusted daily record behind every figure is described on historical stock data. Run the number on one name from stock backtesting, across a basket from portfolio backtesting, or on a fund lineup from ETF backtesting. For what the result actually means, read what is a good Sharpe ratio, the downside-only variant on what is a good Sortino ratio, the drawdown-based cousin on what is a good Calmar ratio, and the volatility term in the denominator on standard deviation of returns. If you would rather build the calculation yourself, how to calculate the Sharpe ratio in Excel gives the exact formulas. Comparing platforms first is covered on best backtesting software; plans start at $19 per month.

QUESTIONS - ASKED AND ANSWERED

Sharpe ratio calculator: the common questions

How do you calculate the Sharpe ratio?

Subtract the risk-free rate from the return of the investment, then divide by the standard deviation of that investment's returns: Sharpe = (Rp minus Rf) / standard deviation of Rp. Use the same period for all three inputs. If your returns are daily, compute the ratio on daily figures and multiply by the square root of 252 to annualize it; if they are monthly, multiply by the square root of 12.

What is the formula for the Sharpe ratio?

Sharpe ratio = (Rp minus Rf) divided by the standard deviation of Rp. Rp is the return of the portfolio or strategy, Rf is the risk-free rate over the same period, and the denominator is the volatility of the portfolio returns. William F. Sharpe published it in 1966 as the reward-to-variability ratio and revised it in the Journal of Portfolio Management in 1994 to measure excess return over a chosen benchmark rather than a cash rate alone.

What is a good Sharpe ratio?

Above 1.0 is generally considered good, above 2.0 very good, and above 3.0 excellent, while anything below 1.0 is usually treated as weak. Context matters more than the label: the S&P 500 itself has run roughly 0.4 to 0.5 over long multi-decade windows and under 0.40 across many recent ten and thirty year stretches, so a strategy claiming 3.0 on twenty years of data deserves more suspicion than applause.

How do you calculate the Sharpe ratio from daily returns?

Compute the average daily return, subtract the daily risk-free rate (the annual T-bill rate divided by 252), and divide by the standard deviation of the daily returns. That gives a daily Sharpe ratio, which almost nobody quotes. Multiply it by the square root of 252 to state it in annual terms, which is the convention every comparison assumes unless it says otherwise.

How do you calculate the Sharpe ratio for a portfolio?

Build one return series for the whole portfolio first, weighting each holding by its actual allocation and rebalancing on the same schedule you really use, then apply the standard formula to that combined series. Averaging the Sharpe ratios of the individual holdings gives the wrong answer, because it throws away the diversification effect that is the main reason to hold a portfolio at all.

What risk-free rate should you use in a Sharpe ratio calculator?

In the United States the usual choice is the 3-month Treasury bill, which yielded 3.80% on August 7, 2026. Match the rate to your holding period and to the currency of the returns, and use the rate that applied during the test window rather than today's rate when you are measuring a long historical period. A backtest spanning the near-zero years of 2009 to 2021 will flatter itself badly if you charge it a 2026 cash rate throughout.

What is the difference between the Sharpe ratio and the Sortino ratio?

The Sharpe ratio divides excess return by total volatility, which penalizes upside and downside moves equally. The Sortino ratio divides by downside deviation only, so a strategy with sharp gains and shallow losses scores better on Sortino than on Sharpe. Neither is a substitute for the other: Sharpe is the common currency everyone quotes, and Sortino is the sharper read on strategies with skewed returns.

Can you calculate a Sharpe ratio in Excel?

Yes, and for a return series you already hold it is the quickest route. With periodic returns in one column, the calculation is (AVERAGE(range) minus periodic risk-free rate) divided by STDEV.S(range), multiplied by the square root of the number of periods per year. The full worked method, including the monthly and daily variants and the Sortino version, is set out on how to calculate the Sharpe ratio in Excel.

Is a higher Sharpe ratio always better?

Not automatically. A high Sharpe ratio computed over a short window, on a small number of trades, or after searching for the best-performing settings usually measures luck and selection rather than skill. Bailey, Borwein, Lopez de Prado and Zhu showed that with five years of daily data, trying more than 45 independent configurations is close to guaranteed to produce an in-sample Sharpe ratio of 1.0 with an expected out-of-sample Sharpe of zero. Always read the ratio next to the trade count, the test length, and the buy-and-hold comparison.

Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.

Your next idea deserves a verdict, not a hunch.

Bring a thesis or a ticker. Agenttrading restates the rule, shows the evidence, runs 20+ years of history, and stamps an honest verdict. You decide.

Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.