The production of four top quarks (ttˉttˉttˉttˉ) is studied with LHC proton-proton collision data samples collected by the CMS experiment at a center-of-mass energy of 13 TeV, and corresponding to integrated luminosities of up to 138 fb−1−1. Events that have no leptons (all-hadronic), one lepton, or two opposite-sign leptons (where lepton refers only to prompt electrons or prompt muons) are considered. This is the first ttˉttˉttˉttˉ measurement that includes the all-hadronic final state. The observed significance of the ttˉttˉttˉttˉ signal in these final states of 3.9 standard deviations (1.5 expected) provides evidence for ttˉttˉttˉttˉ production, with a measured cross section of 36 −11+12−11+12 fb. Combined with earlier CMS results in other final states, the signal significance is 4.0 standard deviations (3.2 expected). The combination returns an observed cross section of 17 ±± 4 (stat) ±± 3 (syst) fb, which is consistent with the standard model prediction.