The mass density is defined as the ratio between mass and volume.
The volume is generally a function of the temperature and pressure. Mass changes are relatively small compared to the volume effects and can be observed in TGA or STA runs. Density is a material property; in the context of thermal analysis, it is examined as a function of temperature.
Using special software, density changes can be calculated for solid and liquid samples and for the transition from the solid to the liquid state (e.g., melting of a metal sample; see example below); these calculations are based on the thermal expansion, which is measured via dilatometry.