  We consider top-quark pair production at the LHC within the MSbar scheme for
the renormalisation of the top-quark mass, and we present predictions for total
and differential cross sections at next-to-next-to-leading order (NNLO) in QCD.
Our state-of-the-art calculation extends the available differential results by
one order in the perturbative expansion, and it is relevant for a precise
determination of the top-quark mass, including possible effects of the running
mass in the MSbar scheme. We consider variations of the scale at which the
MSbar mass of the top quark is evaluated, extending the usual 7-point to a
15-point scale variation. This additional variation is crucial for a reliable
estimate of the theoretical uncertainties, especially at low perturbative
orders and close to the production threshold of the top-quark pair. We also
compute, for the first time, the invariant-mass distribution of the top-quark
pair by using a running mass, evaluated at a dynamic scale. Our predictions for
the invariant-mass distribution in the MSbar scheme are compared with a recent
measurement performed by the CMS Collaboration. We observe that the inclusion
of the NNLO corrections improves the agreement with the data, and we discuss
effects due to the QCD running of the MSbar mass of the top quark.
