  In this work, we calibrate the relationship between Halpha emission and M
dwarf ages. We compile a sample of 892 M dwarfs with Halpha equivalent width
(HaEW) measurements from the literature that are either co-moving with a white
dwarf of known age (21 stars) or in a known young association (871 stars). In
this sample we identify 7 M dwarfs that are new candidate members of known
associations. By dividing the stars into active and inactive categories
according to their HaEW and spectral type (SpT), we find that the fraction of
active dwarfs decreases with increasing age, and the form of the decline
depends on SpT. Using the compiled sample of age-calibrators we find that HaEW
and fractional Halpha luminosity (LHaLbol) decrease with increasing age. HaEW
for SpT<M7 decreases gradually up until ~1Gyr. For older ages, we found only
two early M dwarfs which are both inactive and seem to continue the gradual
decrease. We also found 14 mid-type out of which 11 are inactive and present a
significant decrease of HaEW, suggesting that the magnetic activity decreases
rapidly after ~1Gyr. We fit LHaLbol versus age with a broken power-law and find
an index of -0.11+0.02-0.01 for ages <~776Myr. The index becomes much steeper
at older ages however a lack of field age-calibrators leaves this part of the
relation far less constrained. Finally, from repeated independent measurements
for the same stars we find that 94% of these has a level of HaEW variability
<=5A at young ages (<1Gyr).
