At the Large Hadron Collider, the identification of jets originating from b quarks is important for searches for new physics and for measurements of standard model processes. A variety of algorithms has been developed by CMS to select b-quark jets based on variables such as the impact parameters of charged-particle tracks, the properties of reconstructed decay vertices, and the presence or absence of a lepton, or combinations thereof. The performance of these algorithms has been measured using data from proton-proton collisions at the LHC and compared with expectations based on simulation. The data used in this study were recorded in 2011 at root s = 7TeV for a total integrated luminosity of 5.0 fb(-1). The efficiency for tagging b-quark jets has been measured in events from multijet and t-quark pair production. CMS has achieved a b-jet tagging efficiency of 85\% for a light-parton misidentification probability of 10\% in multijet events. For analyses requiring higher purity, a misidentification probability of only 1.5\% has been achieved, for a 70\% b-jet tagging efficiency.