The Hartree–Fock (HF) method, widely used for the calculation of ground state properties, in recent years has been extended for calculating excited states. In this article, we develop an approach, which does not require time consuming calculations and can give a good approximation for the excitation energies. The method is based on the fact that the subspaces of the occupied and virtual orbitals are mutually orthogonal. We test the accuracy of our method by evaluating the excited state wavefunctions and the corresponding energies for the Li, N, F, Ne, and Na atoms and for the BeH and CH molecules, and we found good agreement with configuration interaction and experimental results. © 2012 Wiley Periodicals, Inc.