  We present a catalogue of distances, masses and ages for $\sim3$ million
stars in the second Gaia data release with spectroscopic parameters available
from the large spectroscopic surveys: APOGEE, Gaia-ESO, GALAH, LAMOST, RAVE and
SEGUE. We use a Bayesian framework to characterise the probability density
functions of distance, mass and age using photometric, spectroscopic and
astrometric information, supplemented with spectroscopic masses where available
for giant stars. Furthermore, we provide posterior extinction estimates ($A_V$)
to every star using published extinction maps as a prior input. We provide an
appendix with extinction coefficients for Gaia photometry derived from stellar
models, which account for variation with intrinsic colour and total extinction.
Our pipeline provides output estimates of the spectroscopic parameters, which
can be used to inform improved spectroscopic analysis. We complement our
catalogues with Galactocentric coordinates and actions with associated
uncertainties. As a demonstration of the power of our catalogue, we produce
velocity dispersion profiles of the disc separated by age and Galactocentric
radius (between $3$ and $15\,\mathrm{kpc}$ from the Galactic centre). This
suggests that the velocity dispersion profiles flatten with radius in the outer
Galaxy ($>8\,\mathrm{kpc}$) and that at all radii the velocity dispersion
follows the smooth power law with age observed in the solar neighbourhood.

Astrophysics of Galaxies;Solar and Stellar Astrophysics