molecalculator

Moles & Molar Mass

Diatomic Molecules: Pairs of Atoms Explained

Calculator No. 01-5226 · Updated · Formula and assumptions shown below

Molar mass of diatomic molecule 28.014 g/mol
Molecules in one mole
6.022 × 1023 molecules/mol
Result, rounded to a whole number
Atomic mass of atom A
14.007 g/mol
Set in the form below
Atomic mass of atom B
14.007 g/mol
Set in the form below
You enter
Atomic mass of atom A (g/mol), Atomic mass of atom B (g/mol)
You get
Molar mass of diatomic molecule (g/mol), Molecules in one mole (molecules/mol)
Rounding
3 dp · 0 dp

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

Molecules made of pairs of atoms are called diatomic molecules: each molecule contains exactly two atoms bonded together. This page’s calculator estimates the molar mass of a diatomic molecule from the atomic masses of its two atoms, returning the result in g/mol.

Formula

For a molecule containing one atom of A and one atom of B, its molar mass is the sum of the two atomic masses:

M = mA + mB

  • M is the molar mass of the diatomic molecule, in grams per mole (g/mol).
  • mA and mB are the molar masses of the individual atoms, in g/mol.

For a homonuclear molecule such as nitrogen gas, N2, the two atoms have the same atomic mass, so M = 2mA. The calculator’s second output is Avogadro’s constant, exactly 6.02214076 × 1023 entities per mole. It is a reference value: the molecule’s count in a sample also depends on how many moles are present.

Worked Example

The defaults represent a nitrogen molecule, N2. Each nitrogen atom has an abridged standard atomic weight of 14.007 g/mol.

  1. Mass contribution from the first atom: 14.007 g/mol.
  2. Mass contribution from the second atom: 14.007 g/mol.
  3. Molar mass: M = 14.007 + 14.007 = 28.014 g/mol.

The calculator displays 28.014 g/mol. One mole contains 6.02214076 × 1023 molecules, regardless of whether the molecules are N2 or another substance.

Assumptions

  • The molecule contains exactly two atoms, one with the entered atomic mass A and one with the entered atomic mass B.
  • Entered values are atomic molar masses in g/mol, not masses for a whole molecule or isotopic mass numbers.
  • The atomic weights used for examples are abridged standard atomic weights; an actual sample’s isotopic composition can change its precise average molar mass.
  • The Avogadro constant output is an exact reference constant, not a calculated sample count.

What “Diatomic” Means

The prefix di- means two, and “atomic” refers to atoms. A diatomic molecule therefore has two atoms joined in a molecular unit. The atoms may be the same element or different elements:

  • Homonuclear diatomic molecules contain two atoms of the same element, such as H2, N2, O2, F2, Cl2, Br2, and I2.
  • Heteronuclear diatomic molecules contain atoms of different elements, such as carbon monoxide (CO), hydrogen chloride (HCl), and hydrogen fluoride (HF).

In ordinary elemental chemistry, the familiar seven elements that commonly occur as diatomic molecules are hydrogen, nitrogen, oxygen, fluorine, chlorine, bromine, and iodine. This is a useful list to memorize, but it is not a rule that every sample of each element consists only of pairs under every condition. Temperature, pressure, phase, and chemical environment matter. For example, oxygen is commonly O2 in air, while ozone, O3, is a different molecular form of oxygen.

Why Some Elements Form Pairs

Atoms form chemical bonds when an arrangement of electrons and nuclei has lower energy than the separated atoms. In many familiar diatomic molecules, sharing electrons helps the bonded pair reach a more favorable electronic structure. The details differ by element: a simple “atoms want a full outer shell” explanation is a useful introductory model, not a complete account of bonding.

Nitrogen illustrates why bond type matters. The two nitrogen atoms in N2 share three pairs of electrons in a strong triple bond. Oxygen gas, O2, has a different bonding arrangement, including two unpaired electrons in its molecular orbital description. Both are diatomic, but their bonding and chemical behavior are not interchangeable.

Whether a substance is diatomic is also distinct from whether it is an element. N2 is a molecule made from one element; CO is a molecule made from two elements. Conversely, not every elemental substance is diatomic: many metals form extended solid structures, and noble gases commonly consist of individual atoms rather than ordinary stable diatomic molecules.

How the Molar-Mass Calculation Works

A chemical formula tells you how many atoms of each element are in a molecule. For a two-atom formula AB, add one atomic molar mass for A and one for B. For A2, count the same element twice. Atomic weights are expressed relative to carbon-12 and, for natural elements, commonly represent an average over naturally occurring isotopes. Standard values such as N = 14.007 and O = 15.999 g/mol are suitable for many general calculations.

Examples show how the same addition handles different pairs:

  • Hydrogen gas, H2: 1.008 + 1.008 = 2.016 g/mol.
  • Oxygen gas, O2: 15.999 + 15.999 = 31.998 g/mol.
  • Carbon monoxide, CO: 12.011 + 15.999 = 28.010 g/mol.
  • Hydrogen chloride, HCl: 1.008 + 35.45 = 36.458 g/mol.

These values use abridged standard atomic weights. Isotope-specific calculations may require exact isotopic masses instead. The calculator treats the two entered values as the atoms’ molar masses and adds them; it does not identify a chemical formula, determine whether a proposed pair is stable, or account for an unusual isotopic mixture.

Common Confusions and Limits

“Diatomic” describes the number of atoms in a molecule, not the number of elements in the substance. A molecule of N2 has two atoms but only one element. A molecule of CO also has two atoms, but they are different elements. A compound can be diatomic, and an elemental substance can be diatomic.

Another frequent mix-up is between a molecule and a mole. A molecule is one tiny chemical entity; a mole is a counting amount equal to 6.02214076 × 1023 specified entities. The calculator gives g/mol, which means grams per mole—not the mass in grams of one molecule. To find the mass of a sample, multiply its amount in moles by its molar mass.

Finally, not every pair of nearby atoms is a molecule. In a solid, atoms may be part of a large repeating lattice rather than separate two-atom units. A chemical formula can describe the simplest ratio in a solid without representing an individual molecule. The “pairs of atoms” definition applies specifically to molecular entities with two atoms.

Frequently Asked Questions

What are molecules made of two atoms called?
They are called diatomic molecules. The atoms may be identical, as in O2, or different, as in CO.

Which elements naturally exist as diatomic molecules?
The seven commonly taught elemental diatomic forms are H2, N2, O2, F2, Cl2, Br2, and I2. Their forms depend on conditions, so the list is a useful standard convention rather than a claim about every possible environment.

Is water a diatomic molecule?
No. A water molecule, H2O, contains three atoms: two hydrogen atoms and one oxygen atom. It is triatomic.

Is a diatomic molecule always made of one element?
No. N2 contains one element, but HCl contains hydrogen and chlorine. Both have two atoms per molecule.

How do you calculate the molar mass of a diatomic molecule?
Add the atomic molar masses for its two atoms, counting repeated atoms twice. For O2, for instance, add oxygen’s atomic mass to itself.

Related

Formula used
in a | Atomic mass of atom A | g/mol | 14.007 | 0
in b | Atomic mass of atom B | g/mol | 14.007 | 0
out mm | Molar mass of diatomic molecule | g/mol | a + b | 3
out molecules | Molecules in one mole | molecules/mol | 6.02214076e23 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →