The actual formula for volume for a cube is the length multiplied by the width and then multiplied by the height. Since all three measurements are the same, the formula results in the measurement of one side cubed. For the example, 5^3 is 125 cm^3. Multiply the volume by the known density, which is the mass per volume.