Photosynthesis is the process by which plants, algae, and some bacteria use sunlight, carbon dioxide, and water to produce oxygen and energy in the form of glucose. It occurs in the chloroplasts of plant cells and involves two stages - the light reaction which uses energy from sunlight to make ATP and NADPH, and the Calvin cycle which uses these products to fix carbon from carbon dioxide into organic molecules to fuel the plant's metabolism. The main pigments involved are chlorophyll a and b which absorb light to drive the process, and carotenoids which also absorb some wavelengths of light. Photosynthesis provides nutrients and oxygen for other organisms.