Skip to content
TraderCalcs.io

Sharpe Ratio Calculator

Measure return per unit of total volatility, with the risk-free rate and periods per year you set yourself.

The Sharpe ratio asks what each unit of variability bought, and this Sharpe ratio calculator answers that question from a return series you type in yourself. It takes the mean of the periodic returns you enter, subtracts the rate you could have earned without taking the risk, and divides what is left by the sample standard deviation of those same returns. The answer is a pure number with no units attached: excess return per unit of volatility, over one period.

Formula: sharpe = (mean return - risk-free rate) / standard deviation of returns

Your figures

Return series

One row per period, oldest first, as a percentage of the balance at the start of that period. Enter losses as negative figures. Any period length works, as long as every row is the same length and the count below matches it.

Period 1
Period 2
Period 3
Period 4
Period 5
Period 6

Annual, from whatever you treat as risk-free — a deposit rate, a short bill yield, or zero if you would rather measure the raw return. It is de-compounded to one period before it is subtracted.

The cadence of the returns above. It is used only to annualise the ratio.

Only used when the frequency is set to Custom.

Results

Annualised Sharpe ratio

1.08

0.310 per period, multiplied by the square root of 12

Sharpe ratio per periodExcess return divided by the standard deviation, both measured over a single period. The figure above is this one annualised.
0.310
Mean return per periodThe arithmetic mean of the returns entered, not a compound growth rate.
+1.133%
Standard deviation per periodThe sample figure, dividing by n − 1 rather than n, because the mean subtracted from each return was itself estimated from the same series.
2.597%
Risk-free rate per periodThe annual rate de-compounded geometrically, as (1 + rate) raised to the power of 1 ÷ periods, less 1 — not the annual rate divided by the number of periods.
0.3274%
Excess return per periodMean return less the periodic risk-free rate. This is the numerator of the ratio.
+0.806%
Periods countedBlank rows are not counted. Everything above is estimated from this many observations, and a short record moves a long way on one more of them.
6
Periods in a yearUsed for nothing but the annualisation, which multiplies the periodic ratio by the square root of this figure.
12

What this means

Across 6 periods the mean return was +1.133% and the sample standard deviation of those returns was 2.597%. The 4.000% annual risk-free rate de-compounds to 0.3274% over one period, leaving +0.806% of excess return; dividing that by 2.597% gives 0.310 per period, and multiplying by the square root of 12 annualises it to 1.08. The denominator counts every deviation from the mean, upward ones included, so a period that surprised on the upside widened it exactly as much as one that surprised on the downside. That is the assumption the ratio is built on rather than a fault in it, and it is what the Sortino ratio changes.

  • The standard deviation is the sample figure, with n − 1 in the denominator. Over a short record the choice is visible rather than academic: across twelve returns the n − 1 figure is about 4.4% larger than the n one, which is enough to move a ratio of 1.00 to 0.96.
  • Annualising multiplies the periodic ratio by the square root of the periods in a year, because the mean grows with time while the standard deviation grows with the square root of it. That assumes each period is independent of the one before. A trending or mean-reverting record breaks the assumption, and the annualised figure flatters or punishes it accordingly.
  • The risk-free rate is de-compounded geometrically rather than divided by the number of periods. The simple division overstates the periodic rate, and that overstatement is subtracted from every observation in the series rather than once.
  • Both the mean and the standard deviation are estimates from the periods entered. A different sample of the same strategy would give a different ratio, and the shorter the record the wider that spread.
  • Nothing here is fetched. The returns, the rate and the period count are all as entered, so the calculation works the same on a backtest as on a live account. The risk-free rate a field opens with is a round illustration, not a current market rate — take yours from the instrument you would actually have held.
  • This describes a record that has already happened. It is a summary of the figures entered, not a statement about what follows them, and no particular level of it carries a meaning beyond the arithmetic that produced it.

Annualised Sharpe ratio: 1.08

The link reopens this calculator with the same numbers. Nothing you enter is sent to a server.

About the Sharpe Ratio calculation

This risk-adjusted return calculator works entirely on the record you supply and fetches nothing. You enter a return series — one row per period, oldest first, losses negative — an annual risk-free rate, and how many of your periods make up a year; a portfolio Sharpe ratio is this same calculation run on the portfolio's own combined returns rather than on any single instrument's. It reports the ratio per period and the annualised figure, alongside the four quantities they are assembled from: the mean return, the sample standard deviation, the annual rate de-compounded to one period, and the excess return that forms the numerator.

