Lactic acid and citric acid are two small carbon-based molecules, both of which have acidic properties. While they're common in foods -- they occur both naturally and as additives -- they're also important metabolic intermediates. This means that your body produces both lactic acid and citric acid in the process of burning fuel molecules for energy.
Lactic acid has the chemical formula C3H6O3. It's a very small molecule that occurs in many foods, including fermented dairy products. Certain bacteria break down the sugars in milk and make lactic acid, which reacts with milk proteins. This causes the milk to thicken and develop a creamy or curdy texture and sour flavor. Yogurt is an example of a fermented dairy product whose texture and flavor both depend upon the presence of lactic acid.
Citric acid is a larger molecule than lactic acid, with the chemical formula C6H8O7. It's similar in many ways to lactic acid, however: they have similar chemical properties and react under many of the same conditions. Citric acid occurs naturally in many foods, especially fruits and vegetables. It's also a common food preservative -- citric acid increases the acidity of foods and makes it harder for bacteria to grow.
Lactic Acid in the Body
Your cells -- and the cells of many other living organisms -- produce lactic acid under certain circumstances. When you burn sugars for energy in the absence of sufficient oxygen, you convert the sugars first into molecules called pyruvate. You then convert pyruvate into lactic acid. This entire process, called fermentation, results in the production of a small amount of energy. In humans, this process occurs most frequently in hard-working muscles -- lactic acid is responsible for the muscle burn you feel during sprint and power efforts.
Citric Acid in the Body
You produce citric acid, like lactic acid, during cellular metabolism. Unlike lactic acid production, however, citric acid production occurs only when your cells have plenty of oxygen available to them. In fact, the formation of citric acid is the first step of the important metabolic pathway called the Krebs cycle, which is responsible for the vast majority of energy production in human cells.