Bosonic condensates of exciton polaritons (light-matter quasiparticles in a semiconductor) provide a solid-state platform for studies of nonequilibrium quantum systems with a spontaneous macroscopic coherence. These driven, dissipative condensates typically coexist and interact with an incoherent reservoir, which undermines measurements of key parameters of the condensate. Here, we overcome this limitation by creating a high-density exciton-polariton condensate in an optically induced box trap. In this so-called Thomas-Fermi regime, the condensate is fully separated from the reservoir and its behavior is dominated by interparticle interactions. We use this regime to directly measure the polariton-polariton interaction strength, and reduce the existing uncertainty in its value from four orders of magnitude to within three times the theoretical prediction. The Thomas-Fermi regime has previously been demonstrated only in ultracold atomic gases in thermal equilibrium. In a nonequilibrium exciton-polariton system, this regime offers a novel opportunity to study interaction-driven effects unmasked by an incoherent reservoir.