Acceleration of particles and plasma heating is one of the fundamental problems in solar flare physics. An accurate determination of the spectrum of flare energized electrons over a broad energy range is crucial for our understanding of aspects such as the acceleration mechanism and the total flare energy. Recent years have seen a growing interest in the kappa-distribution as representation of the total spectrum of flare accelerated electrons. In this work we present the kappa-distribution as a differential emission measure. This allows for inferring the electron distribution from X-ray observations and EUV observations by simultaneously fitting the proposed function to RHESSI and SDO/AIA data. This yields the spatially integrated electron spectra of a coronal source between less than 0.1 keV up to several tens of keV. The method is applied to a single-loop GOES C4.1 flare. The results show that the total energy can only be determined accurately by combining RHESSI and AIA observations. Simultaneously fitting the proposed representation of the kappa-distribution reduces the electron number density in the analyzed flare by a factor of ~30 and the total flare energy by a factor of ~5 compared with the commonly used fitting of RHESSI spectra. The spatially integrated electron spectrum of the investigated flare between 0.043 keV and 24 keV is consistent with the combination of a low-temperature (~2 MK) component and a hot (~11 MK) kappa-like component with spectral index 4, reminiscent of solar wind distributions.