Density is defined as the comparative ratio of a substance's mass per unit volume.
The formula of density of a substance is as follows:
Density=\frac{Mass}{Volume}
Let the unit of mass be grams and that of volume be mL thus, unit of density will be g/mL. For density value x g/mL, there are x grams of substance in 1 mL volume. Thus, density is the comparative ratio of mass per unit volume of a substance.