Precise luminosity calibration at bunched-beam hadron colliders like the Large Hadron Collider (LHC) is critical to determine fundamental parameters of the standard model and to constrain or to discover beyond-the-standard-model phenomena. The luminosity determination at the LHC interaction point 5 with the Compact Muon Solenoid (CMS) detector, using proton-proton, proton-nucleus, or nucleus-nucleus collisions during Run 2 of the LHC (2015–2018), is reported. The absolute luminosity scale is obtained using beam-separation (“van der Meer”) scans performed with special beam optics, large-emittance beams, and fewer, well-separated bunches to reduce potential systematic effects. The sources of systematic uncertainty are given. The contribution to the total uncertainty in the integrated luminosity after applying the van der Meer calibration to the entire data-taking period is discussed, considering the information from short “emittance” scans performed regularly in CMS since 2017.