Aims. We study the dark matter content in early-type galaxies and investigate whether X-ray luminosities of early-type galaxies are determined by the surrounding gravitational potential. Methods. We derived gravitational mass profiles of 22 early-type galaxies observed with XMM-Newton and Chandra. Results. Sixteen galaxies show constant or decreasing radial temperature profiles, and their X-ray luminosities are consistent with kinematical energy input from stellar mass loss. The temperature profiles of the other 6 galaxies increase with radius, and their X-ray luminosities are significantly higher. The integrated mass-to-light ratio of each galaxy is constant at that of stars within 0.5-1 r e , and increases with radius, where r e is the effective radius of a galaxy. The scatter of the central mass-to-light ratio of galaxies was less in K-band light. At 3 r e , the integrated mass-to-light ratios of galaxies with flat or decreasing temperature profiles are twice the value at 0.5 r e , where the stellar mass dominates, and at 6 r e , these increase to three times the value at 0.5 r e . Conclusions. This feature should reflect common dark and stellar mass distributions in early-type galaxies: within 3 r e , the mass of dark matter is similar to the stellar mass, while within 6 r e , the former is larger than the latter by a factor of two. In contrast, X-ray luminous galaxies have higher gravitational mass in the outer regions than X-ray faint galaxies. We describe these X-ray luminous galaxies as the central objects of large potential structures; the presence or absence of this potential is the main source of the large scatter in the X-ray luminosity.