The Andromeda Galaxy (/ænˈdrɒmɨdə/) is a spiral galaxy approximately 2.5 million light-years (2.4×1019 km) from Earth in the Andromeda constellation. Also known as Messier 31, M31, or NGC 224, it is often referred to as the Great Andromeda Nebula in older texts. The Andromeda Galaxy is the nearest spiral galaxy to our Milky Way galaxy, but not the closest galaxy overall. It gets its name from the area of the sky in which it appears, the constellation of Andromeda, which was named after the mythological princess Andromeda. The Andromeda Galaxy is the largest galaxy of the Local Group, which also contains the Milky Way, the Triangulum Galaxy, and about 30 other smaller galaxies. Although the largest, the Andromeda Galaxy may not be the most massive, as recent findings suggest that the Milky Way contains more dark matter and could be the most massive in the grouping. The 2006 observations by the Spitzer Space Telescope revealed that M31 contains one trillion (1012) stars: at least twice the number of stars in the Milky Way galaxy, which is estimated to be 200–400 billion.
The Andromeda Galaxy is estimated to be 7.1×1011 solar masses. In comparison a 2009 study estimated that the Milky Way and M31 are about equal in mass, while a 2006 study put the mass of the Milky Way at ~80% of the mass of the Andromeda Galaxy. The two galaxies are expected to collide in 3.75 billion years, eventually merging to form a giant elliptical galaxy.
At an apparent magnitude of 3.4, the Andromeda Galaxy is notable for being one of the brightest Messier objects, making it visible to the naked eye on moonless nights even when viewed from areas with moderate light pollution. Although it appears more than six times as wide as the full Moon when photographed through a larger telescope, only the brighter central region is visible to the naked eye or when viewed using binoculars or a small telescope.