molecalculator

Moles & Molar Mass

Electron Configuration: How to Write Any Element’s

Calculator No. 01-10802 · 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.

Electron configuration is the distribution of an atom’s electrons among its atomic orbitals, written as a sequence of subshell labels with superscripts (e.g., 1s2 2s2 2p6). To write it for any element, you fill orbitals in order of increasing energy (Aufbau principle), respect the Pauli exclusion principle (max two electrons per orbital), and apply Hund’s rule (one electron per orbital before pairing). The result tells you the element’s shell structure, valence electrons, and chemical behavior.

Formula

The configuration is built by filling orbitals in the Aufbau order: 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p. Each orbital type holds a fixed maximum: s holds 2, p holds 6, d holds 10, f holds 14. The superscript is the number of electrons in that subshell, and the sum of all superscripts equals the atomic number Z for a neutral atom. The calculator uses this order and stops when the total reaches Z. For the noble-gas core, it replaces the filled inner shells with the symbol of the preceding noble gas in brackets (e.g., [Ar]). Valence electrons are those in the highest principal quantum number shell, plus any unfilled d or f subshells in the same period.

Worked Example

Take iron, Z = 26 (the default). Fill in order:

  • 1s2 (2 electrons, total 2)
  • 2s2 (4)
  • 2p6 (10)
  • 3s2 (12)
  • 3p6 (18)
  • 4s2 (20)
  • 3d6 (26, stops here)

So the full configuration is 1s2 2s2 2p6 3s2 3p6 4s2 3d6. The noble-gas core is [Ar] (argon has Z=18), giving [Ar] 4s2 3d6. The valence electrons are the 4s2 (2) plus the 3d6 (6), total 8 valence electrons. The calculator returns the same: ec = 1s2 2s2 2p6 3s2 3p6 4s2 3d6, core = [Ar] 4s2 3d6, valence = 8.

Assumptions

  • The atom is neutral (number of electrons = Z). For ions, add or remove electrons from the highest-energy orbitals first (for transition metals, remove 4s before 3d).
  • The Aufbau order is the standard one for ground-state atoms as predicted by the Madelung rule (n+l rule). Exceptions (like Cr and Cu) are not handled by this simple order; see the Common Mistakes section.
  • Orbitals are filled completely before moving to the next subshell; no fractional occupations.

Background: Why Electron Configuration Matters

Electron configuration is the foundation of the periodic table. The layout of the table—periods (rows) and groups (columns)—mirrors how electrons fill shells and subshells. Elements in the same group have the same valence electron configuration (e.g., all alkali metals end in s1), which explains their similar chemical reactivity. The configuration also determines atomic size, ionization energy, electron affinity, and the types of bonds an atom can form. For example, noble gases have filled shells (ns2 np6), making them chemically inert, while halogens have one electron short of a filled p subshell, driving their strong tendency to gain one electron.

How to Write Configurations by Hand

If you don’t have a calculator, follow these steps:

  1. Find the element’s atomic number Z on the periodic table.
  2. Write the Aufbau order: 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p.
  3. Fill each subshell to its maximum (s=2, p=6, d=10, f=14) until you’ve placed all Z electrons.
  4. Write the subshells in order of increasing principal quantum number (1s, 2s, 2p, 3s, 3p, 3d, 4s, 4p…), not the filling order. This is the standard notation.
  5. For shorthand, replace the filled inner shells with the noble gas symbol in brackets. Example: chlorine (Z=17) is 1s2 2s2 2p6 3s2 3p5, or [Ne] 3s2 3p5.

Common Mistakes and Misconceptions

  • Writing 3d before 4s in the final notation: The filling order puts 4s before 3d, but the standard notation lists subshells by principal quantum number, so 3d comes before 4s. Example: [Ar] 3d6 4s2, not [Ar] 4s2 3d6 (though many textbooks use the filling order; both are accepted, but the n-order is conventional).
  • Exceptions to the Aufbau rule: Chromium (Z=24) is [Ar] 3d5 4s1, not [Ar] 3d4 4s2, because a half-filled d subshell is more stable. Copper (Z=29) is [Ar] 3d10 4s1. These exceptions occur for d and f block elements; the simple rule fails there.
  • Confusing valence electrons with total outer-shell electrons: For transition metals, valence electrons include the d electrons even if they are in a lower principal quantum number shell. For iron, that’s 2 (4s) + 6 (3d) = 8, not just 2.
  • Using the periodic table block positions incorrectly: The s-block (groups 1-2), p-block (13-18), d-block (3-12), and f-block (lanthanides/actinides) correspond to the subshell being filled, but the row number doesn’t always equal the principal quantum number for d and f blocks (e.g., 3d fills in period 4).

