TGA is used to measure the change in mass of a sample as the sample is heated at a controlled rate in a controlled atmosphere. Mass changes can also be measured as a function of time when the sample is held at a constant temperature. Mass can decrease if components of the sample are vaporized or can increase if the sample reacts with the surrounding gas. TGA traces can be compared to traces obtained from reference materials to help identify unknown compounds. Sample sizes are on the order of a few to tens of milligrams.