The denominator is total variability, and that is the ratio's defining choice rather than an oversight. Every deviation from the mean is squared, so a period that surprised on the upside widens the denominator exactly as much as one that surprised on the downside. A single unusually large gain lifts the mean but also stretches the standard deviation, and it can lower the ratio overall. Changing that is the entire purpose of the Sortino ratio.

Sharpe Ratio formula

mean       = Σ rᵢ ÷ n
s          = √( Σ (rᵢ − mean)² ÷ (n − 1) )
rf_period  = (1 + rf_annual)^(1 ÷ P) − 1
excess     = mean − rf_period

sharpe     = excess ÷ s
annualised = sharpe × √P
rᵢ
The return of period i, as a percentage of the balance at the start of that period.
n
How many periods were counted. A cleared row is dropped rather than read as a zero return.
s
The sample standard deviation of the returns, with n − 1 in the denominator.
rf_period
The annual risk-free rate expressed over one of your periods, de-compounded geometrically.
P
Periods in a year: 12 for monthly rows, 52 for weekly, 4 for quarterly, or your own trading-day count.

The n − 1 in the Sharpe ratio formula is not a stylistic preference. The mean subtracted from each return was estimated from the very same numbers, so one degree of freedom has already been spent fitting it, and dividing by n would understate the dispersion of the process that produced those returns. Understating the denominator overstates every ratio built on it. Across twelve observations the n − 1 figure is about 4.4% larger than the n one, which is the difference between a Sharpe ratio of 1.00 and one of 0.96 — visible rather than academic on the short records these pages are usually given.

The risk-free rate arrives as an annual figure and has to be brought down to the length of one period before it can be subtracted. Dividing it by the number of periods is the common shortcut, and it is wrong in a knowable direction: an annual rate is itself the product of compounding, so simple division overstates the periodic rate and therefore understates the excess return. Taking the root instead, as (1 + rate) raised to the power of 1 ÷ P, less 1, is the exact inverse of the compounding that produced the annual figure — and the correction is applied to every observation in the series rather than once.

Annualising multiplies by the square root of the period count rather than by the count itself, because the two halves of the ratio grow at different rates. Over P periods the mean excess return accumulates in proportion to P, while the standard deviation of that sum grows only in proportion to √P, so their ratio grows as P ÷ √P, which is √P. This holds only if each period is independent of the one before. A trending record has positively correlated periods, its true annual volatility is higher than √P implies, and the annualised figure flatters it; a mean-reverting record is penalised in the same way in reverse.

Nothing in the formula distinguishes a loss from a gain. Both enter as squared deviations from the mean, so the measure describes the width of the return distribution rather than the depth of its losses. That symmetry is a substantive assumption about what risk is, and it holds up best for records whose returns are roughly symmetric and free of fat tails. A strategy that collects small premiums and occasionally suffers one very large loss produces a narrow standard deviation right up until the loss arrives, and the Sharpe ratio reads high for exactly as long as that lasts.

Sharpe Ratio: a worked example

Six monthly returns of +2.4%, −1.1%, +3.2%, +0.8%, −2.6% and +4.1%, measured against a 4% annual risk-free rate, with twelve periods in a year.

  1. Mean return(2.4 − 1.1 + 3.2 + 0.8 − 2.6 + 4.1) ÷ 6 = +1.133%
  2. Squared deviations1.6044 + 4.9878 + 4.2711 + 0.1111 + 13.9378 + 8.8011 = 33.7133
  3. Sample standard deviation√(33.7133 ÷ 5) = 2.597%
  4. Risk-free rate per period1.04^(1 ÷ 12) − 1 = 0.3274%
  5. Excess return1.1333 − 0.3274 = +0.806%
  6. Sharpe ratio per period0.8060 ÷ 2.5967 = 0.310
  7. Annualised0.310 × √12 = 1.08

An annualised Sharpe ratio of 1.08. Across these six months the record earned 0.806 percentage points a month above the periodic risk-free rate while its returns varied by 2.597 percentage points about their own mean, which is 0.310 of excess return per unit of volatility per month. Six observations is a very short record: one more month would move this figure noticeably in either direction, and that sensitivity is a property of the sample rather than of the strategy.

