Measurements of the inclusive and differential fiducial cross sections for Higgs boson production in p-p collisions at center-of-mass energies of ~TeV and ~TeV using H decays () are presented. Measurements are based on 5.1~\mathrm{fb}^{-1} (19.7~\mathrm{fb}^{-1}) of 7(8)~TeV proton-proton collision data, recorded with the CMS detector at the LHC. The measurements of differential cross section are performed in bins of the transverse momentum and rapidity of the four-lepton system, jet multiplicity, transverse momentum of the leading jet, and distance in rapidity between the Higgs boson candidate and the leading jet. A measurement of the cross section of Z boson production in the Z decay channel and its ratio to the Higgs boson production cross section in the H channel is also performed. The inclusive fiducial cross section for Higgs boson production in the H decay channel is measured to be 0.56^{\rm +0.67}_{\rm -0.44} \, {\rm(stat.)}\, ^{\rm +0.21}_{\rm -0.06}\, {\rm (sys.)}~fb for proton-proton collisions at 7~TeV and 1.11^{\rm +0.41}_{\rm -0.35} \, {\rm(stat.)}\, ^{\rm +0.14}_{\rm -0.10}\, {\rm (sys.)}~fb for proton-proton collisions at 8~TeV. The results of all measurements are compared with theoretical calculations based on the Standard Model and no significant deviation is observed.