As shown originally by Count Rumford, there is an equivalence between heat (measured in calories) and mechanical work (measured in joules) with a definite conversion factor between the two. The conversion factor, known as the mechanical equivalent of heat, is 1 calorie = 4.184 joules. (There are several slightly different definitions in use for the calorie. The calorie used by nutritionists is actually a kilocalorie.) In order to have a consistent set of units, both heat and work will be expressed in the same units of joules.
The amount of heat that a substance absorbs is connected to its temperature change via its molar specific heat c, defined to be the amount of heat required to change the temperature of 1 mole of the substance by 1 K. In other words, c is the constant of proportionality relating the heat absorbed (d′Q) to the temperature change (dT) according to d′Q = nc dT, where n is the number of moles. For example, it takes approximately 1 calorie of heat to increase the temperature of 1 gram of water by 1 K. Since there are 18 grams of water in 1 mole, the molar heat capacity of water is 18 calories per K, or about 75 joules per K. The total heat capacity C for n moles is defined by C = nc.
However, since d′Q is not an exact differential, the heat absorbed is path-dependent and the path must be specified, especially for gases where the thermal expansion is significant. Two common ways of specifying the path are either the constant-pressure path or the constant-volume path. The two different kinds of specific heat are called cP and cV respectively, where the subscript denotes the quantity that is being held constant. It should not be surprising that cP is always greater than cV, because the substance must do work against the surrounding atmosphere as it expands upon heating at constant pressure but not at constant volume. In fact, this difference was used by the 19th-century German physicist Julius Robert von Mayer to estimate the mechanical equivalent of heat.