We present a simple algorithm, which we call the maximum overlap method (MOM), for finding excited-state solutions to self-consistent field (SCF) equations. Instead of using the aufbau principle, the algorithm maximizes the overlap between the occupied orbitals on successive SCF iterations. This prevents variational collapse to the ground state and guides the SCF process toward the nearest, rat...