Skip to content

Atom Counter

Enter a chemical formula and see exactly how many atoms of each element it contains.

Supports subscripts, parentheses, brackets, nested groups, hydrates, and common chemical formula notation.

Try:

Atom count

Ca(OH)₂

5 atoms total

Atom count
ElementAtoms
Ca1
O2
H2

Different elements: 3

Total atoms: 5

Count a specific element

Oxygen: 2 atoms

How it works

From formula to atom count

  1. Read the formula

    Identify each element and its subscript.

  2. Expand groups

    For example, (OH)₂ contains O₂ and H₂.

  3. Count the atoms

    Add the atoms from every part of the formula.

  4. Apply a coefficient

    If the formula starts with a coefficient such as 2H₂O, multiply the complete formula count by 2.

Worked example: Ca(OH)₂

  • Ca = 1
  • O = 2 × 1 = 2
  • H = 2 × 1 = 2

Total = 5 atoms

What is an atom counter?

An atom counter reads a chemical formula and tells you how many atoms of each element it contains, plus the total number of atoms.

For example, Ca(OH)₂ contains Ca = 1, O = 2, H = 2, for a total of 5 atoms. Parentheses, brackets, hydrates, and coefficients are included automatically.

Concepts

Read formulas like a counter

Subscripts tell you how many atoms

H₂O contains 2 hydrogen atoms and 1 oxygen atom. Total = 3 atoms.

Parentheses multiply a group

Ca(OH)₂ means the OH group occurs twice: Ca = 1, O = 2, H = 2.

Coefficients multiply the whole formula

2H₂O contains twice as many atoms as H₂O: H = 4, O = 2, total = 6.

Total atoms vs different elements

C₆H₁₂O₆ contains 24 atoms in total but only 3 different elements: C, H and O.

Examples

Try an example

Example formulas with total atom counts
FormulaAtoms
3 atoms
3 atoms
5 atoms
17 atoms
24 atoms
21 atoms
6 atoms

Worked examples

More Chemical Formula Atom Counting Examples

These examples show how to count atoms in larger formulas, condensed organic groups, coefficients, and hydrates.

A standard molecular formula: read each subscript directly.

C₈H₁₂N₄O₃
ElementCalculationAtoms
C8
H12
N4
O3
Total8 + 12 + 4 + 327

Butane written as connected CH₃ and CH₂ groups; add each element across every group.

CH₃CH₂CH₂CH₃
ElementCalculationAtoms
C1 + 1 + 1 + 14
H3 + 2 + 2 + 310
Total4 + 1014

The coefficient 3 outside the parentheses multiplies every atom in the formula.

3(NH₄)₂Cr₂O₇
ElementCalculationAtoms
N2 × 36
H8 × 324
Cr2 × 36
O7 × 321
Total6 + 24 + 6 + 2157

In a hydrate, the water after the middle dot is added to the main formula.

CuSO₄·5H₂O
ElementCalculationAtoms
Cu1
S1
O4 + 59
H5 × 210
Total1 + 1 + 9 + 1021

How to Count Atoms in Condensed Chemical Formulas

Some formulas, especially organic ones, are written as connected groups such as CH₃, CH₂, and CH₃. These are called condensed formulas.

Count each group separately, then add the atoms of the same element across the whole formula. Every symbol still counts, even when it appears several times.

For example, CH₃CH₂CH₂CH₃ is butane. Count carbon in each group: 1 + 1 + 1 + 1 = 4. Count hydrogen in each group: 3 + 2 + 2 + 3 = 10. The formula contains 14 atoms in total.

Worked example: CH₃CH₂CH₂CH₃

  • C = 1 + 1 + 1 + 1 = 4
  • H = 3 + 2 + 2 + 3 = 10

Total = 4 + 10 = 14 atoms

Practice

Practice Counting Atoms in Chemical Formulas

Work through five formulas one at a time. Enter the atoms of each element and the total, check each answer, then see your score.

Question 1 of 5

Easy

H₂SO₄

Enter the number of atoms for each element.

FAQ

Frequently asked questions

How do I count atoms in a chemical formula?

Type the formula and read the table: each row shows one element and how many atoms of it the formula contains, with the total underneath. Parentheses, brackets, hydrates, and leading coefficients are all counted.

How many atoms are in H₂O?

3 atoms: 2 hydrogen and 1 oxygen.

How many atoms are in Ca(OH)₂?

5 atoms: Ca = 1, O = 2, H = 2. The subscript 2 outside the parentheses doubles the whole OH group.

What does a subscript mean in a chemical formula?

A subscript tells you how many atoms of the element or group immediately before it occur in the formula. H₂ means 2 hydrogen atoms; (OH)₂ means the OH group occurs twice.

What does a coefficient mean?

A coefficient multiplies the whole formula. 2H₂O is two water units: H = 4, O = 2, total = 6 atoms. Subscripts belong to the formula; coefficients multiply it.

How do I count atoms in parentheses?

Multiply everything inside the parentheses by the number outside them. In Ca(OH)₂ the 2 applies to both O and H, giving O = 2 and H = 2.

Can I count atoms in hydrates?

Yes. Enter hydrates with a middle dot, period, or asterisk, for example CuSO₄·5H₂O. The water part is expanded completely: Cu = 1, S = 1, O = 9, H = 10, total = 21 atoms.

What is the difference between total atoms and different elements?

Total atoms is the sum of every atom. Different elements is how many element types appear. C₆H₁₂O₆ has 24 total atoms but only 3 different elements: C, H and O.

Is 2H₂O the same as H₂O?

No. H₂O is one water unit with 3 atoms. 2H₂O is two water units with 6 atoms. The coefficient changes the amount, never the substance.

Why does capitalization matter in chemical formulas?

Element symbols are case-sensitive: Co is cobalt, CO is carbon plus oxygen, and lowercase co matches no element. One letter changes the entire substance.

How many hydrogen atoms are in CH₃CH₂CH₂CH₃?

10 hydrogen atoms. Add the H count in each group: 3 + 2 + 2 + 3 = 10. The formula also has 4 carbon atoms, for 14 atoms in total.

How do I count atoms in a condensed formula?

Count each connected group, such as CH₃ or CH₂, separately, then add the atoms of each element across the whole formula. In CH₃CH₂CH₂CH₃ there are 4 carbon atoms and 3 + 2 + 2 + 3 = 10 hydrogen atoms.