In a stricter sense synonymous with “mass density”: The average density of matter in a region of space is the total mass of all matter contained in that region, divided by the region’s volume.

More generally, density can refer to other physical quantities as well. The energy density, for instance, is the total sum of energy localized in a region divided by that region’s volume.