The estimation of the number of atoms in the known universe involves a series of scientific approximations and astronomical observations. Here’s a detailed explanation:
Estimation of the Observable Universe’s Size: Scientists begin by estimating the size of the observable universe. The observable universe is considered to have a radius of about 46.5 billion light-years. This is calculated based on the expanding nature of the universe and the farthest distances from which light has had time to reach us since the Big Bang, approximately 13.8 billion years ago.
Density of Matter in the Universe: The next step involves estimating the average density of matter in the universe. This is typically taken from observations and measurements made by cosmological surveys and studies, such as the Wilkinson Microwave Anisotropy Probe (WMAP) and Planck satellite missions. The critical density needed to keep the universe at its current state is about 5 protons per cubic meter on average, including dark matter.
Composition of Matter: The majority of atomic matter in the universe is hydrogen, which makes up about 74% of baryonic matter, followed by helium at roughly 24%. Heavy elements (metals) account for only about 2% of the baryonic matter. These proportions help in estimating the average number of atoms per unit mass since hydrogen atoms are the lightest.
Calculating the Total Number of Atoms: By applying the average density and the total volume of the observable universe, scientists estimate the total mass of baryonic matter—regular matter consisting of protons, neutrons, and electrons. This is coupled with Avogadro’s number (approximately 6.022 x 10^23) to convert the total mass of the baryonic matter into an estimate for the total number of atoms.
Final Estimation: Taking these assumptions into account, cosmologists have estimated the number of atoms in the observable universe to be around 10^80. This number is a very rough approximation, given the uncertainties and assumptions involved in each step of this calculation, including distribution and clumping of matter and the nature of dark energy and dark matter.

These approximations and calculations are just that—approximations. The universe is vast and complex, and our methods continuously improve with better technology and understanding of cosmology. Nonetheless, this estimation provides a framework for understanding the sheer immensity of the universe on a quantifiable scale.