Thermal efficiency is a measure of the performance of a heat engine or a heat pump, expressing the ratio of useful work output to the total energy input. It quantifies how effectively a system can convert thermal energy into mechanical work or other forms of energy.