million light-years (770 ± 40 kpc). In 2005, an eclipsing binary star was discovered in the Andromeda Galaxy. The binary is two hot blue stars of types O and B. By studying the eclipses of the stars, astronomers were able to measure their sizes. Knowing the sizes and temperatures of the stars, they were able to measure their absolute magnitude. When the visual and absolute magnitudes are known, the distance to the star can be calculated. The stars lie at a distance of and the whole Andromeda Galaxy at about . This new value is in excellent agreement with the previous, independent Cepheid-based distance value. The TRGB method was also used in 2005 giving a distance of . Averaged together, these distance estimates give a value of . Mass estimates Until 2018, mass estimates for the Andromeda Galaxy's halo (including dark matter) gave a value of approximately , compared to for the Milky Way. This contradicted earlier measurements that seemed to indicate that the Andromeda Galaxy and Milky Way are almost equal in mass. In 2018, the equality of mass was re-established by radio results as approximately . In 2006, the Andromeda Galaxy's spheroid was determined to have a higher stellar density than that of the Milky Way, and its galactic stellar disk was estimated at about twice the diameter of that of the Milky Way. The total mass of the Andromeda Galaxy is estimated to be between and . The stellar mass of M31 is , with 30% of that mass in the central bulge, 56% in the disk, and the remaining 14% in the stellar halo. The radio results (similar mass to the Milky Way Galaxy) should be taken as likeliest as of 2018, although clearly, this matter is still under active investigation by several research groups worldwide. As of 2019, current calculations based on escape velocity and dynamical mass measurements put the Andromeda Galaxy at , which is only half of the Milky Way's newer mass, calculated in 2019 at . In addition to stars, the Andromeda Galaxy's interstellar medium contains at least in the form of neutral hydrogen, at least as molecular hydrogen (within its innermost 10 kiloparsecs), and of dust. The Andromeda Galaxy is surrounded by a massive halo of hot gas that is estimated to contain half the mass of the stars in the galaxy. The nearly invisible halo stretches about a million light-years