Carbon cycle
The carbon cycle is the biogeochemical cycle by which carbon is exchanged between the biosphere, geosphere, hydrosphere, and atmosphere of the Earth.
The cycle is usually thought of as four major reservoirs of carbon interconnected by pathways of exchange. The reservoirs are the atmosphere, the terrestrial biosphere (which usually includes freshwater systems and non-living organic material, such as soil carbon), the oceans (which includes dissolved inorganic carbon and living and non-living marine biota), and the sediments (which includes fossil fuels). The annual movements of carbon, the carbon exchanges between reservoirs, occur because of various chemical, physical, geological, and biological processes. The ocean contains the largest active pool of carbon near the surface of the Earth, but the deep ocean part of this pool does not rapidly exchange with the atmosphere.
The global carbon budget is the balance of the exchanges (incomes and losses) of carbon between the carbon reservoirs or between one specific loop (e.g., atmosphere - biosphere) of the carbon cycle. An examination of the carbon budget of a pool or reservoir can provide information about whether the pool or reservoir is functioning as a source or sink for carbon dioxide.

# In the atmosphere
Carbon exists in the Earth's atmosphere primarily as the gas carbon dioxide (CO2). Although it is a very tiny percent of the atmosphere  (approximately 0.04% on a molar basis, though rising), it plays an important role in supporting life. Other gases containing carbon in the atmosphere are methane and chlorofluorocarbons (the latter is entirely anthropogenic). The overall atmospheric concentration of these greenhouse gases has been increasing in recent decades, theoretically contributing to global warming. Because of their size and composition, these houses are rarely collected in such traps, so most biogeochemical analyses have erroneously ignored them.
Carbon storage in the biosphere is influenced by a number of processes on different time-scales: while net primary productivity follows a diurnal and seasonal cycle, carbon can be stored up to several hundreds of years in trees and up to thousands of years in soils. Changes in those long term carbon pools (e.g. through de- or afforestation or through temperature-related changes in soil respiration) may thus affect global climate change.

# In the ocean
The oceans contain around 36,000 gigatonnes of carbon, mostly in the form of bicarbonate ion. Inorganic carbon, that is carbon compounds with no carbon-carbon or carbon-hydrogen bonds, is important in its reactions within water. This carbon exchange becomes important in controlling pH in the ocean and can also vary as a source or sink for carbon. Carbon is readily exchanged between the atmosphere and ocean. In regions of oceanic upwelling, carbon is released to the atmosphere. Conversely, regions of downwelling transfer carbon (CO2) from the atmosphere to the ocean. When CO2 enters the ocean, carbonic acid is formed:
This reaction has a forward and reverse rate, that is it achieves a chemical equilibrium. Another reaction important in controlling oceanic pH levels is the release of hydrogen ions and bicarbonate. This reaction controls large changes in pH:
In the oceans, bicarbonate can combine with calcium to form limestone (calcium carbonate, CaCO3, with silica), which precipitates to the ocean floor. Limestone is the largest reservoir of carbon in the carbon cycle. The calcium comes from the weathering of calcium-silicate rocks, which causes the silicon in the rocks to combine with oxygen to form sand or quartz (silicon dioxide), leaving calcium ions available to form 
limestone.