  We show that the masses of red giant stars can be well predicted from their
photospheric carbon and nitrogen abundances, in conjunction with their
spectroscopic stellar labels log g, Teff, and [Fe/H]. This is qualitatively
expected from mass-dependent post main sequence evolution. We here establish an
empirical relation between these quantities by drawing on 1,475 red giants with
asteroseismic mass estimates from Kepler that also have spectroscopic labels
from APOGEE DR12. We assess the accuracy of our model, and find that it
predicts stellar masses with fractional r.m.s. errors of about 14% (typically
0.2 Msun). From these masses, we derive ages with r.m.s errors of 40%. This
empirical model allows us for the first time to make age determinations (in the
range 1-13 Gyr) for vast numbers of giant stars across the Galaxy. We apply our
model to 52,000 stars in APOGEE DR12, for which no direct mass and age
information was previously available. We find that these estimates highlight
the vertical age structure of the Milky Way disk, and that the relation of age
with [alpha/M] and metallicity is broadly consistent with established
expectations based on detailed studies of the solar neighbourhood.

Solar and Stellar Astrophysics;Astrophysics of Galaxies