The abundance of the chemical elements is a measure of the occurrence of the chemical elements relative to all other elements in a given environment. Abundance is measured in one of three ways: by the mass-fraction (the same as weight fraction); by the mole-fraction (fraction of atoms by numerical count, or sometimes fraction of molecules in gases); or by the volume-fraction. Volume-fraction is a common abundance measure in mixed gases such as planetary atmospheres, and is similar in value to molecular mole-fraction for gas mixtures at relatively low densities and pressures, and ideal gas mixtures. Most abundance values in this article are given as mass-fractions.
For example, the abundance of oxygen in pure water can be measured in two ways: the mass fraction is about 89%, because that is the fraction of water's mass which is oxygen. However, the mole-fraction is 33.3333...%  because only 1 atom of 3 in water, H2O, is oxygen. As another example, looking at the mass-fraction abundance of hydrogen and helium in both the Universe as a whole and in the atmospheres of gas-giant planets such as Jupiter, it is 74% for hydrogen and 23–25% for helium; while the (atomic) mole-fraction for hydrogen is 92%, and for helium is 8%, in these environments. Changing the given environment to  Jupiter's outer atmosphere, where hydrogen is diatomic while helium is not, changes the molecular mole-fraction (fraction of total gas molecules), as well as the fraction of atmosphere by volume, of hydrogen to about 86%, and of helium to 13%.[Note 1]
The abundance of chemical elements in the universe is dominated by the large amounts of  hydrogen and helium which were produced in the Big Bang. Remaining elements, making up only about 2% of the universe, were largely produced by supernovae and certain red giant stars. Lithium, beryllium and boron are rare because although they are produced by nuclear fusion, they are then destroyed by other reactions in the stars.[1][2] The elements from carbon to iron are relatively more common in the universe because of the ease of making them in supernova nucleosynthesis. Elements of higher atomic number than iron (element 26) become progressively more rare in the universe, because they increasingly absorb stellar energy in being produced. Elements with even atomic numbers are generally more common than their neighbors in the periodic table, also due to favorable energetics of formation.
The abundance of elements in the Sun and outer planets is similar to that in the universe. Due to solar heating, the elements of Earth and the inner rocky planets of the Solar System have undergone an additional depletion of volatile hydrogen, helium, neon, nitrogen, and carbon (which volatilizes as methane). The crust, mantle, and core of the Earth show evidence of chemical segregation plus some sequestration by density. Lighter silicates of aluminum are found in the crust, with more magnesium silicate in the mantle, while metallic iron and nickel compose the core. The abundance of elements in specialized environments, such as atmospheres, or oceans, or the human body, are primarily a product of chemical interactions with the medium in which they reside.
Universe

The elements – that is, ordinary (baryonic) matter made of protons, neutrons, and electrons, are only a small part of the content of the Universe. Cosmological observations suggest that only 4.6% of the universe's energy (including the mass contributed by energy, E = mc² ↔ m = E / c²) comprises the visible baryonic matter that constitutes stars, planets, and living beings. The rest is thought to be made up of dark energy (68%) and dark matter (27%).[4] These are forms of matter and energy believed to exist on the basis of scientific theory and observational deductions, but they have not been directly observed and their nature is not well understood.
Most standard (baryonic) matter is found in intergalactic gas, stars, and interstellar clouds, in the form of atoms or ions (plasma), although it can be found in degenerate forms in extreme astrophysical settings, such as the high densities inside white dwarfs and neutron stars.
Hydrogen is the most abundant element in the Universe; helium is second.  However, after this, the rank of abundance does not continue to correspond to the atomic number; oxygen has abundance rank 3, but atomic number 8. All others are substantially less common.
The abundance of the lightest elements is well predicted by the standard cosmological model, since they were mostly produced shortly (i.e., within a few hundred seconds) after the Big Bang, in a process known as Big Bang nucleosynthesis. Heavier elements were mostly produced much later, inside of stars.
Hydrogen and helium are estimated to make up roughly 74% and 24% of all baryonic matter in the universe respectively. Despite comprising only a very small fraction of the universe, the remaining "heavy elements" can greatly influence astronomical phenomena. Only about 2% (by mass) of the Milky Way galaxy's disk is composed of heavy elements.
These other elements are generated by stellar processes.[5][6][7] In astronomy, a "metal" is any element other than hydrogen or helium. This distinction is significant because hydrogen and helium are the only elements that were produced in significant quantities in the Big Bang.  Thus, the metallicity of a galaxy or other object is an indication of stellar activity, after the Big Bang.
In general, elements up to iron are made in large stars in the process of becoming supernovae. Iron-56 is particularly common, since it is the most stable element that can easily be made from alpha particles (being a product of decay of radioactive nickel-56, ultimately made from 14 helium nuclei). Elements heavier than iron are made in energy-absorbing processes in large stars, and their abundance in the universe (and on Earth) generally decreases with increasing atomic number.

