Heat of formation is defined as the heat exchange when one mole of a substance is formed from its constituent elements at STP. In case of allotropes most stable allotrope is taken into account. Among graphite and diamond, graphite is stabler. Hence, heat of formation of $CH _{3} OH$ is represented by equation.
$C$ (graphite) $+\frac{1}{2} O _{2}(g)+2 H _{2}(g)\longrightarrow CH _{3} OH (l)$