Context. In the era of large high-resolution spectroscopic surveys such as Gaia-ESO and APOGEE, high-quality spectra can contribute to our understanding of the Galactic chemical evolution by providing abundances of elements that belong to the different nucleosynthesis channels, and also by providing constraints to one of the most elusive astrophysical quantities: stellar age. Aims. Some abundance ratios, such as [C/N], have been proven to be excellent indicators of stellar ages. We aim at providing an empirical relationship between stellar ages and [C/N] using open star clusters, observed by the Gaia-ESO and APOGEE surveys, as calibrators. Methods. We used stellar parameters and abundances from the Gaia-ESO Survey and APOGEE Survey of the Galactic field and open cluster stars. Ages of star clusters were retrieved from the literature sources and validated using a common set of isochrones. We used the same isochrones to determine for each age and metallicity the surface gravity at which the first dredge-up and red giant branch bump occur. We studied the effect of extra-mixing processes in our sample of giant stars, and we derived the mean [C/N] in evolved stars, including only stars without evidence of extra mixing. By combining the Gaia-ESO and APOGEE samples of open clusters, we derived a linear relationship between [C/N] and (logarithmic) cluster ages. Results. We apply our relationship to selected giant field stars in the Gaia-ESO and APOGEE surveys. We find an age separation between thin- and thick-disc stars and age trends within their populations, with an increasing age towards lower metallicity populations. Conclusions. With this empirical relationship, we are able to provide an age estimate for giant stars in which C and N abundances are measured. For giant stars, the isochrone fitting method is indeed less sensitive than for dwarf stars at the turn-off. Our method can therefore be considered as an additional tool to give an independent estimate of the age of giant stars. The uncertainties in their ages is similar to those obtained using isochrone fitting for dwarf stars.
- Galaxy: abundances
- Galaxy: disk
- Open clusters and associations: general