Plants and algae perform photosynthesis, which converts carbon dioxide and water into glucose and oxygen using energy from sunlight. Photosynthesis occurs in chloroplasts and uses chlorophyll to absorb light, which drives the production of ATP and NADPH that fuel the Calvin cycle to produce glucose from carbon dioxide. It is an essential process that generates oxygen and forms the base of the food chain sustaining all life on Earth.