How to use the Sharpe Ratio calculator

  1. Enter one return per row, oldest first, as a percentage of the balance at the start of that period. Losses go in as negative figures.
  2. Keep every row the same length of time. Mixing weekly and monthly returns in one series makes both the mean and the standard deviation describe nothing in particular.
  3. Set the periods in a year to match the length of those rows. The figure drives nothing but the annualisation, which multiplies the periodic ratio by its square root.
  4. Enter the risk-free rate as an annual percentage from whatever you treat as risk-free — a deposit rate or a short bill yield. Enter zero to measure the raw return against its own volatility instead.
  5. Read the per-period ratio alongside the annualised one. The second is the first multiplied by a constant, so anything wrong with the first is wrong by the same factor in the second.
  6. Check the periods counted in the results. Blank rows are dropped, so that count is what the mean and the standard deviation were actually estimated from.

Limitations of the Sharpe Ratio calculator

Every calculation makes assumptions. These are the ones that matter here.

  • Six or twelve observations is not enough to estimate a standard deviation with any precision. Over a record that short the ratio is dominated by which periods happened to fall inside it, and the figure is largely a statement about the sample rather than about the strategy.
  • The standard deviation summarises a distribution by its width alone. Skew and fat tails are invisible to it, so a record with many small gains and one rare deep loss scores well until the loss lands.
  • Annualising assumes the periods are serially independent. Trending or mean-reverting records break that assumption, and the √P factor then flatters or punishes them without anything about the strategy changing.
  • The returns are exactly as entered. If they are gross of costs, financing or tax, so is the ratio, and the traded version of the same record scores lower.
  • A backtested series is a selected series. Nothing in the arithmetic can tell an out-of-sample record from one whose parameters were fitted to the very periods being scored.
  • The risk-free rate is treated as one constant across the whole record. Over a stretch in which policy rates moved substantially, a single figure is an approximation rather than a fact.

Frequently asked questions about Sharpe Ratio

What counts as a good Sharpe ratio?

There is no threshold this calculator applies; the result is coloured by sign alone. A figure above 1 is often quoted as a rule of thumb, but the number means little without the record length beside it. A ratio of 2 over six months and a ratio of 0.8 over ten years are not comparable claims, and the second rests on far more evidence than the first.

Why does the calculator divide by n − 1 rather than n?

Because the mean it subtracts was estimated from the same data. One degree of freedom has been spent on that estimate, and n − 1 gives it back; dividing by n would report a dispersion smaller than the underlying process actually has. On a twelve-period record the two conventions differ by about 4.4%, which is enough to matter when ratios are being compared.

Should the risk-free rate be entered as an annual figure?

Yes. The field takes an annual percentage and the calculator de-compounds it to the length of one of your periods itself, showing the periodic figure it arrived at in the results. Entering an already-periodic rate would subtract roughly twelve times too little from monthly returns and inflate the ratio accordingly.

Why was a series where every return was identical refused?

Because a constant series has no volatility to divide by. The honest answer to what the Sharpe ratio of an unvarying return is, is that it does not have one — not that it is infinite. The calculator says so rather than reporting an enormous number manufactured out of floating-point residue in the standard deviation.

Can the Sharpe ratio be negative?

Yes, and it is reported rather than suppressed. A negative figure means the mean return over the periods entered fell short of the periodic risk-free rate. Its size is awkward to read, though: dividing a negative numerator by a volatility means a more erratic losing record scores closer to zero than a steady one, which inverts the ordering most readers expect.

Why is the annualised Sharpe ratio so much larger than the per-period figure?

Because annualising multiplies by the square root of the periods in a year — 3.46 for monthly data, about 15.9 for daily. No new information enters at that step. If the period count does not match the actual length of the rows, the whole of that error is carried into the annualised figure by the same multiplier.

How does this differ from the Sortino ratio?

Both divide an excess return by a dispersion; they disagree over what dispersion means. The Sharpe ratio uses the standard deviation of every return, so upside variability counts as risk. The Sortino ratio builds its denominator only from shortfalls below a target you set. Running one series through both is informative in itself, because the gap between the two answers describes how asymmetric the record was.

Last reviewed . See our methodology and editorial policy.

More performance calculators