The ratio between the prompt ψ(2S) and J/ψ yields, reconstructed via their decays into μ+μ−, is measured in Pb-Pb and p-p collisions at sNN−−−−√=2.76 TeV. The analysis is based on Pb-Pb and p-p data samples collected by CMS at the Large Hadron Collider, corresponding to integrated luminosities of 150 μb−1 and 5.4 pb−1, respectively. The double ratio of measured yields (Nψ(2S)/NJ/ψ)Pb−Pb/(Nψ(2S)/NJ/ψ)p−p is computed in three Pb-Pb collision centrality bins and two kinematic ranges: one at midrapidity, |y|<1.6, covering the transverse momentum range 6.5