When thermal energy is added to a solid, liquid or gas, most substances increase in volume because the increased kinetic energy of the particles causes an increased distance between the particles. This results in a change in density of the material. Generally, solids have greater density than liquids, which have greater density than gases due to the spacing between the particles. The density of a substance can be calculated from the slope of a mass vs. volume graph. Differences in densities can be determined by interpreting mass vs. volume graphs of the substances.