Temperature is the macroscopic quantity that equilizes when two bodies are left in contact for a long time. It is defined in terms of entropy and energy: