How was the Avogadro constant determined? Why 6.022 x 10^{23}, and not a simpler quantity like a trillion or a septillion?

The detailed explanation is found in the section ‘Milestones related to the Avogadro constant’, which includes links to various experiments. In short, scientists require a quantity that is huge and precisely defined to conveniently count samples of atoms and molecules. In 1967, a consensus was reached and the mole was accepted as a SI base unit with the following definition:

A mole is the amount of substance of a system that contains as many elementary entities as there are atoms in 0.012 kilogram of carbon-12.

Having defined the mole, the next logical step was to experimentally determine the exact number of atoms in twelve grammes of carbon-12. This was accomplished using a method called x-ray diffraction, which gave a value of 6.02214076 x 10^{23} in 2017. The 2017 result was so accurate that the definition of the mole was, in Nov 2018, changed to:

A mole is the amount of substance of a system that contains exactly 6.02214076 x 10^{23}elementary entities.

With this new definition, the molar mass of carbon-12, while still 0.012 kg, has a very small degree of uncertainty that has to be determined through future experiments.

The 1967 definition of the mole states that if there are twelve grammes of carbon-12 in a container, there are 6.022 x 10^{23} atoms of carbon-12 or one mole of carbon-12 in the container. Applying the same train of thought, if there are *m* grammes of carbon-12 in a vessel, there are moles of carbon-12.

Hence, the number of moles of a substance is the ratio of the mass of the substance, *m*, and its mass per mole, *M* (also known as molar mass), i.e.:

Eq2 remains valid with regard to the 2018 definition.