The density is the ratio of the substance's mass to its volume. Density is an extensive property even though mass and volume are both intensive properties. It is because density is constant for each substance at a specified temperature and pressure. The equation is
Density = mass/volume
Substituting the values,
1.40 g/cm³ = [500 mg * (1 g/1000 mg)](Volume)
Volume = 0.357 cm³