molecalculator

Moles & Molar Mass

Atoms and Electron Configuration: How It Works

Calculator No. 01-9473 · Updated · Formula and assumptions shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

Atoms are the basic building blocks of matter, and their electron configuration describes how electrons are arranged in energy levels and orbitals around the nucleus. This arrangement determines the atom’s chemical behavior, including how it bonds, its reactivity, and its physical properties. This page explains the rules behind electron configurations, shows how to write them for any element, and clarifies common misconceptions.

Formula

The electron configuration is built by filling orbitals in order of increasing energy, following three rules: the Aufbau principle (electrons fill the lowest-energy orbitals first), Pauli exclusion principle (each orbital holds at most two electrons with opposite spins), and Hund’s rule (for degenerate orbitals, electrons occupy separate orbitals with parallel spins before pairing). The order of filling is given by the Madelung rule: orbitals are filled in order of increasing (n + l), where n is the principal quantum number and l is the azimuthal quantum number (s=0, p=1, d=2, f=3). For equal (n + l), the orbital with lower n fills first.

The capacity of each subshell is 4l + 2 electrons: s holds 2, p holds 6, d holds 10, f holds 14. The total number of electrons equals the atomic number Z for a neutral atom. The shorthand notation uses the nearest preceding noble gas in brackets, followed by the remaining electrons.

Worked Example

For iron (Z = 26), the default value in the calculator, we fill orbitals in order:

  • 1s: 2 electrons (total 2)
  • 2s: 2 electrons (total 4)
  • 2p: 6 electrons (total 10)
  • 3s: 2 electrons (total 12)
  • 3p: 6 electrons (total 18)
  • 4s: 2 electrons (total 20) – note 4s fills before 3d because (n+l) = 4+0 = 4, while 3d has (3+2)=5
  • 3d: 6 electrons (total 26) – the remaining six go into the 3d subshell

So the full configuration is: 1s2 2s2 2p6 3s2 3p6 4s2 3d6. The shorthand is [Ar] 4s2 3d6 because argon (Z=18) has the configuration 1s2 2s2 2p6 3s2 3p6. For unpaired electrons, Hund’s rule says that in the 3d subshell (which has five orbitals), the six electrons occupy all five orbitals singly first, then the sixth pairs with one, leaving four unpaired electrons.

Assumptions

  • The configuration is for a neutral, ground-state atom.
  • The Madelung rule (Aufbau order) applies, which is valid for most elements but has exceptions for some transition metals and lanthanides.
  • The calculator uses the standard order: 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p.

How to Read the Configuration

Each term like 3p4 tells you the principal energy level (n=3), the subshell type (p), and the number of electrons in that subshell (superscript 4). The sum of all superscripts equals the total number of electrons. The outermost electrons, called valence electrons, are those in the highest principal energy level (for main-group elements) or in the partially filled d/f subshells (for transition metals). Valence electrons determine reactivity: elements with the same number of valence electrons sit in the same group of the periodic table and behave similarly.

For example, oxygen (1s2 2s2 2p4) has six valence electrons (2s2 2p4), so it needs two more to complete an octet, making it a strong oxidizing agent. In contrast, neon (1s2 2s2 2p6) has a full octet and is inert.

Common Mistakes and Exceptions

A frequent error is writing 3d44s2 for chromium. In reality, chromium is [Ar] 3d54s1 because a half-filled d subshell is lower in energy. Similarly, copper is [Ar] 3d104s1 instead of 3d94s2. These exceptions arise from the extra stability of half-filled and fully filled subshells. Another mistake is confusing the order of filling with the order of ionization: when forming cations, electrons are removed from the highest n orbital first, so iron loses 4s electrons before 3d electrons, giving Fe2+ as [Ar] 3d6 and Fe3+ as [Ar] 3d5.

Also, the Aufbau principle is a guideline, not a law. For heavier elements, relativistic effects and electron-electron interactions can alter the order. The periodic table is the best reference for actual configurations.

Why It Matters

Electron configuration explains the periodic table’s structure: rows correspond to principal energy levels, and columns to valence electron counts. It predicts ionization energy trends (how tightly electrons are held), atomic radius (how far the outer electrons are from the nucleus), and electronegativity (how strongly an atom attracts bonding electrons). For example, elements with a single s electron in the outermost shell (alkali metals) are highly reactive, while noble gases with full shells are almost completely unreactive. In chemistry, knowing the configuration helps you predict bond types: metals with few valence electrons tend to lose them to form cations, while nonmetals gain electrons to form anions.

In physics and materials science, the configuration of electrons in solids determines electrical conductivity, magnetism, and optical properties. For instance, the unpaired electrons in transition metals like iron are responsible for ferromagnetism.

How to Use the Calculator

Enter the atomic number Z (1 to 118) of a neutral atom. The calculator returns the full electron configuration, the noble-gas shorthand, and the number of unpaired electrons. For ions, adjust Z by the charge: for a cation, subtract the charge (e.g., Fe3+ has Z=26-3=23 electrons); for an anion, add the magnitude of the charge (e.g., O2- has Z=8+2=10 electrons). The calculator assumes ground state; excited states have different configurations.

Note that the unpaired electron count follows Hund’s rule and works for ground-state neutral atoms. For ions, the count may differ because the order of orbital filling changes (e.g., for transition metal cations, 3d fills before 4s).

Frequently Asked Questions

Why does 4s fill before 3d?

Because the 4s orbital has a lower energy than 3d, even though n is higher. The (n+l) rule gives 4s: 4+0=4, 3d: 3+2=5, so 4s fills first. However, once electrons are in 3d, the 3d orbitals become lower in energy than 4s, which is why transition metals lose 4s electrons first when ionizing.

How do I find the electron configuration of an ion?

First, write the configuration for the neutral atom. Then remove electrons from the highest n orbital (for cations) or add electrons to the lowest energy available orbital (for anions). For example, Ca (Z=20) is [Ar] 4s2, so Ca2+ is [Ar]. For O (Z=8) is 1s2 2s2 2p4, so O2- adds two electrons to 2p to get 2p6.

What is the difference between electron configuration and orbital diagram?

An electron configuration is a shorthand notation (e.g., 1s2 2s2 2p4), while an orbital diagram uses boxes or lines for each orbital and arrows for electrons, showing spin direction. Orbital diagrams are more detailed and help visualize Hund’s rule and unpaired electrons.

Are there elements that don’t follow the Aufbau principle?

Yes, about 20 elements have exceptions, mostly transition metals and lanthanides. Well-known ones are chromium, copper, molybdenum, silver, gold, and many lanthanides. These exceptions arise from the extra stability of half-filled or fully filled subshells, and sometimes from relativistic effects in heavy elements.

How does electron configuration relate to the periodic table?

The periodic table is organized by electron configuration. Each row (period) corresponds to the highest principal quantum number n of the valence electrons. Each column (group) has the same valence electron configuration, which explains similar chemical properties. The s-block, p-block, d-block, and f-block correspond to the subshell being filled.

Related

Formula used
in z | Atomic number Z | - | 26 | 1 | 118
out ec | Electron configuration | - | 1s2 2s2 2p6 3s2 3p6 4s2 3d6 | 0
out ecs | Shorthand (noble gas) | - | [Ar] 4s2 3d6 | 0
out un | Unpaired electrons | - | 4 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →