Molecular Formulas Section 11.4. Caffeine Caffeine is known medically as trimethylxanthine, and the chemical formula is C 8 H 10 N 4 O 2 It’s important.