How to Read the Configuration

Each term like 3p4 means: principal quantum number n=3, subshell type p, and 4 electrons in that subshell. The superscripts sum to Z. The highest n with electrons tells you the period; the group (for main-group elements) is the number of valence electrons (s + p). For example, sulfur (Z=16) is [Ne] 3s2 3p4: period 3, group 16 (6 valence electrons). The configuration also predicts the most common ion: sulfur tends to gain 2 electrons to achieve [Ar] (octet), forming S2−.

Limits of the Simple Aufbau Model

The Madelung rule (n+l rule) is a useful approximation but not a law. For heavy elements (Z > 60), relativistic effects and electron-electron repulsion cause deviations from the predicted order. For example, some actinides have configurations that differ from the simple filling order. Also, the model assumes a single-electron picture; in reality, orbitals are not fixed, but the configuration notation is a powerful shorthand. For ions, removing electrons from the highest-energy occupied orbital is not always straightforward: for transition metals, 4s is removed before 3d because the 3d orbital is lower in energy once occupied. For example, Fe2+ is [Ar] 3d6, not [Ar] 3d4 4s2.

Frequently Asked Questions

What is the electron configuration of oxygen? Oxygen has Z=8, so it fills 1s2 2s2 2p4. The 2p subshell has 4 electrons, with two unpaired (Hund’s rule), giving two unpaired electrons that form two bonds in water.

Why is chromium’s configuration an exception? Chromium (Z=24) is [Ar] 3d5 4s1 instead of [Ar] 3d4 4s2. The half-filled d subshell (3d5) has extra stability due to exchange energy and reduced electron-electron repulsion, so one electron from 4s moves to 3d.

How do I write the configuration for an ion? Start with the neutral atom’s configuration, then add or remove electrons. For anions, add electrons to the outermost subshell (e.g., O2−: [He] 2s2 2p6). For cations, remove from the highest n subshell first; for transition metals, remove 4s before 3d (e.g., Fe2+: [Ar] 3d6).

What is the difference between electron configuration and orbital diagram? An orbital diagram shows each orbital as a box and each electron as an arrow (up or down), explicitly showing spin and pairing. The configuration is a shorthand that only lists subshells and electron counts. The diagram is useful for applying Hund’s rule and visualizing unpaired electrons.

Does the configuration affect chemical reactivity? Yes, the valence electrons (outermost shell) determine how an atom bonds. Elements with one or two valence electrons tend to lose them (metals), while those with 6 or 7 tend to gain them (nonmetals). The octet rule (achieving 8 valence electrons) drives most main-group chemistry.

Can I use this for any element up to 118? The calculator works for Z=1 to 118, but for elements beyond about 100, the simple Aufbau order may not match the experimentally observed configuration due to relativistic effects. For most classroom and lab purposes, the rule is accurate enough.

Practical Uses in Chemistry

Electron configurations are used to predict and explain:

  • Periodic trends: atomic radius, ionization energy, electronegativity.
  • Bonding: which elements form ionic vs. covalent bonds, and how many bonds they form.
  • Magnetic properties: unpaired electrons make a substance paramagnetic (attracted to a magnetic field); all paired electrons make it diamagnetic.
  • Spectroscopy: the energy levels of electrons determine the wavelengths of light absorbed or emitted, used in flame tests and atomic absorption analysis.
  • Catalysis: transition metal configurations (d electrons) are central to catalytic activity in industrial processes.

When working in a lab, always follow your lab method, the safety data sheet (SDS) and your supervisor.

Related

Formula used
in z | Atomic number Z | - | 26 | 1 | 118
out ec | Electron configuration | - | ec_string(z) | 0
out core | Noble-gas core | - | core_string(z) | 0
out valence | Valence electrons | - | valence_count(z) | 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 →