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.

Thermal behavior of an aluminum-based alloy, heating rate: 5 K/min, He atmosphere, constant contact force: 250 mN, alumina sample holder, alumina container. Displayed are the volumetric expansion (black solid line), the curve of the calculated density change (red solid line) as well as the c-DTA® curve (blue dashed line).