Defining enthalpy of formation

The enthalpy change accompanying a reaction is related to the energy change for the same reaction.  Enthalpy is a convenient quantity for chemists because it can be calculated from the heat transferred during a process that occurs at constant pressure. The total enthalpy of a system (like the total energy) cannot be measured directly. It is however possible to experimentally determine changes in enthalpy.

Chemists find it convenient to tabulate and compare enthalpy changes for various defined processes such as vaporisation.  The equation for which the enthalpy change is equal to the enthalpy of vaporisation is shown for water below.
 
H2O(l)  H2O(g)
ΔH° = ΔvapH°(H2O)

Another example of a widely used defined enthalpy change is the standard enthalpy of formation (ΔfH°).

The standard enthalpy of formation of a compound is the enthalpy change for the reaction in which one mole of the compound in its standard state is formed from its elements in their standard state. 

At 25°C the enthalpy changes for the reactions shown equal enthalpies of formation.
 
H2(g) + ½O2(g) H2O(l)
ΔH° = ΔfH°(H2O,l)

C(s) + ½O2(g) CO(g)
ΔH° = ΔfH°(CO,g)
 
Note that the number of reactants in these equations is the same as the number of elements in the product.
 
Fractional coefficients are used on the reactants because this equation must have ONE mole of product.

The standard enthalpy of formation of elements in their standard state is zero because ΔH° for the reaction in which these are formed from elements in their standard state is zero.
 
O2(g) O2(g)
ΔH° = ΔfH°(O2) = 0