State-of-the-art methods for calculating neutral excitation energies are typically demanding and limited to single electron-hole pairs and their composite plasmons. Here we introduce excitonic density-functional theory (XDFT) a computationally light, generally applicable, first-principles technique for calculating neutral excitations based on generalized constrained DFT. In order to simulate an M-particle excited state of an N-electron system, XDFT automatically optimizes a constraining potential to confine N-M electrons within the ground-state Kohn-Sham valence subspace. We demonstrate the efficacy of XDFT by calculating the lowest single-particle singlet and triplet excitation energies of the well-known Thiel molecular test set, with results which are in excellent agreement with time-dependent DFT. Furthermore, going beyond the capability of adiabatic time-dependent DFT, we show that XDFT can successfully capture double excitations. Overall our method makes optical gaps, excition bindings and oscillator strengths readily accessible at a computational cost comparable to that of standard DFT. As such, XDFT appears as an ideal candidate to work within high-throughput discovery frameworks and within linear-scaling methods for large systems.