Chemical Names and Formulas

How do you name a compound and write its formula?

BeginnerFoundationsLast reviewed 5 October 2026

What is it?

Every compound has a formula and a name. The formula shows which elements are present and in what ratio; the name says the same thing in words. NaCl\ce{NaCl} is sodium chloride; COX2\ce{CO2} is carbon dioxide. Chemists around the world follow the same naming rules, set by IUPAC (the International Union of Pure and Applied Chemistry), so a name means exactly one substance.

There are two main families, named in different ways:

  • Ionic compounds, made of a metal (or the ammonium ion) combined with a non-metal: name the ions. Example: MgClX2\ce{MgCl2}, magnesium chloride.
  • Molecular (covalent) compounds, made of non-metals only: use Greek prefixes to count the atoms. Example: NX2OX4\ce{N2O4}, dinitrogen tetroxide.

Key idea

An ionic compound has no overall charge: the positive charges of the cations exactly cancel the negative charges of the anions. That single rule lets you write the formula of any ionic compound from its name.

Why does it matter?

  • It’s the language of chemistry. Equations, labels, recipes and safety data sheets all use formulas and names.
  • Safety. Sodium chloride is table salt; sodium chlorate is a weedkiller and strong oxidizer. One syllable separates them.
  • Calculations depend on it. You can’t find a molar mass or balance an equation without the correct formula.

How does it work?

1. Common ions

You will meet these ions again and again:

Positive ions (cations)Negative ions (anions)
HX+\ce{H+} hydrogen, NaX+\ce{Na+} sodium, KX+\ce{K+} potassium, AgX+\ce{Ag+} silverFX−\ce{F-} fluoride, ClX−\ce{Cl-} chloride, BrX−\ce{Br-} bromide, IX−\ce{I-} iodide
NHX4X+\ce{NH4+} ammoniumOHX−\ce{OH-} hydroxide, NOX3X−\ce{NO3-} nitrate, HCOX3X−\ce{HCO3-} hydrogencarbonate
MgX2+\ce{Mg^2+} magnesium, CaX2+\ce{Ca^2+} calcium, BaX2+\ce{Ba^2+} barium, ZnX2+\ce{Zn^2+} zincOX2−\ce{O^2-} oxide, SX2−\ce{S^2-} sulfide
AlX3+\ce{Al^3+} aluminiumSOX4X2−\ce{SO4^2-} sulfate, COX3X2−\ce{CO3^2-} carbonate
FeX2+\ce{Fe^2+} iron(II), FeX3+\ce{Fe^3+} iron(III)POX4X3−\ce{PO4^3-} phosphate, NX3−\ce{N^3-} nitride
CuX+\ce{Cu+} copper(I), CuX2+\ce{Cu^2+} copper(II)CHX3COOX−\ce{CH3COO-} ethanoate (acetate)

Groups of atoms that carry a charge together, such as SOX4X2−\ce{SO4^2-}, are polyatomic ions.

2. Naming ionic compounds

  • Name the cation first, then the anion: KBr\ce{KBr} is potassium bromide.
  • A simple anion from one element ends in -ide: chloride, oxide, sulfide.
  • Most polyatomic anions containing oxygen end in -ate: sulfate, nitrate, carbonate.
  • A metal that can form more than one ion (many transition metals) gets a Roman numeral for its charge: FeClX2\ce{FeCl2} is iron(II) chloride; FeClX3\ce{FeCl3} is iron(III) chloride.
  • No prefixes are used: CaClX2\ce{CaCl2} is calcium chloride, not calcium dichloride.

3. Writing ionic formulas

  1. Write the two ions with their charges.
  2. Choose the smallest numbers of each ion that make the total charge zero.
  3. Write the numbers as subscripts (leave out 1). Put a polyatomic ion in brackets if you need more than one of it: Ca(OH)X2\ce{Ca(OH)2}, (NHX4)X2SOX4\ce{(NH4)2SO4}.

4. Naming molecular compounds

Use a Greek prefix for the number of each kind of atom, and end the second element with -ide:

NumberPrefixNumberPrefix
1mono6hexa
2di7hepta
3tri8octa
4tetra9nona
5penta10deca
  • “Mono” is not used for the first element: CO\ce{CO} is carbon monoxide, not monocarbon monoxide.
  • The final “a” or “o” of the prefix is dropped before “oxide”: monoxide, tetroxide, pentoxide.

Examples: COX2\ce{CO2} carbon dioxide, SOX3\ce{SO3} sulfur trioxide, NX2OX5\ce{N2O5} dinitrogen pentoxide, SFX6\ce{SF6} sulfur hexafluoride. Some molecules keep common names: HX2O\ce{H2O} is water, NHX3\ce{NH3} is ammonia and CHX4\ce{CH4} is methane.

5. Common acids