Solar system

The following graph (note log scale) shows abundance of elements in the Solar System. The table shows the twelve most common elements in our galaxy (estimated spectroscopically), as measured in parts per million, by mass.[3]
Nearby galaxies that have evolved along similar lines have a corresponding enrichment of elements heavier than hydrogen and helium. The more distant galaxies are being viewed as they appeared in the past, so their abundances of elements appear closer to the primordial mixture. Since physical laws and processes are uniform throughout the universe, however, it is expected that these galaxies will likewise have evolved similar abundances of elements.
The abundance of elements is in keeping with their origin from the Big Bang and nucleosynthesis in a number of progenitor supernova stars. Very abundant hydrogen and helium are products of the Big Bang, while the next three elements are rare since they had little time to form in the Big Bang and are not made in stars (they are, however, produced in small quantities by breakup of heavier elements in interstellar dust, as a result of impact by cosmic rays).
Beginning with carbon, elements have been produced in stars by buildup from alpha particles (helium nuclei), resulting in an alternatingly larger abundance of elements with even atomic numbers (these are also more stable). The effect of odd-numbered chemical elements generally being more rare in the universe was empirically noticed in 1914, and is known as the Oddo-Harkins rule.

Relation to nuclear binding energy
Loose correlations have been observed between estimated elemental abundances in the universe and the nuclear binding energy curve.  Roughly speaking, the relative stability of various atomic nuclides has exerted a strong influence on the relative abundance of elements formed in the Big Bang, and during the development of the universe thereafter.[9]
See the article about nucleosynthesis for the explanation on how certain nuclear fusion processes in stars (such as carbon burning, etc.) create the elements heavier than hydrogen and helium.
A further observed peculiarity is the jagged alternation between relative abundance and scarcity of adjacent atomic numbers in the elemental abundance curve, and a similar pattern of energy levels in the nuclear binding energy curve. This alternation is caused by the higher relative binding energy (corresponding to relative stability) of even atomic numbers compared with odd atomic numbers and is explained by the Pauli Exclusion Principle.[10]
The semi-empirical mass formula (SEMF), also called Weizsäcker's formula or the Bethe-Weizsäcker mass formula, gives a theoretical explanation of the overall shape of the curve of nuclear binding energy.[11]

Earth

The Earth formed from the same cloud of matter that formed the Sun, but the planets acquired different compositions during the formation and evolution of the solar system. In turn, the natural history of the Earth caused parts of this planet to have differing concentrations of the elements.
The mass of the Earth is approximately 5.98×1024kg. In bulk, by mass, it is composed mostly of iron (32.1%), oxygen (30.1%), silicon (15.1%), magnesium (13.9%), sulfur (2.9%), nickel (1.8%), calcium (1.5%), and aluminium (1.4%); with the remaining 1.2% consisting of trace amounts of other elements.[12]
The bulk composition of the Earth by elemental-mass is roughly similar to the gross composition of the solar system, with the major differences being that Earth is missing a great deal of the volatile elements hydrogen, helium, neon, and nitrogen, as well as carbon which has been lost as volatile hydrocarbons. The remaining elemental composition is roughly typical of the "rocky" inner planets, which formed in the thermal zone where solar heat drove volatile compounds into space. The Earth retains oxygen as the second-largest component of its mass (and largest atomic-fraction), mainly from this element being retained in silicate minerals which have a very high melting point and low vapor pressure.

Crust

