The Andromeda Galaxy 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 nearest 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.
The Andromeda Galaxy is probably the most massive galaxy in the Local Group as well, despite earlier findings that suggested 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 3.4, the apparent magnitude of Andromeda Galaxy is one of the brightest of any 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.