Acids are named by tradition: HCl\ce{HCl} hydrochloric acid, HNOX3\ce{HNO3} nitric acid, HX2SOX4\ce{H2SO4} sulfuric acid, HX3POX4\ce{H3PO4} phosphoric acid, HX2COX3\ce{H2CO3} carbonic acid and CHX3COOH\ce{CH3COOH} ethanoic (acetic) acid.

Think of it like this

Think of charges as weights on a see-saw that must balance exactly. To balance AlX3+\ce{Al^3+} (3 units on one side) against OX2−\ce{O^2-} (2 units on the other), the smallest balanced load is two aluminium ions (6 units) against three oxide ions (6 units). So aluminium oxide is AlX2OX3\ce{Al2O3}.

More precisely

The Roman numeral is the oxidation state of the metal (see Redox Reactions). Older names used endings instead, such as ferrous (FeX2+\ce{Fe^2+}) and ferric (FeX3+\ce{Fe^3+}); you may still see them on old bottles. Hydrates include water in the crystal: CuSOX4 ⋅ 5 HX2O\ce{CuSO4.5H2O} is copper(II) sulfate pentahydrate. IUPAC prefers “hydrogencarbonate” to the older “bicarbonate”.

Visualise it

Flowchart. Does the compound contain a metal or the ammonium ion? If yes, it is ionic: name the cation, adding a Roman numeral if the metal forms more than one ion, then name the anion, ending in -ide or -ate; no prefixes; example FeCl3, iron(III) chloride. If no, it is molecular: use Greek prefixes for the number of atoms, never mono on the first element, and end in -ide; example N2O5, dinitrogen pentoxide.
Ionic or molecular? Decide first; the rules for naming follow.

Worked example

Worked example: Formula from a name: aluminium oxide

Question: Write the formula of aluminium oxide.

  1. Ions: AlX3+\ce{Al^3+} and OX2−\ce{O^2-}.

  2. The smallest whole-number total that both 3 and 2 divide into is 6, so use 2 aluminium ions and 3 oxide ions:

    2×(+3)+3×(−2)=02 \times (+3) + 3 \times (-2) = 0
  3. Formula: AlX2OX3\ce{Al2O3}.

Worked example: A polyatomic ion: calcium nitrate

Question: Write the formula of calcium nitrate.

  1. Ions: CaX2+\ce{Ca^2+} and NOX3X−\ce{NO3-}. Two nitrate ions balance one calcium ion: (+2)+2×(−1)=0(+2) + 2 \times (-1) = 0.
  2. Two nitrate ions need brackets: Ca(NOX3)X2\ce{Ca(NO3)2}. The subscript 2 applies to the whole NOX3\ce{NO3} group, so the formula contains 1 Ca, 2 N and 6 O.

Worked example: Name from a formula: FeCl₃

Question: Name FeClX3\ce{FeCl3}.

  1. Iron forms more than one ion, so find its charge. Three chloride ions give 3×(−1)=−33 \times (-1) = -3.
  2. The compound is neutral, so iron is +3+3: iron(III) chloride.

Worked example: Naming a molecular compound

Question: Name PX4OX10\ce{P4O10} and write the formula of nitrogen trifluoride.

  1. Two non-metals, so use prefixes: 4 = tetra, 10 = deca. PX4OX10\ce{P4O10} is tetraphosphorus decoxide.
  2. Nitrogen trifluoride: no prefix on nitrogen means 1, tri means 3: NFX3\ce{NF3}.

Common mistake

Common mistake: Using prefixes for ionic compounds

MgClX2\ce{MgCl2} is magnesium chloride, not magnesium dichloride. The charges already fix the ratio, so ionic names never use prefixes. Prefixes are only for compounds of non-metals.

Common mistake: Mixing up -ide and -ate

Sodium sulfide is NaX2S\ce{Na2S}; sodium sulfate is NaX2SOX4\ce{Na2SO4}. “-ide” usually means a single element; “-ate” means a polyatomic ion with oxygen.

Common mistake: Forgetting brackets, or writing charges in the formula

Calcium hydroxide is Ca(OH)X2\ce{Ca(OH)2}, not CaOHX2\ce{CaOH2}, which would mean one O and two H. And the charges are used to work out the formula but are not written in it: NaCl\ce{NaCl}, not NaX+ClX−\ce{Na+Cl-}.

Notation note

  • The Roman numeral follows the metal name directly, with no space: iron(III) chloride.
  • A charge is written as a superscript with the number first, then the sign: MgX2+\ce{Mg^2+} and SOX4X2−\ce{SO4^2-}.

Remember this

