During anaerobic glycolysis, glucose is broken down into pyruvate (or lactate in animals), generating 4 ATP molecules, but 2 ATP are consumed during the initial steps. Therefore, the net ATP gain is:
\[
\text{Net ATP} = 4 - 2 = 2 \text{ ATP}
\]
This process does not involve oxygen and is the primary source of energy in anaerobic conditions.