  We determine the cosmic abundance of molecular hydrogen (H2) in the local
universe from the xCOLD GASS survey. To constrain the H2 mass function at low
masses and correct for the effect of the lower stellar mass limit of 10^9 Msun
in the xCOLD GASS survey, we use an empirical approach based on an observed
scaling relation between star formation rate and gas mass. We also constrain
the HI and HI+H2 mass functions using the xGASS survey, and compare it to the
HI mass function from the ALFALFA survey. We find the cosmic abundance of
molecular gas in the local Universe to be Omega_H2=(5.34+/-0.47)x10^-5 h^-1.
Molecular gas accounts for 19.6 +/- 3.9% of the total abundance of cold gas,
Omega_HI+H2=(4.66+/-0.70)x10^-4 h^-1. Galaxies with stellar masses in excess of
10^9 Msun account for 89% of the molecular gas in the local Universe, while in
comparison such galaxies only contain 73% of the cold atomic gas as traced by
the HI 21cm line. The xCOLD GASS CO, molecular gas and cold gas mass functions
and Omega_H2 measurements provide constraints for models of galaxy evolution
and help to anchor blind ALMA and NOEMA surveys attempting to determine the
abundance of molecular gas at high redshifts.
