Sharpe ratio is calculated by subtracting the investment’s (fund, portfolio) return from its benchmark or risk-free return, and then dividing it by the standard deviation of the investment’s return.

Where…
Rp is portfolio return
Rf is risk-free or benchmark return
Standard deviation is the volatility of an investment, or how much the return varies from its average return.
Pros & Cons of using Sharpe ratio
Advantages of Sharpe ratio
For all assets
This ratio can be used to analyse the risk-adjusted returns of various investment options like mutual funds, stocks, etc.
Analyse fund performance
By checking the historical and expected performance, investors can take decisions on whether or not to opt for a particular fund.
Compare funds
The ratio of various mutual funds can help choose the one that suits one’s risk profile and returns needed for the financial goals.
Portfolio diversification
It can help decide the diversification required in a portfolio by determining the level of risk needed.
Limitations of Sharpe ratio
Manipulation
Since the time period and free-risk inputs in the formula can alter the outcome significantly, the ratio is open to manipulation for desired results.
Dispersion of returns
It treats all market volatility in the same way. Standard deviation only considers normal dispersion of returns, but in case of stocks or funds, market returns can swing sharply.