An atmosphere (from Ancient Greek ἀτμός (atmós) 'vapour, steam', and σφαῖρα (sphaîra) 'sphere') is a layer of gas or layers of gases that envelop a planet, and is held in place by the gravity of the planetary body. A planet retains an atmosphere when the gravity is great and the temperature of the atmosphere is low. A stellar atmosphere is the outer region of a star, which includes the layers above the opaque photosphere; stars of low temperature might have outer atmospheres containing compound molecules.
The atmosphere of Earth is composed of nitrogen (78 %), oxygen (21 %), argon (0.9 %), carbon dioxide (0.04 %) and trace gases. Most organisms use oxygen for respiration; lightning and bacteria perform nitrogen fixation to produce ammonia that is used to make nucleotides and amino acids; plants, algae, and cyanobacteria use carbon dioxide for photosynthesis. The layered composition of the atmosphere minimises the harmful effects of sunlight, ultraviolet radiation, solar wind, and cosmic rays to protect organisms from genetic damage. The current composition of the atmosphere of the Earth is the product of billions of years of biochemical modification of the paleoatmosphere by living organisms.