$$ \begin{equation} SR = \frac{R_p - R_f}{\sigma_p} \end{equation} $$
$R_p$ = Return on investment
$R_f$ = Risk-free rate
σ = Standard Deviation of return
The risk free rate can be found from the FRED database maintained by the Federal Reserve Bank of St. Louis.
We will reference the market yield on 10-year treasury. Find it by searching for Market Yield on U.S. Treasury Securities at 10-Year Constant Maturity, Quoted on an Investment Basis or DGS10
The rate is bolded after its corresponding date. Don’t be alarmed if the quoted yield is different from the example below.
Here, the quoted yield is 4.4%

https://fred.stlouisfed.org/series/DGS10
FRED yields are quoted on an annualized basis. Since our Sharpe Ratio calculation will be based on monthly returns, the risk-free rate must reflect yields on a monthly basis.
To convert from an annual basis to a monthly basis use the following equation