We investigate the axion dark matter scenario ( ADM ) , in which axions account for all of the dark matter in the Universe , in light of the most recent cosmological data . In particular , we use the Planck temperature data , complemented by WMAP E-polarization measurements , as well as the recent BICEP2 observations of B-modes . Baryon Acoustic Oscillation data , including those from the Baryon Oscillation Spectroscopic Survey , are also considered in the numerical analyses . We find that , in the minimal ADM scenario , the full dataset implies that the axion mass m _ { \textrm { a } } = 82.2 \pm 1.1 \mu \mathrm { eV } ( corresponding to the Peccei-Quinn symmetry being broken at a scale f _ { \textrm { a } } = ( 7.54 \pm 0.10 ) \times 10 ^ { 10 } \mathrm { GeV } ) , or m _ { \textrm { a } } = 76.6 \pm 2.6 \mu \mathrm { eV } ( f _ { \textrm { a } } = ( 8.08 \pm 0.27 ) \times 10 ^ { 10 } \mathrm { GeV } ) when we allow for a non-standard effective number of relativistic species N _ { \mathrm { eff } } . We also find a 2 \sigma preference for N _ { \mathrm { eff } } > 3.046 . The limit on the sum of neutrino masses is \sum m _ { \nu } < 0.25 \mathrm { eV } at 95 % CL for N _ { \mathrm { eff } } = 3.046 , or \sum m _ { \nu } < 0.47 \mathrm { eV } when N _ { \mathrm { eff } } is a free parameter . Considering extended scenarios where either the dark energy equation-of-state parameter w , the tensor spectral index n _ { t } or the running of the scalar index dn _ { s } / d \ln k are allowed to vary does not change significantly the axion mass-energy density constraints . However , in the case of the full dataset exploited here , there is a preference for a non-zero tensor index or scalar running , driven by the different tensor amplitudes implied by the Planck and BICEP2 observations . Dark matter axions with mass in the 70 - 80 \mu \mathrm { eV } range can , in principle , be detected by looking for axion-to-photon conversion occurring inside a tunable microwave cavity permeated by a high-intensity magnetic field , and operating at a frequency \nu \simeq 20 GHz . This is out of the reach of current experiments like ADMX ( limited to a maximum frequency of a few GHzs ) , but is , on the other hand , within the reach of the upcoming ADMX-HF experiment , that will explore the 4 - 40 GHz frequency range and then being sensitive to axions masses up to \sim 150 \mu \mathrm { eV } .