To calculate density, the volume of the material must be known. If the object is a regular shape, the volume can be found by using a ruler and one of the equations below.

cubelength (l), width (w), height (h) lWh
spherediameter (d) \frac{4}{3}\pi(\frac{d}{2})^3
cyclinderdiameter of base (d), length of cylinder (l) \pi(\frac{d}{2})^2l
conediameter of base (d), length of cylinder (l) \pi(\frac{d}{2})^2 \frac{1}{3}

If the object has an irregular shape, the volume can be measured using a displacement can.

The displacement can is filled with water above a narrow spout and allowed to drain until the water is level with the spout.

As the irregular object is lowered into the displacement can, the water level rises. Since the level was already up to the bottom of the spout, all the displaced water comes out of the spout and is collected in a measuring cylinder.

The displaced water in the cylinder occupies the same amount of space that the object now does in the can, which means that their volumes are the same.