We present a variational function that targets excited states directly based on their position in the energy spectrum, along with a Monte Carlo method for its evaluation and minimization whose cost scales polynomially for a wide class of approximate wave functions. Being compatible with both real and Fock space and open and periodic boundary conditions, the method has the potential to impact many areas of chemistry, physics, and materials science. Initial tests on doubly excited states show that using this method, the Hilbert space Jastrow antisymmetric geminal power ansatz can deliver order-of-magnitude improvements in accuracy relative to equation of motion coupled cluster theory, while a very modest real space multi-Slater Jastrow expansion can achieve accuracies within 0.1 eV of the best theoretical benchmarks for the carbon dimer.The ground state variational principle is probably the most important technique in modern electronic structure theory. Through its roles in optimizing Slater determinants in Hartree Fock (HF) [1] and density functional theory (DFT) [2], the matrix product state (MPS) in density matrix renormalization group (DMRG) [3,4], trial functions in variational Monte Carlo (VMC) [5], and linear combinations in configuration interaction (CI) [6], it exists as a critical element in the vast majority of ground state electronic structure methods used today. Its success rests on the existence of a functionwhose global minimum is the Hamiltonian's ground eigenstate. This function provides a metric telling us which parameterization of an approximate ansatz is closest to the true ground state, thus allowing us to optimize the ansatz's full variational freedom for that state alone without regard to the description of any other state. In practice, of course, we are constrained in our choice of ansatz to those permitting an efficient evaluation of E. This constraint notwithstanding, the ground state variational principle has become an essential part of most electronic structure methods, even those like coupled cluster (CC) theory [7] whose practical application involves nonvariational methods as well.To date, the lack of an efficient analogous function for excited states has hindered the development of methods that can target such states in the same individual and variational way. Instead, existing excited state methods typically require an ansatz to use its variational freedom to satisfy the needs of many eigenstates simultaneously, the difficulty of which has limited our predictive power over the doubly-excited states in light harvesting systems, the spectra of excited state absorption experiments, and the band gaps of transition metal oxides. , and LR DMRG [10][11][12] are limited by the requirement that all excited states of interest must be found in the ground state's LR space, which for a nonlinear ansatz is typically much less flexible than its full variational space. In many other cases, such as state-averaged complete active space methods [13,14], some VMC approaches [15], and directly targete...