Biologists measure biomass in tonnes of carbon (t C): that makes animals of different water content comparable; carbon is about half of the dry mass. Schultheiss et al. (2022) evaluated 489 field studies on all continents and estimate, conservatively, about 20 quadrillion (2 × 10¹⁶) ground-dwelling ants – about 2.5 million per person. Together they hold about 12 million t of carbon. That is more than all wild birds (≈ 2 million t C) and wild mammals, including whales (≈ 7 million t C), together, and about a fifth of the biomass of all humans. The figures for birds and mammals come from Bar-On et al. (2018), whom the ant study compares itself with. All values are estimates with wide uncertainty ranges.
Data as of: Ants: PNAS 2022 (489 field studies) · wild birds and mammals: PNAS 2018
Sources: Schultheiss et al., PNAS (2022): The abundance, biomass, and distribution of ants on Earth · Bar-On, Phillips & Milo, PNAS (2018): The biomass distribution on Earth