Deriving a well-constrained differential emission measure (DEM) distribution for solar flares has historically been difficult, primarily because no single instrument is sensitive to the full range of coronal temperatures observed in flares, from ≲2 to ≳50 MK. We present a new technique, combining extreme ultraviolet (EUV) spectra from the EUV Variability Experiment (EVE) onboard the Solar Dynamics Observatory with X-ray spectra from the Reuven Ramaty High Energy Solar Spectroscopic Imager (RHESSI), to derive, for the first time, a self-consistent, well-constrained DEM for jointlyobserved solar flares. EVE is sensitive to ~2-25 MK thermal plasma emission, and RHESSI to ≳10 MK; together, the two instruments cover the full range of flare coronal plasma temperatures. We have validated the new technique on artificial test data, and apply it to two X-class flares from solar cycle 24 to determine the flare DEM and its temporal evolution; the constraints on the thermal emission derived from the EVE data also constrain the low-energy cutoff of the nonthermal electrons, a crucial parameter for flare energetics. The DEM analysis can also be used to predict the soft X-ray flux in the poorly-observed ~0.4-5 nm range, with important applications for geospace science.