The formation of H2 and HD molecules on interstellar dust grains is studied using rate equation and master equation models. Rate equations are used in the analysis of laboratory experiments, which examine the formation of molecular hydrogen on astrophysically relevant surfaces. However, under interstellar conditions, rate equations are not suitable for the calculation of reaction rates on dust-grain surfaces. Due to the low flux and the sub-micron size of the grains, the populations of H and D atoms on a single grain are likely to be small. In this case the reaction rates are dominated by fluctuations and should be calculated using stochastic methods. The rate of molecular hydrogen formation in interstellar clouds is evaluated using the master equation, taking into account the distribution of grain sizes.