Photosynthesis
The process by which plants, algae, and some bacteria convert light energy into chemical energy, releasing oxygen as a byproduct.

Photosynthesis is the biological process that converts light energy into chemical energy. Plants, algae, and cyanobacteria capture sunlight and use it to build carbohydrates from carbon dioxide and water, releasing oxygen as a byproduct. The overall reaction is:
6 CO2 + 6 H2O + light energy → C6H12O6 + 6 O2
In plants the process takes place in chloroplasts, organelles that contain the green pigment chlorophyll. Chlorophyll absorbs light most strongly in the red and blue parts of the spectrum and reflects green, which is why leaves are green. The process has two main stages, which occur in different parts of the chloroplast.
The light-dependent reactions take place in the thylakoid membranes. Photosystems capture photons, whose energy drives the splitting of water molecules — releasing oxygen — and the transport of electrons along an electron transport chain. This builds a proton gradient that drives the synthesis of ATP, while the electrons reduce NADP+ to NADPH. The products are ATP and NADPH, the energy and reducing power needed by the next stage.
The Calvin cycle takes place in the stroma, the fluid surrounding the thylakoids. Using ATP and NADPH, the enzyme RuBisCO fixes carbon dioxide onto a five-carbon acceptor (ribulose-1,5-bisphosphate), producing molecules that are rearranged into three-carbon sugars (G3P). Most of the fixed carbon regenerates the acceptor; the remainder is exported to build glucose, sucrose, starch, and the full range of plant biomolecules. RuBisCO is often called the most abundant protein on Earth.
The equation above is a summary, not a mechanism: the oxygen released comes from water, not from carbon dioxide — a fact established with isotope tracers by Samuel Ruben and Martin Kamen in 1941. Many plants supplement the basic C3 pathway with C4 or CAM mechanisms that concentrate carbon dioxide around RuBisCO, reducing the wasteful side reaction of photorespiration in hot, dry climates.
Photosynthesis is the primary entry point of energy into the biosphere. It produces the oxygen in the atmosphere, supplies the organic carbon that feeds nearly all food chains, and drives the carbon cycle: the carbon in wood, fossil fuels, and every organism was fixed from CO2 by photosynthesis. Cellular respiration, including the citric acid cycle, is the complementary process that releases that energy again.