The momentum measurement capability of the ATLAS muon spectrometer relies fundamentally on the intrinsic single-hit spatial resolution of the monitored drift tube precision tracking chambers. Optimal resolution is achieved with a dedicated calibration program that addresses the specific operating conditions of the 354000 high-pressure drift tubes in the spectrometer. The calibrations consist of a set of timing offsets and drift time to drift distance transfer relations, and result in chamber resolution functions. This paper describes novel algorithms to obtain precision calibrations from data collected by ATLAS in LHC Run 2 and from a gas monitoring chamber, deployed in a dedicated gas facility. The algorithm output consists of a pair of correction constants per chamber which are applied to baseline calibrations, and determined to be valid for the entire ATLAS Run 2. The final single-hit spatial resolution, averaged over 1172 monitored drift tube chambers, is $81.7 \pm 2.2 \mu$m.