Placeholder instructions text.
When you are first taught about Electron shells, you are taught that electrons orbit atoms in shells: two in the first shell, eight in the second, eight in the third and so on. The shells model isn’t wrong, but it is over simplified and incomplete, in this simulation we learn about a more advanced model which involves:
The energy level of an electron – also known as the principal quantum number – is what you previously knew as its shell. You can still think in terms of shells (many places use energy level and shell interchangeably) but need to rethink the number of electrons that fit in each one.
Each energy level can hold 2n2 electrons:
Each energy level is divided into sub-levels, with the number of sub-levels at energy level equal to the principal quantum number, n.
Sub-levels are also known as sub-shells.
The sub-levels are named after letters, and each contains a different number of orbitals:
The s-orbital in each s sub-level is always spherical; the higher the energy level of the s-orbital, the greater the radius of the sphere.

The three p-orbitals in each p sub-level are often described as dumbbell-shaped with two balloon-shaped lobes. The three p-orbitals are called px, py and pz because they lie along the axes of 3D space. p-Orbitals in higher energy levels have the same orientation, but are just bigger.

The five d-orbitals in each d sub-level have a range of different shapes determined which are more complex to describe; like all orbitals, their shapes are the solutions to the Schrödinger equation, and as we get to higher sub-levels, these solutions get more complex.

The seven f-orbitals in each f sub-level have even more complex shapes than the d-orbitals.

The electron configuration of an atom is determined by three rules:
The energy level of an orbital is largely determined by the principal quantum number: higher number = higher energy, but there are some exceptions which must be followed so that we can determine the electron configuration.
The order of filling orbitals is as follows:

In general, we can follow the order above to determine the electron configuration, by filling up each sub-level before moving on to the next one.
However, there are some exceptions, caused by the fact that some of the sub-levels for particular atoms are so close in energy, that placing electrons in them pushes them higher in energy than ones that should be lower. Two such important exceptions are copper and chromium:
To determine the electron configuration of ions, we just add or remove electrons, depending on the charge, adding more electrons to their current maximum sub-level, or removing electrons from it as appropriate. Note, with cations, electrons come from the sub-level with the highest n first, so for example with the first period of transition metals, the 4s orbital empties before the 3d, even though it has lower energy: