Electron Configuration Calculator
Generated from the n plus l rule, then corrected for the twenty elements that genuinely break it.
The formula
Madelung order: fill by increasing n + l, then increasing n
The n plus l rule
Orbitals fill in order of increasing n + l, and where two are tied, the one with the smaller n goes first. That single rule produces the whole diagonal filling pattern, including the awkward business of 4s filling before 3d: 4s has n + l = 4 while 3d has 5.
The exceptions are real
Chromium is [Ar]3d⁵4s¹ and copper [Ar]3d¹⁰4s¹, not what the rule predicts. Roughly twenty elements break the pattern, mostly where a half-filled or completely filled d subshell is worth more than the promotion costs. This page generates the configuration from the rule and then applies the documented exceptions, so you can see which is which.
Filling order is not removal order
4s fills before 3d but empties first too. Iron(II) is [Ar]3d⁶, not [Ar]3d⁴4s². The orbital energies shift once the d subshell starts to populate, so the order that governed filling no longer applies to ionisation — a point almost every introductory course glosses over.
Models, and where they stop
Slater's rules, the Kapustinskii equation and Pauling's ionic-character expression are all empirical fits, not derivations. They were built to reproduce measured numbers with arithmetic simple enough to do by hand, and they succeed at that within perhaps five or ten per cent. Where a page here quotes one, it says which — a figure from a fitted rule and a figure from a Born-Haber cycle are not the same kind of thing, even when they agree.