The mass-abundance of the nine most abundant elements in the Earth's crust is approximately: oxygen 46%, silicon 28%, aluminum 8.2%, iron 5.6%, calcium 4.2%, sodium 2.5%, magnesium 2.4%, potassium 2.0%, and titanium 0.61%. Other elements occur at less than 0.15%. For a complete list, see abundance of elements in Earth's crust.
The graph at right illustrates the relative atomic-abundance of the chemical elements in Earth's upper continental crust— the part that is relatively accessible for measurements and estimation.
Many of the elements shown in the graph are classified into (partially overlapping) categories:
rock-forming elements (major elements in green field, and minor elements in light green field);
rare earth elements (lanthanides, La-Lu, and Y; labeled in blue);
major industrial metals (global production >~3×107 kg/year; labeled in red);
precious metals (labeled in purple);
the nine rarest "metals" — the six platinum group elements plus Au, Re, and Te (a metalloid) — in the yellow field. These are rare in the crust from being soluble in iron and thus concentrated in the Earth's core.
Note that there are two breaks where the unstable (radioactive) elements technetium (atomic number 43) and promethium (atomic number 61) would be. These elements are surrounded by stable elements, yet both have relatively short half lives (~ 4 million years and ~ 18 years respectively). These are thus extremely rare, since any primordial initial fractions of these in pre-Solar System materials have long since decayed. These two elements are now only produced naturally through the spontaneous fission of very heavy radioactive elements (for example, uranium, thorium, or the trace amounts of plutonium that exist in uranium ores), or by the interaction of certain other elements with cosmic rays. Both technetium and promethium have been identified spectroscopically in the atmospheres of stars, where they are produced by ongoing nucleosynthetic processes.
There are also breaks in the abundance graph where the six noble gases would be, since they are not chemically bound in the Earth's crust, and they are only generated by decay chains from radioactive elements in the crust, and are therefore extremely rare there.
The eight naturally occurring very rare, highly radioactive elements (polonium, astatine, francium, radium, actinium, protactinium, neptunium, and plutonium) are not included, since any of these elements that were present at the formation of the Earth have decayed away eons ago, and their quantity today is negligible and is only produced from the radioactive decay of uranium and thorium.
Oxygen and silicon are notably the most common elements in the crust. On Earth and in rocky planets in general, silicon and oxygen are far more common than their cosmic abundance. The reason is that they combine with each other to form silicate minerals. In this way, they are the lightest of all of the two-percent "astronomical metals" (i.e., non-hydrogen and helium elements) to form a solid that is refractory to the Sun's heat, and thus cannot boil away into space. All elements lighter than oxygen have been removed from the crust in this way.
Rare-earth elements
"Rare" earth elements is a historical misnomer. The persistence of the term reflects unfamiliarity rather than true rarity. The more abundant rare earth elements are similarly concentrated in the crust compared to commonplace industrial metals such as chromium, nickel, copper, zinc, molybdenum, tin, tungsten, or lead. The two least abundant rare earth elements (thulium and lutetium) are nearly 200 times more common than gold. However, in contrast to the ordinary base and precious metals, rare earth elements have very little tendency to become concentrated in exploitable ore deposits. Consequently, most of the world's supply of rare earth elements comes from only a handful of sources. Furthermore, the rare earth metals are all quite chemically similar to each other, and they are thus quite difficult to separate into quantities of the pure elements.
Differences in abundances of individual rare earth elements in the upper continental crust of the Earth represent the superposition of two effects, one nuclear and one geochemical. First, the rare earth elements with even atomic numbers (58Ce, 60Nd, ...) have greater cosmic and terrestrial abundances than the adjacent rare earth elements with odd atomic numbers (57La, 59Pr, ...). Second, the lighter rare earth elements are more incompatible (because they have larger ionic radii) and therefore more strongly concentrated in the continental crust than the heavier rare earth elements. In most rare earth ore deposits, the first four rare earth elements – lanthanum, cerium, praseodymium, and neodymium – constitute 80% to 99% of the total amount of rare earth metal that can be found in the ore.

Mantle

