The Andromeda–Milky Way collision is a galactic collision predicted to occur in about 4 billion years between the two largest galaxies in the Local Group—the Milky Way (which contains the Solar System and Earth) and the Andromeda Galaxy, although the stars involved are sufficiently far apart that it is improbable that any of them will individually collide. However some stars will be ejected from the resulting galaxy, nicknamed Milkomeda or Milkdromeda.
While the Andromeda Galaxy contains about 1 trillion (1012) stars and the Milky Way contains about 300 billion (3×1011), the chance of even two stars colliding is negligible because of the huge distances between the stars. For example, the nearest star to the Sun is Proxima Centauri, about 4.2 light-years (4.0×1013 km; 2.5×1013 mi) or 30 million (3×107) solar diameters away. If the Sun were a ping-pong ball, Proxima Centauri would be a pea about 1,100 km (680 mi) away, and the Milky Way would be about 30 million km (19 million mi) wide. Although stars are more common near the centres of each galaxy, the average distance between stars is still 160 billion (1.6×1011) km (100 billion mi). That is analogous to one ping-pong ball every 3.2 km (2.0 mi). Thus, it is extremely unlikely that any two stars from the merging galaxies would collide.
The Milky Way and Andromeda galaxies each contain a central supermassive black hole, these being Sagittarius A* (ca. ×106 M☉) and an object within the 3.6P2 concentration of Andromeda's nucleus (×108 M☉). These black holes will converge near the center of the newly formed galaxy, transferring 1–2orbital energy to stars that will be moved to higher orbits by gravitationally interacting with them, in a process that may take millions of years. When they come within one light year of one another, they will emit gravitational waves that will radiate further orbital energy until they merge completely. Gas taken up by the combined black hole could create a luminous quasar or an active galactic nucleus. As of 2006, simulations indicated that the Sun might be brought near the center of the combined galaxy, potentially coming near one of the black holes before being ejected entirely out of the galaxy.