We study the relationship between coronal X-ray emission and stellar age for late-type stars, and the variation of this relationship with spectral type. We select 717 stars from 13 open clusters and find that the ratio of X-ray to bolometric luminosity during the saturated phase of coronal emission decreases from 10−3.1 for late K dwarfs to 10−4.3 for early-F-type stars [across the range 0.29 ≤ (B−V)0 < 1.41]. Our determined saturation time-scales vary between 107.8 and 108.3 yr, though with no clear trend across the whole FGK range. We apply our X-ray emission–age relations to the investigation of the evaporation history of 121 known transiting exoplanets using a simple energy-limited model of evaporation and taking into consideration Roche lobe effects and different heating/evaporation efficiencies. We confirm that a linear cut-off of the planet distribution in the M2/R3 versus a−2 plane is an expected result of population modification by evaporation and show that the known transiting exoplanets display such a cut-off. We find that for an evaporation efficiency of 25 per cent we expect around one in ten of the known transiting exoplanets to have lost ≥5 per cent of their mass since formation. In addition we provide estimates of the minimum formation mass for which a planet could be expected to survive for 4 Gyr for a range of stellar and planetary parameters. We emphasize the importance of the earliest periods of a planet’s life for its evaporation history with 75 per cent expected to occur within the first Gyr. This raises the possibility of using evaporation histories to distinguish between different migration mechanisms. For planets with spin-orbit angles available from measurements of the Rossiter–McLaughlin effect, no difference is found between the distributions of planets with misaligned orbits and those with aligned orbits. This suggests that dynamical effects accounting for misalignment occur early in the life of the planetary system, although additional data are required to test this.