The stellar initial mass function (IMF) is a fundamental property affecting the evolution of galaxies, but its origin remains poorly understood. One scenario suggests that the IMF inherits its shape largely from that of the Core Mass Function (CMF), but with a mass scaling efficiency factor of ~3 between the two distributions. In this scenario, stars preferentially form from single core collapse. Alternatively, the stellar IMF may not be directly linked to the CMF and stars instead form via more chaotic competitive accretion. In this work, we measure the CMF of a sample of 28 dense molecular gas clumps, selected to be within distances of 3.5 kpc, by using dust continuum observations at 1.3 mm, obtained as part of the ALMAGAL project’s public data release. We identify 178 cores (M ~ 0.06 to 250 solar masses) using the dendrogram algorithm and applied completeness corrections for flux and number recovery that were estimated from simulated core insertion and recovery experiments. The final derived CMF shows a broad peak near 5 solar masses and an approximately power law distribution of the form dN/dlogM proportional to M-α with α = 1.03 ± 0.11 for M ≳ 6 solar masses. We discuss the obtained results in light of previous work, with particular attention to possible sources of discrepancies. Our ALMAGAL clump CMF is significantly different from those obtained by our group toward the protocluster G286 and a sample of Infrared Dark Clouds using the same methods. The CMF obtained from ALMAGAL clumps contains more massive cores, which is a potential indicator of the role of environment on the CMF.