A measurement of the top quark-antiquark pair production cross section in proton-proton collisions at a centre-of-mass energy of 13 is presented. The data correspond to an integrated luminosity of , recorded by the CMS experiment at the CERN LHC in 2016. Dilepton events ( , , ) are selected and the cross section is measured from a likelihood fit. For a top quark mass parameter in the simulation of the fit yields a measured cross section , in agreement with the expectation from the standard model calculation at next-to-next-to-leading order. A simultaneous fit of the cross section and the top quark mass parameter in the powheg simulation is performed. The measured value of is in good agreement with previous measurements. The resulting cross section is used, together with the theoretical prediction, to determine the top quark mass and to extract a value of the strong coupling constant with different sets of parton distribution functions.