Formula

Q = mcΔT

Where,
Q is taken to be the heat energy put into a certain amount of a substance with mass m,
c is the specific heat of the substance, and
ΔT is the temperature change.