Photosynthesis is the process by which plants and some other organisms use sunlight, water and carbon dioxide to produce oxygen and energy in the form of sugars and starches. It occurs in two stages - the light-dependent reactions capture energy from sunlight and convert it to chemical energy in the form of ATP, while the light-independent reactions use that energy to convert carbon dioxide and water into glucose. Photosynthesis takes place in chloroplasts within plant leaves, and it is essential for producing oxygen for animals and humans to breathe, and for providing food and energy for plants, animals and humans.