What is the formula for mass and volume when dealing with density??

Mass ÷ Volume = Density

Example: A rock has a mass of 1000g and a volume of 50cm³. Find the density.
Answer: 1000g ÷ 50cm³= 20 g/cm³.

The end unit, [in this case, g/cm³] is the unit of mass [in this case, grams], / unit of volume [in this case cm³]. This would make the unit g/cm³.