Accurate methods for assessing body composition in subjects with obesity and anorexia nervosa (AN) are important for determination of metabolic and cardiovascular risk factors and to monitor therapeutic interventions. The purpose of our study was to assess the accuracy of dual-energy X-ray absorptiometry (DXA) for measuring abdominal and thigh fat, and thigh muscle mass in premenopausal women with obesity, AN, and normal weight compared to computed tomography (CT). In addition, we wanted to assess the impact of hydration on DXA-derived measures of body composition by using bioelectrical impedance analysis (BIA). We studied a total of 91 premenopausal women (34 obese, 39 with AN, and 18 lean controls). Our results demonstrate strong correlations between DXA- and CT-derived body composition measurements in AN, obese, and lean controls (r = 0.77–0.95, P < 0.0001). After controlling for total body water (TBW), the correlation coefficients were comparable. DXA trunk fat correlated with CT visceral fat (r = 0.51–0.70, P < 0.0001). DXA underestimated trunk and thigh fat and overestimated thigh muscle mass and this error increased with increasing weight. Our study showed that DXA is a useful method for assessing body composition in premenopausal women within the phenotypic spectrum ranging from obesity to AN. However, it is important to recognize that DXA may not accurately assess body composition in markedly obese women. The level of hydration does not significantly affect most DXA body composition measurements, with the exceptions of thigh fat.