Lelifi·tools

Formal Charge Calculator

Oxygen in a water molecule carries a formal charge of 0: 6 valence electrons minus 4 nonbonding electrons minus 2 bonds. The same arithmetic gives -1 for oxygen in hydroxide and +1 for nitrogen in ammonium. Enter three numbers to get the charge, the electrons assigned to the atom and an octet check.

Enter an atom's valence electrons, lone pairs and bonds to get its formal charge, the electron bookkeeping behind it and an octet check.

By the Lelifi editors ·

Key takeaways

Formal charge in three common casesOxygen in water6 - 4 - 20Nitrogen in ammonium5 - 0 - 4+1Oxygen in hydroxide6 - 6 - 1-1A bond short scores positive, an extra lone pair scores negative, and the usual arrangement scores zero.
Oxygen in water scores 0, nitrogen in ammonium scores +1, and oxygen in hydroxide scores -1.
Nitrate atom by atom, then the sumNitrogen+1O double bond0O single bond-1O single bond-1Total formal charge on the ion+1 + 0 - 1 - 1 = -1The total has to equal the charge on the ion. When it does not, one of the electron counts is wrong.
The nitrate atom charges are +1, 0, -1 and -1, which sum to the -1 charge on the ion.
On this page
  1. What a formal charge counts
  2. The formula, term by term
  3. Worked example: water, ammonia and ammonium
  4. Worked example: nitrate and sulfate
  5. How formal charge differs from oxidation state
  6. Using formal charges to pick a drawing
  7. Where the bookkeeping misleads
  8. What the calculator asks for

What a formal charge counts

A formal charge is a bookkeeping number, not a measured charge. It answers one narrow question about a Lewis structure: if every bonding pair of electrons were split evenly between the two atoms that share it, what charge would this atom appear to carry? OpenStax Chemistry 2e, section 7.4 calls the result hypothetical for that reason, and the caveat deserves to stay in view.

The number earns its place because most molecules can be drawn more than one way. Slide a lone pair into a bond and the atoms stay where they are while the electron count around two of them changes. Formal charge scores each drawing, and the lowest scores win. A structure with zeros on every atom is preferred over one that pushes a full negative charge onto an atom that has no business carrying it.

One rule ties the whole sheet together. Add the formal charges of every atom in a neutral molecule and the sum is zero. Do the same for an ion and the sum equals the charge printed on the ion. That check catches most arithmetic slips before they reach an exam answer.

The formula, term by term

The definition packs into one line: formal charge equals the valence electrons of the free atom, minus the electrons it holds in lone pairs, minus half of the electrons it shares in bonds. Each term counts electrons rather than pairs, so one lone pair adds 2 to the second term.

Half of the bonding electrons is the same as the number of bonds. That shortcut explains why textbook answers subtract a bond count and never touch the electron tally. A single bond shares 2 electrons and contributes 1, a double bond shares 4 and contributes 2, and a triple bond contributes 3. The calculator asks for bonds for that reason, and the field label says to count a double bond twice.

TermWhat to countOxygen in water
Valence electronsElectrons in the outer shell of the neutral atom6
Nonbonding electronsElectrons sitting in lone pairs on the atom4
BondsShared pairs, with a double bond counted twice2
Formal charge6 - 4 - 2 = 00

Valence counts for the elements that show up in most problems: hydrogen 1, boron 3, carbon 4, nitrogen 5, oxygen 6, fluorine 7, chlorine 7, bromine 7 and iodine 7. Silicon matches carbon at 4, phosphorus matches nitrogen at 5, and sulfur matches oxygen at 6. The element menu in the calculator fills the first field for you, and that field stays editable so you can score an element that is not on the list. PubChem's periodic table lists the group numbers behind those counts if you need to look one up.

Worked example: water, ammonia and ammonium

Water is the cleanest place to start. The oxygen atom holds two lone pairs, so 4 nonbonding electrons, and it forms two single bonds: 6 - 4 - 2 = 0. Each hydrogen holds no lone pair and forms one bond: 1 - 0 - 1 = 0. Four atoms, four zeros, and the total matches the neutral molecule.

Ammonia moves one lone pair and keeps the total at zero. Nitrogen holds a single lone pair, so 2 nonbonding electrons, and forms three bonds: 5 - 2 - 3 = 0. Each hydrogen scores 0 again, giving a neutral molecule with no formal charges anywhere.

Add a proton and the bookkeeping shifts. In ammonium the nitrogen spends its lone pair on a fourth bond, so it now holds 0 nonbonding electrons and 4 bonds: 5 - 0 - 4 = 1, which is written +1. The four hydrogens still score 0 and the total is +1, the charge on the ion. Hydronium follows the same pattern on oxygen: 6 - 2 - 3 = 1, or +1, with three hydrogens at 0 each.

