The redshifts of lens galaxies in known gravitational lens systems probe the volume distribution of the lensing mass. Following earlier work by Kochanek, we rederive the lens–redshift probability distribution, allowing for mass and number density evolution of the lensing galaxies, and apply this test to a much enlarged sample of lens systems. From a literature survey of all known lenses, we have selected an unbiased sample of 15 lenses with complete redshift information. For a flat universe and no lens evolution, we can only put an upper limit on the cosmological constant of ΩΛ < 0.89 at the 95 per cent confidence limit (CL). ΩΛ≈ 0.7 and no evolution is consistent with the data. Allowing for evolution in an Ωm= 0.3, ΩΛ= 0.7 cosmology, we find that the best‐fitting evolution in σ* (i.e. the characteristic velocity dispersion in a Schechter‐like function) of early‐type galaxies, in the redshift range z∼ 0 to 1, is d log [σ*(z)]/dz=−0.10 ± 0.06. This is consistent with no evolution and implies that, at 95 per cent CL, σ* of early‐type galaxies at z∼ 1 was at least 63 per cent of its current value. Alternatively, if there is no mass evolution, a present‐day value of σ* > 175 km s−1 for elliptical galaxies is required (95 per cent CL).