Density is a physical property of matter. Density is a comparison of the amount of matter to the amount of space. In other words, it is a measure of how closely "packed," or "crowded," the materials are in a defined area. Look at the two pictures below. Each box is the same size. The balls in the box are the same size and have the same mass. Which box is more crowded?
Box B is more crowded; therefore, we can say it has more mass per unit of volume. Density is defined as mass per unit of volume, so box B has a greater density. Each element and compound has a unique density associated with it. The density of a material can be used to distinguish it from other materials.
We calculate density using the formula