Valence Electrons Finder
Find the number of valence electrons in any element or ion, see them drawn as a Lewis dot structure, and check how many electrons it typically gains, loses, or shares to satisfy the octet rule.
Leave at 0 for a neutral atom. Use 2 for Fe²⁺, or -2 for O²⁻.
Result
Oxygen
6 valence electrons
[He] 2s2 2p4 — p-block, period 2, group 16
Block
p
Group
16
Valence Electrons of Common Elements
| Element | Symbol | Group | Valence e⁻ |
|---|---|---|---|
| Hydrogen | H | 1 | 1 |
| Helium | He | 18 | 2 |
| Lithium | Li | 1 | 1 |
| Beryllium | Be | 2 | 2 |
| Boron | B | 13 | 3 |
| Carbon | C | 14 | 4 |
| Nitrogen | N | 15 | 5 |
| Oxygen | O | 16 | 6 |
| Fluorine | F | 17 | 7 |
| Neon | Ne | 18 | 8 |
| Sodium | Na | 1 | 1 |
| Magnesium | Mg | 2 | 2 |
| Aluminium | Al | 13 | 3 |
| Silicon | Si | 14 | 4 |
| Phosphorus | P | 15 | 5 |
| Sulfur | S | 16 | 6 |
| Chlorine | Cl | 17 | 7 |
| Argon | Ar | 18 | 8 |
For main-group elements (blocks s and p), valence electrons follow a clean pattern across the periodic table — this is why elements in the same column react in similar ways.
Step-by-Step Working
Here's exactly how the valence electron count was worked out, one step at a time.
Step 1: Build the electron configuration
Oxygen (O) has 8 electrons. Electrons fill from the lowest energy subshell upward.
[He] 2s2 2p4Step 2: Find the highest occupied shell
Valence electrons are the electrons sitting in the highest occupied principal energy level (the outermost shell) of the atom or ion.
Outermost shell: n = 2Step 3: Count electrons in that shell
For a main-group element, this count is simply every electron in the outermost s and p subshells added together.
Valence electrons = 6Step 4: Compare against the octet rule
Atoms tend to react in whichever direction gets them to 8 valence electrons (2 for hydrogen and helium) in the fewest steps, since a full outer shell is the most stable arrangement.
Gains 2 electrons to fill the outer shell
Free Valence Electrons Finder
This valence electrons calculator tells you exactly how many valence electrons any element or ion has, in one click. Type in an element symbol like Na, a full name like Sodium, or just an atomic number from 1 to 118, and the tool builds the electron configuration behind the scenes and pulls out the outer-shell electron count for you instantly.
Along with the number itself, you get a Lewis dot diagram, the block, period, and group the element sits in, the full electron configuration, and a plain-language explanation of whether that element typically loses, gains, or shares electrons when it bonds. It works for neutral atoms and for ions, so you can check both Na and Na⁺, or O and O²⁻, and see exactly how the charge changes the outer shell.
Unlike a static valence electron chart, this tool recalculates from the actual configuration every time, so it stays accurate for tricky cases: transition metals, ions that cross a shell boundary, and elements near the bottom of the periodic table where a quick group-number shortcut alone can mislead you.
What Are Valence Electrons?
Valence electrons are the electrons that sit in the outermost occupied shell of an atom, the shell furthest from the nucleus. They are called "valence" electrons because they are the ones directly involved in forming chemical bonds. Electrons in the inner, filled shells are shielded from other atoms by the outer shell and mostly stay out of bonding.
Because valence electrons are the electrons that actually interact when two atoms come close to each other, they control almost everything about how an element behaves chemically: what kind of bonds it forms, how many bonds it can make, whether it tends to end up positively or negatively charged as an ion, and even physical properties like conductivity and melting point.
The term itself comes from the Latin valentia, meaning strength or capacity, reflecting the historical idea of an atom's "combining power." Early chemists worked out valency from reaction ratios long before anyone understood electron shells; it was only with the development of quantum theory in the early twentieth century that valence electrons were properly linked to atomic structure.
Valence Electrons vs Core Electrons
Every atom's electrons split into two groups: core electrons and valence electrons. Core electrons fill all the shells below the outermost one, and they are held tightly by the nucleus and are chemically inert, they do not take part in ordinary bonding. Valence electrons sit in the outermost shell and are the ones available for reactions.
This split matters because it explains why atomic size, ionization energy, and reactivity all shift the way they do across the periodic table. As you move across a period, core electrons stay the same for elements sharing a noble gas core, but valence electrons and the nuclear charge pulling on them both increase, pulling the outer shell in tighter. As you move down a group, another core shell is added each time while the valence electron count stays fixed, which is why elements in the same column behave so similarly.
How to Find the Number of Valence Electrons
The fastest shortcut works for most of the periodic table: for main-group elements, the tall columns on the left and right of the table rather than the transition metals in the middle, the number of valence electrons matches a simple pattern tied to the group number.
For groups 1 and 2, the valence electron count equals the group number itself: group 1 elements like sodium have 1 valence electron, and group 2 elements like magnesium have 2. For groups 13 through 18, subtract 10 from the group number: group 14, carbon's group, has 4 valence electrons, group 17, the halogens, has 7, and group 18, the noble gases, has 8, except for helium, which only has 2 because its first shell fills up at just 2 electrons.
This shortcut is a genuine time-saver in exams and quick lookups, but it is only reliable for s-block and p-block elements. The moment you step into the d-block or f-block, or add a charge to form an ion, the group-number trick can give the wrong answer, which is exactly where a calculator like this one is useful.
The Long Way: Counting From the Electron Configuration
The shortcut above is fast, but it only tells you the answer, not why. The more thorough method is to write out the full electron configuration, find the highest principal shell number, n, that has any electrons in it, and add up every electron sitting in that outermost shell.
For example, chlorine's configuration is 1s² 2s² 2p⁶ 3s² 3p⁵. The highest shell is n = 3, and it holds 2 electrons in the 3s subshell plus 5 electrons in the 3p subshell, for a total of 7 valence electrons. That matches the shortcut too, since chlorine is in group 17 and 17 minus 10 equals 7. This calculator always uses this full configuration method internally, so it stays accurate even for tricky cases like ions and transition metals where the simple group-number shortcut breaks down.
Working through the configuration by hand also reinforces the Aufbau principle, the order in which subshells fill, and gives you a way to double check any answer without memorizing a table, which is valuable for exam settings where a periodic table might not show group numbers clearly.
Valence Electrons and the Periodic Table Blocks
The periodic table is divided into four blocks, s, p, d, and f, named after the subshell that receives the last electron added when building up the configuration in order of atomic number. Which block an element sits in tells you a lot about how its valence electrons behave.
S-block elements, groups 1 and 2, have their valence electrons in an s subshell only, which makes their valence electron count trivially easy to read off the group number. P-block elements, groups 13 to 18, fill an s subshell and then a p subshell in the same outer shell, so both count toward the valence total. D-block elements, the transition metals, mostly fill an inner (n-1)d subshell after the outer ns subshell, which is exactly why their valence electron count often looks smaller than their total reactivity would suggest. F-block elements, the lanthanides and actinides, add electrons to an even deeper (n-2)f subshell, tucking most of their electrons well below the surface.
Valence Electrons in Transition Metals
Transition metals, the d-block, in the middle of the periodic table, are the main exception to the simple shortcut. Their outermost occupied shell is usually just the ns subshell, holding only 1 or 2 electrons, while extra electrons sit in the (n-1)d subshell one shell in from the surface.
For example, iron's configuration is [Ar] 3d⁶ 4s². The outermost shell is n = 4, and it holds only the 2 electrons in 4s, so by the strict outer-shell definition iron has 2 valence electrons. In practice, chemists often also count some or all of the 3d electrons as available for bonding, especially when discussing oxidation states, since d electrons are close enough in energy to take part in reactions too.
This calculator reports the strict outer-shell count, which is the standard definition used in general chemistry courses, and always shows the full configuration alongside it so you can see the d-electron count as well. Knowing both numbers matters, because transition metals commonly show several different oxidation states, iron forms both Fe²⁺ and Fe³⁺, and the available d electrons are what makes that flexibility possible.
Valence Electrons in Lanthanides and Actinides
The f-block elements push the transition-metal exception even further. Lanthanides and actinides fill an (n-2)f subshell that sits two shells in from the outermost one, so their outer-shell valence electron count is almost always just 2, from the ns subshell, regardless of how many f electrons the atom is quietly accumulating underneath.
This is why the lanthanides in particular are chemically so similar to one another across the whole row, their outer electron arrangement barely changes even as the atomic number climbs by fifteen. This calculator handles these elements using the same full-configuration method as everything else, so lanthanide and actinide lookups return an accurate outer-shell count along with the complete configuration for reference.
Valence Electrons and Ions
Forming an ion changes how many electrons an atom has, and that can change which shell counts as the outermost one. When sodium, 1s² 2s² 2p⁶ 3s¹, 1 valence electron, loses its single 3s electron to form Na⁺, what is left is 1s² 2s² 2p⁶, now the second shell is the outermost one, giving Na⁺ 8 valence electrons, matching the electron count of neon.
This is exactly why metals form positive ions so readily: losing their small number of outer electrons exposes a shell underneath that is already full, which is a far more stable arrangement. The reverse happens with nonmetals like oxygen, which gain electrons to fill their existing outer shell rather than reaching down to a smaller one.
As a general rule, metals on the left of the table lose electrons to reach the noble gas configuration behind them, while nonmetals on the right gain electrons to reach the noble gas configuration ahead of them. Enter any charge in the ion charge field to see this play out for a specific element, and watch the valence electron count and the octet status update together.
Valence Electrons and the Octet Rule
The octet rule states that atoms are most stable, and therefore least reactive, when their outermost shell holds 8 electrons, or 2, for elements in period 1. Almost every pattern in how main-group elements bond traces back to atoms trying to reach this arrangement, either by losing, gaining, or sharing electrons.
This calculator checks how far any element is from a full octet and reports the fastest route: if losing electrons takes fewer steps, it predicts the element forms a positive ion of that size; if gaining takes fewer steps, it predicts a negative ion; and if both routes take the same, larger number of steps, it flags that the element more commonly shares electrons in covalent bonds instead of forming a simple ion.
This same octet-seeking behaviour is the reason noble gases are so unreactive in the first place, they already start with a full outer shell, so there is no energetic benefit to losing, gaining, or sharing electrons, which is also why their valence electron count doubles as a target for every other element on the table.
Exceptions to the Octet Rule
Not every element follows the octet rule neatly, and it is worth knowing the common exceptions so a valence electron count does not get misread as a rule violation. Beryllium and boron routinely form stable compounds with an incomplete octet, BeCl₂ and BF₃ are common examples, because they simply do not have enough valence electrons to reach 8 through normal bonding.
At the other extreme, elements in period 3 and beyond, like phosphorus and sulfur, can form an expanded octet, holding more than 8 electrons around the central atom in compounds like PCl₅ or SF₆. This is possible because their larger atomic size and available d orbitals give them room for extra electron pairs that period-2 elements like nitrogen and oxygen simply cannot accommodate.
Lewis Dot Structures Explained
A Lewis dot structure, also called an electron dot diagram, is a simple drawing that shows an element's symbol surrounded by dots, one dot for each valence electron. It is a quick visual way to see how many electrons an atom has available for bonding, without needing to write out a full electron configuration.
The dots are placed one at a time on each of the four sides of the symbol before any side gets a second, paired dot, this mirrors Hund's rule, where electrons spread out into separate spaces before pairing up. This calculator draws that diagram automatically for every element and ion you look up, so you can see the valence electron count both as a number and as a picture, which makes it far easier to sketch full molecular Lewis structures afterward by combining several atoms' dot diagrams.
Valence Electrons and Chemical Bonding
Valence electron count is what decides whether two atoms end up forming an ionic bond or a covalent bond in the first place. When the valence electron counts, and the resulting electronegativities, of two atoms are very different, typically a metal with few valence electrons meeting a nonmetal that is close to a full octet, electrons transfer completely, producing an ionic bond and two oppositely charged ions.
When two atoms have similar valence electron counts and similar electronegativities, usually two nonmetals, neither one can pull electrons away from the other, so they share pairs of electrons instead, producing a covalent bond. The number of electrons an atom needs to complete its octet through sharing is generally the same as the number of covalent bonds it forms, which is why this calculator's octet panel doubles as a quick prediction of bonding behaviour.
Valence Electrons and Periodic Trends
Several major periodic trends trace straight back to valence electron behaviour. Ionization energy, the energy needed to remove an electron, generally rises across a period because the valence electrons are held by an increasingly strong nuclear pull while sitting in the same shell, and it generally falls down a group because each new valence shell sits further from the nucleus and is shielded by more core electrons underneath.
Electronegativity, an atom's pull on shared electrons in a bond, follows the same pattern for a related reason: atoms that are close to a full octet, like fluorine and oxygen, pull hard on any shared electrons to try to complete that shell, while atoms with only 1 or 2 valence electrons, like sodium and magnesium, barely pull at all. Atomic radius moves the opposite way, shrinking across a period as the same valence shell is pulled in tighter by rising nuclear charge, and expanding down a group as a new, larger valence shell is added.
Worked Example: Valence Electrons of Nitrogen
Nitrogen has atomic number 7, so its electron configuration is 1s² 2s² 2p³. The outermost shell is n = 2, which holds 2 electrons in 2s and 3 electrons in 2p, for a total of 5 valence electrons. This matches the group-number shortcut too, since nitrogen sits in group 15 and 15 minus 10 equals 5.
With 5 valence electrons, nitrogen is 3 electrons short of a full octet, so it typically gains 3 electrons, or shares 3 electron pairs, as it does in molecules like ammonia and N₂ gas, rather than losing 5, since gaining 3 is the shorter path to a stable outer shell.
Worked Example: Valence Electrons of an Ion, O²⁻
Neutral oxygen has 6 valence electrons, 1s² 2s² 2p⁴, group 16. To form the O²⁻ ion, oxygen gains 2 extra electrons, filling the 2p subshell completely: 1s² 2s² 2p⁶. The outermost shell is still n = 2, and it now holds the full 8 electrons, giving O²⁻ 8 valence electrons, the same electron arrangement as neon.
This confirms why oxygen almost always forms a 2- ion in ionic compounds like MgO or CaO: gaining exactly 2 electrons is what completes its octet, and this calculator will show that full octet flag the moment you enter a charge of -2 for oxygen.
Worked Example: A Transition Metal Ion, Fe³⁺
Iron starts at [Ar] 3d⁶ 4s², with 2 outer-shell valence electrons in 4s. Forming Fe³⁺ removes 3 electrons total, and transition metals always lose their outermost s electrons first, so the 2 electrons in 4s go first, leaving one more to remove from 3d, giving a final configuration of [Ar] 3d⁵.
Now the outermost occupied shell is n = 3, held entirely in the 3d subshell, so Fe³⁺ has 5 valence electrons by the strict outer-shell count, all in a half-filled d subshell, which happens to be an unusually stable arrangement and is part of why Fe³⁺ is such a common, stable oxidation state for iron in compounds like Fe₂O₃.
Common Mistakes When Counting Valence Electrons
A frequent mistake is counting every electron in an atom instead of just the outermost shell. Chlorine has 17 total electrons, but only 7 of them are valence electrons, the other 10 sit in the filled, inner shells and are not involved in bonding.
Another common error is applying the simple group-number shortcut to transition metals, which does not work cleanly since d-block elements do not follow the same 1-to-18 valence pattern as the main-group columns. A third mistake is forgetting to adjust the count for ions: a charge changes the electron total, and sometimes removes or exposes an entire shell, so the valence electron count for an ion is often very different from the neutral atom's.
A fourth, subtler mistake is assuming valence electron count alone predicts reactivity in every case; noble gases with 8 valence electrons are barely reactive at all, while hydrogen, with just 1 valence electron and no d or f complications, still reacts differently from other 1-valence-electron elements like sodium because its single shell only ever needs 2 electrons to fill, not 8.
Valence Electrons Across the Periodic Table
If you scan across period 3 of the periodic table from sodium to argon, the valence electron count climbs one at a time: sodium has 1, magnesium has 2, aluminium has 3, silicon has 4, phosphorus has 5, sulfur has 6, chlorine has 7, and argon has 8. This steady climb across a period, followed by a reset back to 1 at the start of the next period, is the single biggest reason the periodic table has the shape it does.
Moving down a group instead of across a period keeps the valence electron count the same, even though the total number of electrons and the atomic size both increase. That is why lithium, sodium, and potassium all react in a similar, predictable way with water, even though they are very different sizes, they all share exactly 1 valence electron sitting in an s subshell.
Valence Electrons and Bonding Capacity
Valence electron count is also a quick way to estimate how many bonds an atom is likely to form, especially for nonmetals following the octet rule. Carbon, with 4 valence electrons, typically forms 4 covalent bonds, which is exactly why it can build such a huge variety of stable organic molecules. Nitrogen, with 5 valence electrons, usually forms 3 bonds and keeps one lone pair, and oxygen, with 6, usually forms 2 bonds and keeps two lone pairs.
This pattern comes directly from the octet target: an atom generally forms just enough bonds to bring its own valence electron count up to 8 when shared electrons from bonding partners are counted in. This calculator's octet-rule panel gives you that same "electrons needed" number, which lines up closely with the atom's typical number of covalent bonds for most nonmetals.
Valence Electrons in Real-World Applications
Valence electron count is not just a classroom exercise, it directly explains real material properties. Semiconductors like silicon, with 4 valence electrons, sit at the center of every microchip precisely because that half-full-feeling outer shell lets engineers control conductivity by doping the crystal with trace amounts of elements that have 3 or 5 valence electrons instead.
Metals conduct electricity well largely because their small number of loosely held valence electrons can drift freely through the material as a shared "sea" of charge, while elements close to a full octet, like the halogens, tend to be insulators or reactive nonmetals rather than conductors. Battery chemistry leans on the same idea, lithium's single, easily lost valence electron is exactly what makes lithium-ion batteries able to shuttle charge so efficiently between electrodes.
Tips for Using This Valence Electrons Calculator
For a quick lookup, just type an element symbol, name, or atomic number from 1 to 118 and leave the charge at 0 for the neutral atom. The result card shows the valence electron count immediately, along with the Lewis dot diagram and the block, period, and group the element belongs to.
To check an ion, enter its charge in the second field, positive for cations that lose electrons, like 1 for Na⁺ or 3 for Al³⁺, and negative for anions that gain electrons, like -1 for Cl⁻ or -2 for O²⁻. Watch how the octet message updates: elements with a full outer shell get a green "stable" badge, while elements still short of an octet show whether they typically lose, gain, or share electrons.
Use the step-by-step working panel underneath the result if you need to show your reasoning for homework or an exam, it lays out the electron configuration, the outermost shell identified, and the final valence electron count in the same order a textbook solution would.
Valence Electrons Finder FAQ
How many valence electrons does an element have? It depends on the element's position in the periodic table, main-group elements follow a clean pattern by group number, while transition metals need the full electron configuration worked out to be sure. What is the maximum number of valence electrons? Eight, for any element beyond period 1, because of the octet rule; hydrogen and helium cap out at 2, since their only shell is the small first shell.
Do valence electrons determine an element's valency directly? Usually yes for main-group elements, an element's valency is often equal to its valence electron count, or to 8 minus that count, whichever is smaller, since either number represents the shortest path to a full octet.
This calculator combines a direct element and ion lookup, an automatic Lewis dot diagram, an octet-rule check, and full step-by-step working, so you can find an answer instantly and still see exactly how it was worked out.
Frequently Asked Questions
What are valence electrons?
Valence electrons are the electrons in an atom's outermost occupied shell. They are the electrons directly involved in chemical bonding, and they determine most of an element's chemical behavior.
How do I find the number of valence electrons of an element?
For main-group elements, use the group number: groups 1–2 have that many valence electrons directly, and groups 13–18 have (group number − 10) valence electrons. For a guaranteed-accurate answer, including transition metals and ions, build the full electron configuration and count electrons in the outermost shell — which is exactly what this calculator does.
Do valence electrons change for ions?
Yes. Losing or gaining electrons to form an ion changes the electron count and can even change which shell is outermost, so an ion's valence electron count is often very different from the neutral atom's — for example, Na has 1 valence electron, but Na⁺ has 8.
What is the maximum number of valence electrons an atom can have?
Eight, for any element in period 2 or beyond, following the octet rule. Hydrogen and helium are the exceptions, capping out at 2 valence electrons because their only shell is the small first shell.
How many valence electrons do transition metals have?
Usually just 1 or 2, since their outermost shell is typically only the ns subshell, even though they may have several more electrons in the inner (n-1)d subshell that can also take part in bonding and oxidation states.