Those results explain a pattern students meet early. An atom with its usual bonds and lone pairs scores 0, one that is a bond short scores positive, and one holding an extra lone pair scores negative.

Worked example: nitrate and sulfate

Nitrate is where the method earns its keep. The usual drawing gives nitrogen one double bond and two single bonds, so 4 bonds in total and no lone pair: 5 - 0 - 4 = 1, or +1. The doubly bonded oxygen holds two lone pairs and 2 bonds: 6 - 4 - 2 = 0. Each singly bonded oxygen holds three lone pairs and 1 bond: 6 - 6 - 1 = -1. The total is 1 + 0 - 1 - 1 = -1, the charge on the nitrate ion.

SpeciesAtomValenceNonbondingBondsFormal charge
Nitrate, NO3-Nitrogen504+1
Nitrate, NO3-Oxygen, double bond6420
Nitrate, NO3-Oxygen, single bond661-1
Sulfate, SO4 2-Sulfur, two double bonds6060
Sulfate, SO4 2-Oxygen, double bond6420
Sulfate, SO4 2-Oxygen, single bond661-1

Sulfate with two double bonds scores the same way. Sulfur carries 6 bonds and no lone pair: 6 - 0 - 6 = 0. The two doubly bonded oxygens score 0 each, the two singly bonded oxygens score -1 each, and the sum reads 0 + 0 + 0 - 1 - 1 = -2. Draw all four sulfur oxygen links as single bonds instead and sulfur scores 6 - 0 - 4 = 2, or +2, while all four oxygens score -1, giving 2 - 1 - 1 - 1 - 1 = -2. Both drawings add up correctly, and the one with the smaller charges is the better description of the ion.

That comparison is the whole point of the exercise. The sums are a check, not a verdict. Two valid drawings can both pass the sum test, and formal charge then decides between them.

How formal charge differs from oxidation state

Both numbers describe the same atom in the same drawing, and they rest on different assumptions about the shared electrons. The LibreTexts chapter on formal charges and resonance walks the two conventions side by side. Formal charge splits every bonding pair evenly, one electron to each atom. Oxidation state hands the whole pair to the more electronegative partner.

Atom and moleculeFormal chargeOxidation state
Oxygen in water0-2
Oxygen in hydroxide-1-2
Nitrogen in ammonia0-3
Carbon in methane0-4

The gap is widest where electronegativity differs most. Oxygen in water carries a formal charge of 0 because it owns 4 lone pair electrons plus 2 shared electrons, exactly its valence count, while its oxidation state is -2 because all four bonding electrons are assigned to it. Neither number is a measurement. Electron density on that oxygen is higher than on the hydrogens, yet no integer describes it, and both conventions are shortcuts built to make comparisons quick rather than accurate.

The practical split: use formal charge to compare Lewis structures of one molecule, and use oxidation state to track electrons in a redox reaction. Mixing them up produces answers that look tidy and fail the moment they are checked against a half reaction.

Using formal charges to pick a drawing

Four rules cover most choices between candidate structures, and they run in order rather than as a vote.

  1. Every atom that can hold an octet should hold one. A drawing that breaks the octet on a period 2 atom loses to one that does not, whatever the formal charges say.
  2. Prefer the drawing where all formal charges are zero.
  3. When zeros are impossible, prefer the smallest nonzero charges. A pair of +1 and -1 beats a pair of +2 and -2.
  4. When two drawings carry charges of the same size, put the negative charge on the more electronegative atom, and keep opposite charges on adjacent atoms instead of piling like charges together.

Nitrate shows the first rule overruling the third. A drawing with two double bonds and one single bond would give nitrogen 5 bonds and no lone pair, so 5 - 0 - 5 = 0, and it would leave one oxygen at +1 with two at -1. The catch is that nitrogen would then hold 10 electrons in its outer shell, which period 2 atoms cannot do, so that drawing is out before the charge count is consulted.

Sulfate sits on the other side of the same line. Sulfur is in period 3 and can expand its outer shell, which is why the drawing with two double bonds is accepted there and why the sulfate table above lists a formal charge of 0 on sulfur rather than +2. The octet rule decides which structures are allowed, and formal charge ranks the ones that remain.

Where the bookkeeping misleads

Carbon monoxide is the standard warning. Carbon holds one lone pair and a triple bond: 4 - 2 - 3 = -1. Oxygen holds one lone pair and the same triple bond: 6 - 2 - 3 = 1, or +1. A negative carbon beside a positive oxygen reads backwards, since oxygen pulls electrons harder. The measured dipole moment of the molecule is small, 0.122 debye, and its negative end is at carbon, so the even split lands on the right direction through crude reasoning.

The lesson is to treat formal charge as a comparison tool. It ignores electronegativity, ignores how polar a bond is in practice, and says nothing about where electron density sits. What it does well is rank alternative drawings of a single molecule, quickly, without a table of partial charges.

