Chemists and physicists use a technique known as calorimetry to measure the amount of heat given off or absorbed during a chemical reaction. The calorimeter generally consists of a container filled with liquid, usually water, a thermometer for monitoring temperature and a device for stirring the water. The calorimeter itself may be as simple as a Styrofoam cup. Calculations from calorimetry hinge on the first law of thermodynamics, which states that energy cannot be created or destroyed. Applied to calorimetry, this means that any heat produced during a chemical reaction must be transferred to the calorimeter or, more specifically, to the water inside the calorimeter. Therefore, if the chemist or physicist can measure the heat absorbed by the water, then they know the amount of heat given off by the reaction.
TL;DR (Too Long; Didn't Read)
You can calculate heat gain with a calorimeter by measuring the change in temperature of a known mass of liquid as long as the heat capacity of liquid is known as well.
Measure the Change in Temperature
Calculate the change in temperature, delta(T), of the water in the calorimeter according to the equation delta(T) = final temperature - initial temperature. Assuming the reaction was exothermic, i.e., it released heat, delta(T) should exhibit a positive value. If the reaction was endothermic, i.e., it absorbed heat, then delta(T) should be negative. Thus, if the initial temperature was 24.0 degrees Celsius and the final temperature was 33.4 degrees Celsius, then delta(T) = 33.4 - 24.0 = 9.6 degrees Celsius, and the reaction was exothermic.
Find the Water Mass
Calculate the mass of water in the calorimeter. If you were following a set of instructions, such as from a laboratory procedure in a textbook, the instructions should have included a step in which either a fixed volume of water was measured in, for example, a graduated cylinder, or the calorimeter cup was weighed on a balance before and after the water was added. If you measured a fixed volume of water, then the mass in grams will be equal to the volume in milliliters. If you weighed the calorimeter before and after the addition of water, then the mass of water will be equal to the mass of the calorimeter and water together minus the mass of the empty cup. For example, if the empty calorimeter cup weighed 4.65 g and the calorimeter plus water weighed 111.88 g, then the mass of water was 111.88 - 4.65 = 107.23 g.
Find the Heat Gained
Calculate the heat gained by the calorimeter, Q, according to the equation Q = m * c * delta(T), where m represents the mass of water calculated in step 2, c represents the heat capacity of water, or 4.184 joules per gram per degree Celsius, J/gC, and delta(T) represents the change in temperature calculated in step 1. Continuing the example from steps 1 and 2, Q = 107.23 g * 4.184 J/gC * 9.6 C = 4.3 * 10^3 J, or 4.3 kJ. This represents the heat absorbed by the calorimeter.