The atmospheres of all the planets came from gases present when the solar system first formed. Some of these gases are very light, and much of their volume that was present on the smaller planets escaped into space. The present-day atmospheres of the terrestrial planets -- Mercury, Venus, Earth and Mars -- came about through a process called outgassing. After the planets formed, gases slowly vented from their interiors.
Solar Nebula and Primitive Atmosphere
About 5 billion years ago, the sun and planets formed from a pocket of gas and dust astronomers refer to as the solar nebula; the bulk of its material consisted of hydrogen and helium with a small percentage of other elements. The large planets that eventually became the gas giants -- Uranus, Neptune, Saturn and Jupiter -- have gravity strong enough to have captured and held onto hydrogen and helium, the lightest gases. The inner planets, however, were too small to hold any significant amounts of these gases; according to Vanderbilt University, their primitive atmospheres were very thin compared to what they currently have.
Outgassing and Secondary Atmospheres
According to Penn State University, the planets started out as small blobs of material that accumulated under the force of mutual gravitational attraction. The energy of billions of collisions kept the early planets hot and nearly liquid. Several million years passed before their surfaces cooled sufficiently to form a solid crust. After their formation, the terrestrial planets released gases such as carbon dioxide, argon and nitrogen through volcanic eruptions that were much more common during their first several millions of years. The gravity of the larger terrestrial planets is strong enough to have retained most of these heavier gases. Gradually, the planets built up secondary atmospheres.
Earth and Venus
The Earth’s early atmosphere is believed to have had a large percentage of carbon dioxide; this is also true for Venus. On Earth, however, plant life and photosynthesis converted nearly all the CO2 in the atmosphere into oxygen. As Venus has no known life, its atmosphere has remained almost completely CO2, producing a strong greenhouse effect and keeping the planet’s surface hot enough to melt lead. Although volcanoes on Earth continue to vent over 130 million tons of carbon dioxide each year, their contribution to atmospheric CO2 is comparatively small.
The atmosphere on Mars is very thin compared to Earth and Venus; its gases have leaked into space because of the planet’s weak gravity, giving it a surface pressure of about 0.6 percent that of Earth’s. Despite this difference, the chemical makeup of the Martian atmosphere is similar to that of Venus: It is 95 percent CO2 and 2.7 percent nitrogen compared to 96 percent and 3.5 percent for Venus.
Although Mercury likely went through a period of outgassing early in its history, it has very little atmosphere currently; in fact, its surface pressure is a very hard vacuum. As the smallest of the terrestrial planets, its hold on atmospheric gases of any kind is weak.