Two gases make up the bulk of the earth's atmosphere: nitrogen (N), which comprises 78% of the atmosphere, and oxygen (O), which accounts for 21%. Various trace gases make up the remainder. Based on temperature, the atmosphere is divided into four layers: the troposphere, stratosphere, mesosphere, and thermosphere.