A search has been performed for long-lived particles that could have come to rest within the CMS detector, using the time intervals between LHC beam crossings. The existence of such particles could be deduced from observation of their decays via energy deposits in the CMS calorimeter appearing at times that are well separated from any proton–proton collisions. Using a data set corresponding to an integrated luminosity of 18.6-1 of 8 TeV proton–proton collisions, and a search interval corresponding to 281 h of trigger livetime, 10 events are observed, with a background prediction of 132-2.5 +3.6 events. Limits are presented at 95 % confidence level on gluino and top squark production, for over 13 orders of magnitude in the mean proper lifetime of the stopped particle. Assuming a cloud model of R-hadron interactions, a gluino with mass ≲1000 GeV and a top squark with mass ≲525 GeV are excluded, for lifetimes between 1 μs and 1000s. These results are the most stringent constraints on stopped particles to date.