Observations of the cosmological large-scale structure provide well-established neutrino mass limits . We extend this argument to thermal relic axions . We calculate the axion thermal freeze-out temperature and thus their cosmological abundance on the basis of their interaction with pions . For hadronic axions we find a new mass limit m _ { a } < 1.05 eV ( 95 % CL ) , corresponding to a limit on the axion decay constant of f _ { a } > 5.7 \times 10 ^ { 6 } GeV . For other models this constraint is significantly weakened only if the axion-pion coupling is strongly suppressed . For comparison we note that the same approach leads to \sum m _ { \nu } < 0.65 eV ( 95 % CL ) for neutrinos .