We present the dust mass function (DMF) of 15 750 galaxies with redshift z <0.1, drawn from the overlapping area of the GAMA and H-ATLAS surveys. The DMF is derived using the density corrected Vmax method, wherewe estimate Vmax using: (i) the normal photometric selection limit (pVmax) and (ii) a bivariate brightness distribution (BBD) technique, which accounts for two selection effects.We fit the datawith a Schechter function, and find M* = (4.65 ± 0.18) × 107 h2 70M⊙, a = (-1.22 ± 0.01), ϕ* = (6.26 ± 0.28) × 10-3 h3 70 Mpc-3 dex-1. The resulting dust mass density parameter integrated down to 104 M⊙ is ωd = (1.11 ± 0.02) × 10-6 which implies the mass fraction of baryons in dust is fmb = (2.40 ± 0.04) × 10-5; cosmic variance adds an extra 7-17 per cent uncertainty to the quoted statistical errors. Ourmeasurements have fewer galaxies with high dust mass than predicted by semi-analytic models. This is because the models include too much dust in high stellar mass galaxies. Conversely, our measurements find more galaxies with high dust mass than predicted by hydrodynamical cosmological simulations. This is likely to be from the long time-scales for grain growth assumed in the models. We calculate DMFs split by galaxy type and find dust mass densities of ωd = (0.88 ± 0.03) × 10-6 and ωd = (0.060 ± 0.005) × 10-6 for late types and early types, respectively. Comparing to the equivalent galaxy stellar mass functions (GSMF) we find that the DMF for late types is well matched by the GSMF scaled by (8.07 ± 0.35) × 10-4.