A search for charged stable massive particles in 36.1 fb−1 of proton–proton collisions at √ s = 13 TeV with the ATLAS detector is presented. Since stable massive particles are not absorbed in the calorimeters their signature is equivalent to muons that propagate much slower than the speed of light due to their large mass and are highly ionising. The ionisation energy losses are measured in pixel clusters of the innermost tracking chambers, the propagation velocity β is determined by performing time-of-flight measurements. An in-depth timing calibration of the muon system is presented which significantly improves previous results and achieves the best ATLAS β resolution to-date. This involves the correction of temporal effects and determination of calibration constants for about 700 000 detector elements individually. The expected background is estimated in a purely data-driven manner. No statistically significant excess of events was observed in any signal region. The results are interpreted in various supersymmetric models predicting the existence of long-lived particles. Long-lived gluinos, originating from Split SUSY models, and long-lived bottom and top squarks that hadronise into R-hadrons were excluded at 95% CL up to masses of m(g˜) = 2015 GeV, m(b˜) = 1240 GeV and m(g˜) = 1325 GeV. Directly pair-produced long-lived staus from GMSB models are excluded to masses up to m(τ˜) = 420 GeV. Detector-stable charginos originating from mAMSB models can be ruled out up to masses of m(χ˜1±) = 1100 GeV. All limits are the most stringent constraints on stable SUSY particles and are a significant improvement over previously reported ATLAS and CMS results. To account for shorter lifetimes, model independence and possible charge-flip reactions the R-hadron analysis is also done disregarding all signals stemming from the muon system including triggering. No excess of events is observed and 95% CL exclusion limits are set resulting in the limits m(g˜) = 1950 GeV, m(b˜) = 1170 GeV and m(g˜) = 1220 GeV for gluinos, bottom and top squarks, respectively. Lastly, a novel trigger is introduced that is dedicated to slow-particle searches by considering two consecutive collision events thereby recovering muon-trigger efficiency for particles arriving out-of-time in the muon system