how is the density of a substance calculated
Take an amount of the substance and find its mass. The density is the mass divided by the volume. Typical units would be kg / m3 or g/L. English units are usually in weight per unit volume such as pounds/cubic foot or ounces / gallon.