We study for what specific values of the theoretical parameters the axion can form the totality of cold dark matter . We examine the allowed axion parameter region in the light of recent data collected by the WMAP5 mission plus baryon acoustic oscillations and supernovae , and assume an inflationary scenario and standard cosmology . We also upgrade the treatment of anharmonicities in the axion potential , which we find important in certain cases . If the Peccei-Quinn symmetry is restored after inflation , we recover the usual relation between axion mass and density , so that an axion mass m _ { a } = ( 85 \pm 3 ) { ~ { } \mu eV } makes the axion 100 % of the cold dark matter . If the Peccei-Quinn symmetry is broken during inflation , the axion can instead be 100 % of the cold dark matter for m _ { a } < 15 { ~ { } meV } provided a specific value of the initial misalignment angle \theta _ { i } is chosen in correspondence to a given value of its mass m _ { a } . Large values of the Peccei-Quinn symmetry breaking scale correspond to small , perhaps uncomfortably small , values of the initial misalignment angle \theta _ { i } .