Formal Charge Calculator – Valence Minus Lone Pairs and Bonds
Valence electrons, minus lone pairs and half the shared electrons — that is the formal charge.
The atom
🔒 Everything is calculated in your browser — nothing you enter leaves your device.
These presets load into the calculator above exactly like the built-in examples: the element fills in its valence electrons, and the charge is computed from the lone-pair and bond counts shown.
Advanced options — resonance and oxidation cross-checks
Work it as V − (N + B). Try the carbonate central carbon: V = 4, N = 0, B = 4, so the charge is 4 − (0 + 4) = 0. Try the single-bonded oxygen in the same ion: V = 6, N = 6, B = 1, so the charge is 6 − (6 + 1) = −1. Both match the table below.
Use the worked tables below to check a structure by hand, then confirm each atom with the calculator above.
The charge
The bookkeeping, line by line
How to read this
A formal charge of zero is the comfortable case. Here nitrogen holds four bonds and no lone pair — one electron fewer than a free nitrogen atom owns — so the bookkeeping hands it a +1. In NH4+ that is exactly right: the whole ion carries +1, and this nitrogen is where the accounts put it.
Pick an atom in a Lewis structure and this page does the bookkeeping: take the element’s valence electrons, subtract the electrons that stay home as lone pairs and half of the electrons it shares in bonds. What is left is the atom’s formal charge — the number that tells you whether a structure is sensible, which resonance form wins, and why the charges in a molecule always add up to the charge on the whole thing.
Key takeaways
- Formal charge is bookkeeping: valence electrons minus lone-pair electrons minus half the shared electrons.
- The formal charges in a structure always sum to the molecule’s overall charge — use that sum as your error check.
- Between resonance forms, prefer the one with charges closest to zero, and put any negative charge on the most electronegative atom.
Contents
- See the atom, then check the whole molecule
- Pairs well with this calculation
- Formal charge in three steps
- How the formal charge calculator works
- Going deeper
- Resonance: when one Lewis structure is not enough
- Drawing Lewis structures that formal charge can check
- Formal charge is not oxidation number — the cross-check table
- Frequently asked questions
See the atom, then check the whole molecule
The picture below is the calculator above, drawn. Dots on the ring are the lone electrons that stay on the atom; each spoke stands for one bond’s worth of shared electrons (a double bond counts as two spokes, a triple bond as three). Change the numbers and the picture redraws itself.
Nitrogen with four bonds and no lone pair: eight electrons shared, four of them credited to nitrogen, against the five it brought. The missing one is the +1.
The check that catches every mistake
Formal charges are bookkeeping, and bookkeeping has one golden rule: the formal charges on all the atoms of a molecule or ion must add up to that molecule or ion’s total charge. Neutral water? Every atom zero, sum zero. The ammonium ion NH4+? Four hydrogens at zero and one nitrogen at +1 — sum +1, matching the ion. If your charges do not add up, an electron has been dropped or double-counted somewhere, and the sum tells you before your teacher does. Try it below.
Whole-molecule charge check
Enter every atom of your structure, one row each, and the charge the whole thing should carry. Carbon monoxide is loaded as the example: carbon at -1 and oxygen at +1, summing to a neutral 0.
Pairs well with this calculation
The rest of the chemistry shelf — the masses and mixtures that formal charges help you draw.
Formal charge in three steps
Count what it brought
Find the element’s valence electrons — its group in the periodic table. That is what a neutral, unbonded atom of the element owns, and it is the number every formal charge is measured against.
Count what it keeps
Lone-pair electrons belong to the atom outright. Bonding electrons are shared, so the atom is credited with exactly half of them — one per bond, however strong the bond is. A double bond hands over two, a triple bond three.
Subtract, then check the sum
Formal charge = valence minus (lone electrons plus half the bonding electrons). Then do it for every atom and add them up: the total must equal the charge on the whole molecule or ion. If it does not, recount.
How the formal charge calculator works
formal charge = V – ( N + B / 2 )
The example on this page. Nitrogen in the ammonium ion, NH4+. Nitrogen brings V = 5. It has no lone pair, so N = 0. It makes four single bonds, so B = 8 bonding electrons and its share is 4. Formal charge = 5 – (0 + 4) = +1 — and since each hydrogen works out to 0, the four hydrogens and this nitrogen sum to +1, the charge on the ion.
An atom that keeps more than it brought. Oxygen in the hydroxide ion, OH-. Oxygen brings V = 6. It holds three lone pairs, so N = 6, and one bond, so its share is 1. Formal charge = 6 – (6 + 1) = -1. The hydrogen is 0, the sum is -1, and the accounts balance.
The famous uneven split. Carbon monoxide, CO, is drawn with a triple bond and one lone pair on each atom. Carbon: 4 – (2 + 3) = -1. Oxygen: 6 – (2 + 3) = +1. Neither is zero, yet the sum is 0, exactly right for a neutral molecule — a reminder that formal charges measure the drawing’s bookkeeping, not where the electrons truly sit.
Why B is always even. Electrons are shared in pairs, so the bonding electrons around an atom are twice its bond count: one bond 2, a double bond 4, a triple bond 6. That is why this page asks for the bond count and doubles it — there is no way to enter an odd B, and half of B is simply the bond count again, which is why the formula is often written V – N – bonds.
Going deeper
The formula pretends every bond is shared perfectly evenly — one electron to each partner, whatever the elements are. Reality is ruder: electrons lean toward the more electronegative atom, so in carbon monoxide the real charge distribution is far subtler than carbon -1 and oxygen +1 (the molecule’s tiny dipole actually points the other way). Formal charge also assumes lone pairs sit entirely on their atom, which is another polite fiction.
So why use it? Because the fiction is consistent, and consistency is what makes it useful. Formal charge is the fastest test of whether a Lewis structure is even possible, it picks the best resonance form (the one with charges closest to zero, and negative charges on the more electronegative atoms), and its sum rule catches counting errors instantly. Treat it as double-entry bookkeeping for electrons: not a photograph of reality, but the ledger that keeps your drawings honest. For the opposite bookkeeping convention — handing both bonding electrons to the more electronegative partner — look at oxidation numbers instead.
Most atoms you will meet carry their lone electrons in pairs, but the count N is electrons, not pairs, and it can be odd. Nitric oxide, NO, has an unpaired electron; on its nitrogen the count gives 5 – (3 + 2) = 0 and on its oxygen 6 – (5 + 1) = 0 — a radical whose formal charges still balance to zero. This page accepts odd lone-electron counts for exactly that reason.
Elements in the third period and below, such as sulfur and phosphorus, are often drawn with more than eight electrons around them — sulfate’s sulfur is commonly drawn with six bonds and no lone pair, giving 6 – (0 + 6) = 0, while a stricter all-single-bond drawing gives the sulfur +2 and each oxygen -1, the same -2 sum either way. Both drawings obey the sum rule, because the sum rule only cares that no electron was invented or lost. Enter bond counts up to 6 here to test those structures for yourself.
Resonance: when one Lewis structure is not enough
Some molecules can be drawn in more than one valid Lewis structure, and formal charge is the tool that ranks them. The carbonate ion is the textbook case: carbon in the centre, three oxygens around it, one double bond and two single bonds, but the double bond could sit on any of the three oxygens. All three drawings have identical formal charges, so none is the true structure: the real ion is the average of the three, with all three carbon–oxygen bonds equal in length, between a single and a double bond. The resonance hybrid is not a molecule flickering between forms; it is one structure whose bonding is spread out, and formal charge describes the drawings, not three separate molecules.
| Atom in CO3²− | V | N | B | Formal charge |
|---|---|---|---|---|
| Central carbon | 4 | 0 | 4 | 0 |
| Double-bonded oxygen | 6 | 4 | 2 | 0 |
| Single-bonded oxygen (each of two) | 6 | 6 | 1 | −1 |
| Sum over the ion | −2 |
Ozone, O3, makes the same point with a neutral molecule: the central oxygen carries +1, the single-bonded oxygen −1, and the double-bonded oxygen 0, summing to zero as a neutral molecule must. Check it atom by atom: the central oxygen has 6 valence electrons, 2 lone-pair electrons and 3 bonds, so 6 − (2 + 3) = +1; the single-bonded oxygen has 6, 6 and 1, so 6 − (6 + 1) = −1; the double-bonded oxygen has 6, 4 and 2, so 6 − (4 + 2) = 0. The two resonance forms swap which end oxygen is single-bonded, and the real molecule has both bonds equal. The ammonium ion, NH4+, is simpler: nitrogen with 5 valence electrons, no lone pairs and 4 bonds gives 5 − (0 + 4) = +1, and the four hydrogens are each 0, so the sum is +1, the ion’s charge.
When candidate structures differ in formal charge, three rules rank them. First, prefer the structure whose charges are closest to zero: a form with charges of +1 and −1 beats a form with +2 and −2. Second, put any negative charge on the most electronegative atom present, and any positive charge on the least electronegative atom: a negative charge on oxygen beats the same charge on carbon. Third, keep like charges apart and opposite charges adjacent where the geometry allows. These rules are preferences, not laws: a structure that violates them can still be a minor contributor, but the dominant contributor obeys them, and the calculator’s atom-by-atom table lets you score every candidate before choosing.
Drawing Lewis structures that formal charge can check
Formal charge only works on a finished drawing, so the drawing itself has to follow the rules. Count the total valence electrons first, from every atom’s group number, and adjust for the ion’s charge: add one electron per unit of negative charge, subtract one per unit of positive charge. Place the least electronegative atom in the centre, with hydrogen never central, because hydrogen makes only one bond. Connect every outer atom to the centre with a single bond, then distribute the remaining electrons as lone pairs on the outer atoms until their octets are complete, and put what is left on the central atom. If the central atom is still short of an octet, convert lone pairs on outer atoms into additional bonds, one pair at a time, until the octet is satisfied or the electrons run out.
Two families of exceptions break the octet rule honestly, and both appear in the calculator’s preset examples. Expanded octets belong to elements from the third period onwards, which can hold more than eight electrons around them: sulfur in sulfate, SO4²−, carries six bonds in the common drawing, two double and two single, giving sulfur itself a formal charge of 6 − (0 + 6) = 0, the double-bonded oxygens 0, and each single-bonded oxygen −1, summing to −2. Phosphorus in phosphate, PO4³−, behaves the same way. Odd-electron species are the other exception: nitric oxide, NO, has an odd total electron count, so no drawing gives every atom a full octet, and nitrogen dioxide, NO2, has an unpaired electron on nitrogen. These are real molecules with real chemistry, not drawing errors, and their formal charges are computed exactly the same way, one atom at a time.
The most common drawing errors are all visible in the formal-charge sum. A structure whose charges do not sum to the ion’s charge has a counting error somewhere: a missing lone pair, a miscounted bond, or a valence count taken from the wrong group. A hydrogen with a nonzero formal charge is almost always a miscount, because hydrogen with one bond and no lone pairs is 1 − (0 + 1) = 0, and any other result means the hydrogen was given two bonds or a lone pair it cannot have. An oxygen with a formal charge of −2 from a single bond and six lone electrons is the same kind of error: 6 − (6 + 1) is −1, not −2, and the extra unit means an electron was counted twice. Run the sum check in the multi-atom builder below the main calculator for the whole structure, not just the atom you are unsure about, because the error is often on the atom you did not check.
Formal charge is not oxidation number — the cross-check table
Formal charge and oxidation number both assign numbers to atoms, and both sum to the molecule’s charge, which is why students confuse them. They differ in one decision: formal charge splits every shared bond equally between the two atoms, while oxidation number gives all the shared electrons to the more electronegative atom. The same atom in the same molecule therefore gets two different numbers, and both are correct answers to different questions. Formal charge asks which Lewis drawing is best; oxidation number asks which atom is oxidised or reduced in a reaction. Neither is the atom’s real charge, which lies somewhere between the two extremes and is not an integer at all.
| Atom | Formal charge | Oxidation number | Why they differ |
|---|---|---|---|
| Carbon in CH4 | 0 | −4 | Oxidation gives all 8 bonding electrons to carbon, the more electronegative atom vs hydrogen |
| Carbon in CO2 | 0 | +4 | Oxidation gives all bonding electrons to oxygen, leaving carbon with none of its 4 |
| Nitrogen in NH4+ | +1 | −3 | Formal charge counts 4 shared electrons for nitrogen; oxidation gives all 8 to nitrogen |
| Nitrogen in NO3− | +1 | +5 | Formal charge counts 4 shared electrons; oxidation gives all 12 bonding electrons to oxygen |
| Sulfur in H2S | 0 | −2 | Formal charge splits the two S–H bonds; oxidation gives all 4 bonding electrons to sulfur |
| Sulfur in SO4²− (expanded-octet form) | 0 | +6 | Formal charge splits 6 bonds evenly; oxidation gives all 12 bonding electrons to oxygen |
Read the table as a warning against using one number for the other’s job. Carbon in methane and carbon in carbon dioxide both have formal charge 0, yet their oxidation numbers, −4 and +4, are eight units apart, and that gap is the whole story of combustion: carbon is oxidised from −4 to +4. Formal charge cannot see that story, because it never moves electrons to the more electronegative atom. Conversely, oxidation numbers cannot rank Lewis structures, because they ignore how the electrons are actually shared in the drawing. Use formal charge to choose between drawings of the same molecule, use oxidation numbers to track electron flow between molecules, and check either one with the calculator above by entering the atom’s lone-pair and bond counts.
Formal charge on polyatomic ions: sulfate, phosphate, and carbonate
The same four counts, applied to ions with four oxygens, settle the charges that single-molecule examples leave unpractised. The sum check is the proof in each case.
Sulfate, SO4 with a 2- charge, is drawn with two double bonds and two single bonds in any one resonance form. Sulfur brings 6 valence electrons, has no lone pairs, and 6 bonds in total, so B divided by 2 is 6: 6 minus 6 is 0. Each doubly bonded oxygen is 0, by the same count as in carbon dioxide, and each singly bonded oxygen is minus 1, 6 minus 7. The charges are 0 on sulfur, 0 on two oxygens, and minus 1 on two oxygens, summing to minus 2, the charge of the ion. The resonance forms place the double bonds on different pairs of oxygens, and the real ion averages them, so all four oxygens are equivalent, each carrying an average formal charge of minus one half. Sulfur exceeds the octet in this drawing, with 12 electrons around it, which the expanded-octet discussion on this page addresses: for third-period elements the octet rule bends, and formal charge still ranks the drawings.
Phosphate, PO4 with a 3- charge, follows the same pattern with one double bond and three single bonds. Phosphorus brings 5, has no lone pairs, and 5 bonds in total, so B divided by 2 is 5: 5 minus 5 is 0. The doubly bonded oxygen is 0, and each singly bonded oxygen is minus 1, giving a total of minus 3, the charge of the ion. Carbonate, CO3 with a 2- charge, is drawn with one double bond and two single bonds, like nitrate with one fewer oxygen: carbon brings 4, has no lone pairs, and 4 bonds, giving 0, the doubly bonded oxygen is 0, and each singly bonded oxygen is minus 1, giving minus 2 in total, with three resonance forms averaging the charge across the oxygens. The companion guide works ozone, carbon dioxide, and nitrate in full, and these three ions extend the same method to the polyatomic ions met most often in school and first-year problems, where the sum check, not the memory of one answer, is what earns the marks.
Frequently asked questions
What is formal charge?
Formal charge is the charge an atom would carry in a Lewis structure if every bond were shared perfectly evenly between the two atoms it joins. It is a bookkeeping number worked out from the drawing: the element’s valence electrons, minus its lone-pair electrons, minus half of its bonding electrons. It is not the atom’s real, measured charge — it is the ledger entry that tells you whether the structure you drew makes sense.
How do I calculate the formal charge of an atom?
Use the formula: formal charge = V – (N + B / 2), where V is the element’s valence electrons, N is the number of lone-pair (non-bonding) electrons on the atom, and B is the number of bonding electrons around it. Because each bond holds two electrons, B is twice the bond count — counting a double bond as two bonds and a triple bond as three — so the formula can also be written V – N – bonds. Nitrogen in NH4+, for example: 5 – (0 + 4) = +1.
Do the formal charges in a molecule have to add up to anything?
Yes — always. The formal charges of every atom in a molecule or ion must sum to the total charge of that molecule or ion: zero for anything neutral, +1 for an ion like NH4+, -2 for sulfate. This is the built-in error check of the method. If your charges add up to something else, an electron has been missed or counted twice, and the sum tells you to go back and recount before trusting any single atom’s number.
What does a formal charge of zero mean?
It means the atom keeps exactly as many electrons in the structure as a neutral atom of its element brings — the comfortable, unstrained case. Structures where every atom has a formal charge of zero, like methane or water, are generally the most plausible. Charges are not automatically wrong, though: ions carry them by definition, and good structures like carbon monoxide keep a -1 and a +1 that cancel. The goal is charges as close to zero as the molecule allows, with any negative charge sitting on the more electronegative atom.
What is the difference between formal charge and oxidation number?
They are two opposite bookkeeping conventions for the same electrons. Formal charge splits every bond evenly, one electron to each atom. Oxidation number hands both electrons of a bond to the more electronegative partner, as if the bond were fully ionic. Carbon in CO is -1 by formal charge but +2 by oxidation number; oxygen is +1 formally and -2 by oxidation. Neither is the real charge — each is a consistent accounting system, formal charge for judging Lewis structures and oxidation numbers for tracking redox reactions.
Can a lone-pair electron count be odd?
Yes, in radicals — molecules with an unpaired electron, such as nitric oxide, NO. The formula does not care whether N is even or odd; it just counts electrons. What you will never see is an odd B: bonding electrons come in pairs by definition, so B is always twice the bond count. That is why this calculator asks for the number of bonds rather than for B directly — the doubling is done for you and an impossible odd B cannot be entered by accident.
How do I choose between two resonance forms?
Score each form atom by atom with formal charge, then prefer the form whose charges are closest to zero, with any negative charge on the most electronegative atom and any positive charge on the least electronegative atom. In carbonate all three forms score identically (central carbon 0, double-bonded oxygen 0, two single-bonded oxygens −1 each), so the real ion is the average of the three, not any single drawing.
What is an expanded octet, and does formal charge still work?
Elements from the third period onwards can hold more than eight electrons around them. Sulfur in sulfate carries six bonds in the common drawing, giving sulfur itself 6 − (0 + 6) = 0, the double-bonded oxygens 0 and each single-bonded oxygen −1, summing to −2. Formal charge is computed exactly the same way, one atom at a time, regardless of the octet count.
Why does ozone have a positive oxygen?
Ozone’s central oxygen has 6 valence electrons, 2 lone-pair electrons and 3 bonds, so its formal charge is 6 − (2 + 3) = +1. The single-bonded oxygen is −1 and the double-bonded oxygen is 0, so the molecule as a whole is neutral. The positive charge sits on the central oxygen because it shares three bonds while keeping a lone pair, leaving it credited with fewer electrons than it brought.
Does formal charge predict how a molecule reacts?
Only loosely. Formal charge ranks Lewis drawings and hints at where electron density is uneven, but it is not a real charge: the atoms in carbon dioxide all carry formal charge 0, yet the carbon is electrophilic because oxygen pulls the shared electrons toward itself. Use formal charge to choose drawings, and use electronegativity and oxidation numbers for reactivity and electron flow.
What are the formal charges in the nitrate ion?
Nitrogen is +1, the doubly bonded oxygen is 0, and each singly bonded oxygen is -1, summing to -1, the charge of the ion. Nitrogen has 5 valence electrons, no lone pairs, and 4 bonds, giving 5 – 4 = +1. Three resonance forms place the double bond on each oxygen in turn, and the real ion averages them, so all three oxygens are equivalent.
What is the formal charge on carbon in carbon monoxide?
Minus 1. In the best drawing, CO has a triple bond, carbon has one lone pair, and oxygen has one lone pair: carbon is 4 – (2 + 3) = -1, and oxygen is 6 – (2 + 3) = +1, summing to 0. The charges are unfavourably placed, with negative charge on the less electronegative atom, but the triple bond satisfies both octets, and no charge-free drawing does, so the charged drawing wins.
What are the formal charges in sulfate?
In any one resonance form, sulfur is 0, two oxygens are 0, and two oxygens are -1, summing to -2, the charge of the sulfate ion. Sulfur has 6 valence electrons, no lone pairs, and 6 bonds in the drawing with two double and two single bonds, giving 6 – 6 = 0. The resonance forms average the charge, so each oxygen carries an average formal charge of -1/2 in the real ion.
Related calculators
Mass, moles and mixtures — the rest of the shelf.
Molecular Weight Calculator
Molar mass from a chemical formula.
→Molarity Calculator
Concentration in moles per litre.
→Dilution Calculator
From one strength down to another.
→Density Calculator
Mass per unit volume, worked out.
→Percent Error Calculator
Measured against accepted, as a percent.
→Formal Charge Formula: Worked Examples
Ozone, CO2, and nitrate, atom by atom, with resonance and Class 11 patterns.
→