Photosynthesis is a chemical process that converts carbon dioxide into organic compounds, especially sugars, using the energy from sunlight. Photosynthesis occurs in plants, algae, and many species of bacteria. Photosynthetic organisms are called photoautotrophs, since they can create their own food. In plants, algae, and cyanobacteria, photosynthesis uses carbon dioxide and water, releasing oxygen as a waste product. Photosynthesis is vital for all aerobic life on Earth. In addition to maintaining normal levels of oxygen in the atmosphere, photosynthesis is the source of energy for nearly all life on earth, either directly, through primary production, or indirectly, as the ultimate source of the energy in their food, the exceptions being chemoautotrophs that live in rocks or around deep sea hydrothermal vents. The rate of energy capture by photosynthesis is immense, approximately 100 terawatts, which is about six times larger than the power consumption of human civilization. As well as energy, photosynthesis is also the source of the carbon in all the organic compounds within organisms' bodies. In all, photosynthetic organisms convert around 100–115 petagrams of carbon into biomass per year.
Although photosynthesis can happen in different ways in different species, some features are always the same. For example, the process always begins when energy from light is absorbed by proteins called photosynthetic reaction centers that contain chlorophylls. In plants, these proteins are held inside organelles called chloroplasts, while in bacteria they are embedded in the plasma membrane. Some of the light energy gathered by chlorophylls is stored in the form of adenosine triphosphate (ATP). The rest of the energy is used to remove electrons from a substance such as water. These electrons are then used in the reactions that turn carbon dioxide into organic compounds. In plants, algae and cyanobacteria, this is done by a sequence of reactions called the Calvin cycle, but different sets of reactions are found in some bacteria, such as the reverse Krebs cycle in Chlorobium. Many photosynthetic organisms haveadaptations that concentrate or store carbon dioxide. This helps reduce a wasteful process called photorespiration that can consume part of the sugar produced during photosynthesis.