The mass-abundance of the eight most abundant elements in the Earth's mantle (see main article above) is approximately: oxygen 45%, magnesium 23%, silicon 22%, iron 5.8%, calcium 2.3%, aluminum 2.2%, sodium 0.3%, potassium 0.3%.
The mantle differs in elemental composition from the crust in having a great deal more magnesium and significantly more iron, while having much less aluminum and sodium.
Core
Due to mass segregation, the core of the Earth is believed to be primarily composed of iron (88.8%), with smaller amounts of nickel (5.8%), sulfur (4.5%), and less than 1% trace elements.[12]
Ocean

The most abundant elements in the ocean by proportion of mass in percent are oxygen (85.84), hydrogen (10.82), chlorine (1.94), sodium (1.08), magnesium (0.1292), sulfur (0.091), calcium (0.04), potassium (0.04), bromine (0.0067), carbon (0.0028), and boron  (0.00043).
Atmosphere
The order of elements by volume-fraction (which is approximately molecular mole-fraction) in the atmosphere is nitrogen (78.1%), oxygen (20.9%),[14] argon (0.96%), followed by (in uncertain order) carbon and hydrogen because water vapor and carbon dioxide, which represent most of these two elements in the air, are variable components.   Sulfur, phosphorus, and all other elements are present in significantly lower proportions.
According to the abundance curve graph (above right), argon, a significant if not major component of the atmosphere, does not appear in the crust at all. This is because the atmosphere has a far smaller mass than the crust, so argon remaining in the crust contributes little to mass-fraction there, while at the same time buildup of argon in the atmosphere has become large enough to be significant.

Urban soils
For a complete list of the abundance of elements in urban soils, see Abundances of the elements (data page)#Urban soils.
Human body

By mass, human cells consist of 65–90% water (H2O), and a significant portion of the remainder is composed of carbon-containing organic molecules. Oxygen therefore contributes a majority of a human body's mass, followed by carbon. Almost 99% of the mass of the human body is made up of six elements: hydrogen (H),  carbon (C), nitrogen (N), oxygen (O),  calcium (Ca), and phosphorus (P). The next 0.75% is made up of the next five elements: potassium (K), sulfur (S), chlorine (Cl), sodium (Na), and magnesium (Mg).  CHNOPS for short. Only 17 elements are known for certain to be necessary to human life, with one additional element (fluorine) thought to be helpful for tooth enamel strength. A few more trace elements may play some role in the health of mammals. Boron and silicon are notably necessary for plants but have uncertain roles in animals. The elements aluminium and silicon, although very common in the earth's crust, are conspicuously rare in the human body.[15]
Below is a periodic table highlighting nutritional elements.[16]

Nutritional elements in the periodic tableHHeLiBeBCNOFNeNaMgAlSiPSClArKCaScTiVCrMnFeCoNiCuZnGaGeAsSeBr
KrRbSrYZrNbMoTcRuRhPdAgCdInSnSbTeIXeCsBaLa*HfTaWReOsIrPtAuHgTlPbBiPoAtRnFrRaAc**RfDbSgBhHsMtDsRgCnNhFlMcLvTsOg*CePrNdPmSmEuGdTbDyHoErTmYbLu**ThPaUNpPuAmCmBkCfEsFmMdNoLr

The four basic organic elementsQuantity elementsEssential trace elementsDeemed essential trace element by U.S., not by European UnionSuggested function from deprivation effects or active metabolic handling, but no clearly-identified biochemical function in humansLimited circumstantial evidence for trace benefits or biological action in mammalsNo evidence for biological action in mammals, but essential in some lower organisms.
(In the case of lanthanum, the definition of an essential nutrient as being indispensable and irreplaceable is not completely applicable due to the extreme similarity of the lanthanides. The early lanthanides up to Sm are known to stimulate the growth of various lanthanide-using organisms.)[17]
See also
Abundances of the elements (data page)
Abundance of elements in Earth's crust
Natural abundance (isotopic abundance)
Goldschmidt classification
Primordial nuclide

Footnotes

Notes

Notations

Cite uses deprecated parameter |dead-url= (help)

 (only correct for the twenty most  common elements)

 Lists of elemental abundances for the Universe, Sun, meteorites, Earth, ocean, streamwater, etc.