During photosynthesis, chlorophyll absorb light energy that is used to convert carbon dioxide from the air and water from the soil into glucose. Oxygen is released as a by-product. Some glucose is used for respiration, while some is converted into insoluble starch.
Photosynthesis occurs in plants and in some algae. The process takes place in the chloroplasts, primarily in plant leaves. Carbon dioxide enters the leaves through the stomates by diffusion, and water is transported to the leaves in the xylem. The energy harvested through light reaction is stored by forming adenosine triphosphate, or ATP, a chemical compound used for energy storage. This process is called the "dark reaction" and takes place in the stroma. During the Calvin cycle, carbon dioxide and energy from ATP are used to create sugar. Oxygen exits the leaves through the stomata by diffusion, while the plant reuses the water or the water exits through the stomata as water vapor. The plant can combine glucose molecules to form cellulose.
During hot, dry weather, plants keep their stomates closed to decrease the amount of water that evaporates. This results in lower carbon dioxide levels in their leaves, so the plants must stop doing photosynthesis. Most photosynthesis occurs in Earth's oceans, carried out by organisms such as algae and diatoms.