Two mechanical slips account for most wrong answers. Counting a lone pair as 1 electron instead of 2 halves the second term. Counting a double bond as 1 bond instead of 2 halves the third. Both errors push the answer in the positive direction, and the sum test catches them as soon as the atoms are added up.

What the calculator asks for

Three numbers go in. Pick the element to fill the valence count, or type a count directly for an element that is not on the menu. Enter the nonbonding electrons held by the atom, counting each lone pair as 2. Enter the bonds attached to the atom, counting a double bond as 2 and a triple bond as 3.

Line on screenWhat it shows
Formal chargeThe result, written with the sign first as +1, 0 or -1
Electrons assigned to the atomNonbonding electrons plus one electron from each bond
Electrons in the outer shellNonbonding electrons plus both electrons of every bond
Octet checkWhether that outer shell count is below 8, at 8, or above 8

The outer shell count gives a second use for the same three inputs. An atom with fewer than 8 electrons around it is short of an octet, which usually means the drawing is missing a bond or a lone pair. An atom with more than 8 is expanding its outer shell, which only period 3 and heavier elements can do. The working line shows the arithmetic with your own numbers, so a result that looks wrong can be traced back to the field that produced it. Everything runs in your browser, and nothing you type leaves the page.

Frequently asked questions

What is the formula for formal charge?

Formal charge equals valence electrons minus nonbonding electrons minus half of the bonding electrons. Since half of the bonding electrons is the bond count, the short form is valence minus lone pair electrons minus bonds, which for oxygen in water reads 6 - 4 - 2 = 0.

What is the formal charge of oxygen in water?

0. Oxygen holds 4 nonbonding electrons and 2 bonds, so 6 - 4 - 2 = 0, and each of the two hydrogens scores 1 - 0 - 1 = 0 as well.

What is the formal charge of nitrogen in ammonium?

+1. Nitrogen holds no lone pair and forms 4 bonds, so 5 - 0 - 4 = 1, and the four hydrogens contribute 0 each, which gives the ion its single positive charge.

What is the formal charge of oxygen in hydroxide?

-1. Oxygen holds three lone pairs, so 6 nonbonding electrons, and one bond: 6 - 6 - 1 = -1. The hydrogen scores 0, so the ion carries one negative charge.

Why do formal charges add up to the charge on an ion?

Because the count tracks the electrons each atom owns under an even split. Nitrate gives +1 on nitrogen, 0 on the doubly bonded oxygen and -1 on each singly bonded oxygen, and 1 + 0 - 1 - 1 = -1, which is the charge on the ion.

Is formal charge the same as oxidation state?

No. Formal charge splits each bonding pair evenly, while oxidation state gives the pair to the more electronegative atom. Oxygen in water has a formal charge of 0 and an oxidation state of -2, and both numbers describe the same atom.

How many bonds does a double bond count as?

Two. A double bond shares 4 electrons and half of 4 is 2, so the bond count is 2. A triple bond counts as 3 and a single bond as 1.

Can a formal charge come out as a fraction?

In a correct Lewis structure it is a whole number, because bonds and lone pairs hold pairs of electrons. A fractional result means a field was filled with an odd number of nonbonding electrons, or that a bond order was typed as electrons instead of bonds.

Which Lewis structure is best when two drawings both carry formal charges?

The one with the smaller nonzero charges, then the one that puts the negative charge on the more electronegative atom. The octet rule comes first: a drawing that breaks the octet on carbon, nitrogen, oxygen or fluorine is rejected before charge size is compared.

What is the formal charge of carbon in carbon monoxide?

-1. Carbon holds one lone pair and a triple bond, so 4 - 2 - 3 = -1, while oxygen scores 6 - 2 - 3 = 1, or +1, on the other end of the same triple bond.

What is the formal charge of sulfur in sulfate?

0 in the drawing with two double bonds, where sulfur holds 6 bonds and no lone pair, so 6 - 0 - 6 = 0. A drawing with four single bonds would leave sulfur at 6 - 0 - 4 = 2, or +2.

Does a formal charge of zero mean the atom is neutral inside the molecule?

It means the atom owns exactly its valence number of electrons under an even split. Real charge distribution differs, because a bond to a more electronegative atom pulls density away from an atom that still scores 0.

What is the formal charge of nitrogen in ammonia?

0. Nitrogen holds one lone pair and three bonds, so 5 - 2 - 3 = 0, and the three hydrogens score 0 each.

How do I check a whole molecule by hand?

Add the formal charges of every atom. A neutral molecule sums to 0, and an ion sums to its charge, so ammonium comes to 1 + 0 + 0 + 0 + 0 = 1 against a charge of +1.

Spotted a wrong number or a broken result?

More Everyday tools

See all Everyday tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.