Formula For Calculating The Density