The electronic configuration of an atom is worked out through the filling of shells and subshells, in order to achieve the lowest energy state possible.