Thermal energy is the part of the total potential energy and kinetic energy of an object or sample of matter that results in the system temperature. This quantity may be difficult to determine or even meaningless unless the system has attained its temperature only through warming, and not been subjected to work input or output, or any other energy-changing processes.