- It has often been suggested that an alternative to the standard CO/21-cm method for estimating the mass of the interstellar medium (ISM) in a galaxy might be to estimate the mass of the ISM from the continuum dust emission. In this paper, we investigate the potential of this technique using Herschel observations of ten galaxies in the Herschel Reference Survey and in the Herschel Virgo Cluster Survey. We show that the emission detected by Herschel is mostly from dust that has a temperature and emissivity index similar to that of dust in the local ISM in our galaxy, with the temperature generally increasing towards the centre of each galaxy. We calibrate the dust method using the CO and 21-cm observations to provide an independent estimate of the mass of hydrogen in each galaxy, solving the problem of the uncertain `X factor' for the molecular gas by minimizing the dispersion in the ratio of the masses estimated using the two methods. With the calibration for the dust method and the estimate of the X-factor produced in this way, the dispersion in the ratio of the two gas masses is 30%, which gives an upper limit on the fundamental accuracy of the dust method. The calibration we obtain for the dust method is very similar to an independent Herschel measurement for M31 and to the calibration for the Milky Way from Planck measurements.