Calculation guide
The risk-free input is one constant rate per observation period. Use sample standard deviation and arithmetic mean. Square-root annualization assumes stable variance and no serial correlation.
x_i=r_i−rf; s=sampleSD(x); Sharpe=mean(x)/s × sqrt(periods_per_year). If s=0 the ratio is undefined.
Inputs
Periods per year
Example entry 1. Allowed range 1 to 366. Use whole numbers.
Risk-free return per period
Example entry 1 %. Allowed range -99.99999999999999 to 10000000.0.
Portfolio return
Example entry 2 %. Allowed range -100 to 10000000.0.
Worked example
| Input | Value |
|---|---|
| Periods per year | 1 |
| Risk-free return per period | 1% |
Periods in chronological order
| Portfolio return |
|---|
| 2% |
| 4% |
| 6% |
| Result | Value |
|---|---|
| Annualized ratio | 1.5 |
Interpreting the result
If every period has the same excess return, its sample standard deviation is zero. The Sharpe ratio is undefined even when that return is positive. Enter distinct observations to obtain a ratio.
How each input affects this example
Each row starts from the worked example and changes one input.
| Input | Original input | New input | Affected result | Original result | New result |
|---|---|---|---|---|---|
| Periods per year | 1 | 2 | Annualized ratio | 1.5 | 2.12132 |
| Risk-free return per period | 1% | 2% | Annualized ratio | 1.5 | 1 |
| Portfolio return (row 1) | 2% | 3% | Annualized ratio | 1.5 | 2.182179 |
