What is the difference between mass and density?

How density relates to mass and volumeTwo objects with equal volume but different masses demonstrate the concept of density. The object with greater mass in the same volume has a higher density.

Mass and density are fundamental but distinct physical quantities used to describe matter. Mass is a quantitative measure of inertia—the resistance that a body of matter offers to a change in its speed or position upon the application of a force. It is an intrinsic property, meaning it remains constant regardless of location or environmental conditions, including gravity. Mass is measured in units such as kilograms (kg) and grams (g) in the International System of Units (SI).

Density describes how tightly matter is packed within a given volume—the amount of space an object occupies. It is defined as the ratio of mass to volume:   =   .In the SI system density is expressed in units such as grams per cubic centimeter (g/cm3) or kilograms per cubic meter (kg/m3). For example, the density of water is 1 g/cm3, whereas the density of air is approximately 1.2 kg/m3.