Remember this

  • Metal (or NHX4X+\ce{NH4+}) + non-metal: ionic. Name the cation, then the anion; no prefixes.
  • Roman numerals give the charge of metals that form more than one ion: iron(II), iron(III), copper(II).
  • -ide: one element (chloride, oxide). -ate: polyatomic ion with oxygen (sulfate, nitrate).
  • Write ionic formulas so the charges add to zero; bracket a polyatomic ion used more than once.
  • Non-metals only: molecular. Use mono, di, tri, tetra…; no “mono” on the first element.

Test yourself

Check your understanding before moving on.

Flashcards

Chemical Names and Formulas: Flashcards

10 cards

  1. Question
    How do you tell an ionic compound from a molecular one by its formula?
    Answer

    Ionic: contains a metal (or NHX4X+\ce{NH4+}). Molecular: non-metals only.

  2. Question
    Give the formula and charge of the sulfate, nitrate, carbonate and hydroxide ions.
    Answer

    SOX4X2−\ce{SO4^2-}, NOX3X−\ce{NO3-}, COX3X2−\ce{CO3^2-}, OHX−\ce{OH-}

  3. Question
    Give the formula and charge of the ammonium and phosphate ions.
    Answer

    NHX4X+\ce{NH4+} and POX4X3−\ce{PO4^3-}

  4. Question
    Write the formula of aluminium oxide.
    Answer

    AlX2OX3\ce{Al2O3}: 2 × (+3) + 3 × (−2) = 0

  5. Question
    Write the formula of calcium hydroxide.
    Answer

    Ca(OH)X2\ce{Ca(OH)2}: brackets because there are two hydroxide ions.

  6. Question
    Name FeClX3\ce{FeCl3}.
    Answer

    Iron(III) chloride: three ClX−\ce{Cl-} give −3, so iron is +3.

  7. Question
    What does -ide mean, and what does -ate mean?
    Answer

    -ide: an anion of one element (chloride, oxide). -ate: a polyatomic anion containing oxygen (sulfate, nitrate).

  8. Question
    List the Greek prefixes from 1 to 6.
    Answer

    mono, di, tri, tetra, penta, hexa

  9. Question
    Name NX2OX5\ce{N2O5} and CO\ce{CO}.
    Answer

    Dinitrogen pentoxide; carbon monoxide (no "mono" on the first element).

  10. Question
    Give the formulas of hydrochloric, nitric and sulfuric acid.
    Answer

    HCl\ce{HCl}, HNOX3\ce{HNO3}, HX2SOX4\ce{H2SO4}

Quiz

Chemical Names and Formulas: Quiz

7 questions

  1. Question 1EasyWhat is the correct name of MgCl₂?
    Show answer

    Answer: magnesium chloride

    MgCl₂ is ionic (magnesium is a metal), so no prefixes are used. Magnesium forms only Mg²⁺, so no Roman numeral is needed either.

  2. Question 2EasyWhat is the formula of sodium sulfate?
    Show answer

    Answer: Na₂SO₄

    Na⁺ and SO₄²⁻: two sodium ions balance one sulfate ion, 2 × (+1) + (−2) = 0. Na₂S is sodium sulfide.

  3. Question 3EasyWhat is the formula of aluminium oxide?
    Show answer

    Answer: Al₂O₃

    Al³⁺ and O²⁻: 2 × (+3) + 3 × (−2) = 0, so Al₂O₃.

  4. Question 4MediumWhat is the name of CuO?
    Show answer

    Answer: copper(II) oxide

    Oxide is O²⁻, so copper must be +2 for the compound to be neutral. The Roman numeral goes straight after the metal: copper(II) oxide.

  5. Question 5MediumWhat is the formula of ammonium phosphate?
    Show answer

    Answer: (NH₄)₃PO₄

    NH₄⁺ and PO₄³⁻: three ammonium ions balance one phosphate ion, 3 × (+1) + (−3) = 0. The ammonium ion is bracketed because there are three of it.

  6. Question 6MediumWhat is the name of N₂O₄?
    Show answer

    Answer: dinitrogen tetroxide

    Nitrogen and oxygen are both non-metals, so use prefixes: di (2) nitrogen, tetra (4) oxygen, with the "a" dropped before "oxide".

  7. Question 7HardWhich formula is written correctly?
    Show answer

    Answer: Ca(OH)₂

    Ca²⁺ needs two OH⁻ ions. The brackets show that the subscript 2 applies to the whole OH group; CaOH₂ would mean one O and two H.

Notes and downloads

  • Worksheet

    Chemical Names and Formulas Worksheet

    8 questions on naming ionic and molecular compounds, writing formulas with polyatomic ions and Roman numerals, and common acids. Answer key included.

    BeginnerFree

References

  1. Brown, T. L.; LeMay, H. E., Jr.; Bursten, B. E.; Murphy, C. J.; Woodward, P. M.; Stoltzfus, M. W. Chemistry: The Central Science, 15th ed.; Pearson, 2022.

Spotted a mistake? Let us know and we'll fix it.