We determine the cosmic abundance of molecular hydrogen ( \mathrm { H _ { 2 } } ) in the local universe from the xCOLD GASS survey . To constrain the \mathrm { H _ { 2 } } mass function at low masses and correct for the effect of the lower stellar mass limit of 10 ^ { 9 } M _ { \odot } 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 H i and H i + \mathrm { H _ { 2 } } mass functions using the xGASS survey , and compare it to the H i mass function from the ALFALFA survey . We find the cosmic abundance of molecular gas in the local Universe to be \Omega _ { \mathrm { H _ { 2 } } } = ( 5.34 \pm 0.47 ) \times 10 ^ { -5 } h ^ { -1 } . Molecular gas accounts for 19.6 \pm 3.9 \% of the total abundance of cold gas , \mathrm { \Omega _ { HI + H _ { 2 } } } = ( 4.66 \pm 0.70 ) \times 10 ^ { -4 } h _ { 70 } ^ { -1 } . Galaxies with stellar masses in excess of 10 ^ { 9 } M _ { \odot } 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 H i 21cm line . The xCOLD GASS CO , molecular gas and cold gas mass functions and \Omega _ { \mathrm { H _ { 2 } } } 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 .