Measurements of inclusive W and Z boson production cross sections in pp collisions at sqrt(s)=7 TeV are presented, based on 2.9 inverse picobarns of data recorded by the CMS detector at the LHC. The measurements, performed in the electron and muon decay channels, are combined to give sigma(pp to WX) times B(W to muon or electron + neutrino) = 9.95 \pm 0.07(stat.) \pm 0.28(syst.) \pm 1.09(lumi.) nb and sigma(pp to ZX) times B(Z to oppositely charged muon or electron pairs) = 0.931 \pm 0.026(stat.) \pm 0.023(syst.) \pm 0.102(lumi.) nb. Theoretical predictions, calculated at the next-to-next-to-leading order in QCD using recent parton distribution functions, are in agreement with the measured cross sections. Ratios of cross sections, which incur an experimental systematic uncertainty of less than 4%, are also reported.