You calculate the beta of an investment by taking the covariance between the return of a specific investment and broader market return and then dividing that by the variance of broader market returns.