If a wooden log and a stone having the same mass are tossed into a river, the stone sinks, whereas the log floats. This is because of a physical property of the material known as density. Density is defined as the mass of an object per unit volume and can help to determine if an object will float or sink in a fluid. In the above example, the density of the stone is greater than that of water and so it sinks. Whereas, the density of wood is lower and so it floats. Objects of the same material having different masses have the same densities. If an object has varying density over its volume or for a heterogeneous mixture of two or more different materials, we define an average density. The average density for these objects is equal to the total mass divided by its total volume.