A search for events containing four top quarks (tt¯tt¯) is reported from proton–proton collisions recorded by the CMS experiment at √s=13 TeV and corresponding to an integrated luminosity of 2.6 fb−1. The analysis considers the single-lepton (e or μ)+jets and the opposite-sign dilepton (μ+μ−, μ±e∓
, or e+e−)+jets channels. It uses boosted decision trees to combine information on the global event and jet properties to distinguish between tt¯tt¯ and tt¯ production. The number of events observed after all selection requirements is consistent with expectations from background and standard model signal predictions, and an upper limit is set on the cross section for tt¯tt¯ production in the standard model of 94 fb at 95% confidence level (10.2× the prediction), with an expected limit of 118 fb. This is combined with the results from the published CMS search in the same-sign dilepton channel, resulting in an improved limit of 69 fb at 95% confidence level (7.4× the prediction), with an expected limit of 71 fb. These are the strongest constraints on the rate of tt¯tt¯ production to date.