The Caffeine Molecule: Structure, Mass and How Many Molecules Are in a Cup
Caffeine is a small molecule with 24 atoms: 8 carbon, 10 hydrogen, 4 nitrogen and 2 oxygen. This page draws it, places it beside its close chemical relatives and converts milligrams into millimoles and molecule counts, so that the numbers on a drink label become something you can picture.
What the molecule looks like
The core is a purine: a six-membered ring fused to a five-membered ring, sharing one bond. Three methyl groups, written CH3, sit on nitrogen atoms. Two oxygen atoms are attached to ring carbons as carbonyl groups. The one hydrogen on the five-membered ring is drawn on the right.
The chemical name follows the methyl groups. Caffeine is 1,3,7-trimethylxanthine, which means a xanthine core with methyl groups on nitrogen positions 1, 3 and 7. Moving or removing a methyl group gives its relatives.
Caffeine and its closest relatives
Changing the methyl groups on the xanthine core gives a family called the methylxanthines. Three common relatives each have one methyl group fewer than caffeine.
| Compound | Chemical name | Formula | Molar mass (g/mol) |
|---|---|---|---|
| Caffeine | 1,3,7-trimethylxanthine | C8H10N4O2 | 194.19 |
| Theobromine | 3,7-dimethylxanthine | C7H8N4O2 | 180.16 |
| Theophylline | 1,3-dimethylxanthine | C7H8N4O2 | 180.16 |
| Paraxanthine | 1,7-dimethylxanthine | C7H8N4O2 | 180.16 |
Molar masses are the values PubChem lists: 194.19 g/mol for caffeine and 180.16 g/mol for each of the three relatives.
Notice that theobromine, theophylline and paraxanthine share one formula and one mass but differ in which nitrogen lost its methyl group. Chemists call such molecules isomers.
Physical properties
| Property | Value | Source |
|---|---|---|
| Molar mass | 194.19 g/mol | PubChem |
| Sublimation point | 178 °C at atmospheric pressure | PubChem, experimental properties |
| Solubility in water | 21.6 mg/mL at 25 °C | PubChem, experimental properties |
Melting point is left out on purpose. Reported values differ a little between sources: PubChem lists several, from 235 to 238 °C. The US Food and Drug Administration adds a practical figure: rapid consumption of around 1,200 milligrams, less than half a teaspoon of pure caffeine, can be followed by toxic effects such as seizures, according to the FDA's estimate.
Milligrams to moles and molecules
Enter an amount of caffeine in milligrams.
Method: moles equal mass divided by the molar mass of 194.19 g/mol. Molecules equal moles times 6.02214076 × 1023, the Avogadro constant fixed in the 2019 SI definition. Concentration equals millimoles divided by liters. It assumes the caffeine is fully dissolved in the volume you give.
| Amount | Millimoles | Molecules |
|---|---|---|
| 100 mg | 0.515 | 3.10 × 1020 |
| 400 mg (FDA daily figure for most healthy adults) | 2.060 | 1.24 × 1021 |
| 1,200 mg (FDA: rapid intake linked to toxic effects) | 6.180 | 3.72 × 1021 |
Frequently asked questions
What is the chemical formula of caffeine?
Caffeine is C8H10N4O2, with a molar mass of 194.19 grams per mole. Its chemical name is 1,3,7-trimethylxanthine.
How is caffeine different from theobromine?
Theobromine is 3,7-dimethylxanthine. It has one methyl group fewer than caffeine, which is 1,3,7-trimethylxanthine, and so a slightly smaller molar mass.
How many molecules are in a 95 mg dose?
About 2.95 times 10 to the power of 20, which is 0.489 millimoles multiplied by the Avogadro constant.
Does this page tell me how much caffeine is safe?
No. It deals with the chemistry of the molecule. The FDA cites 400 milligrams a day for most healthy adults, and a doctor can advise you on your own limit.
About this site
caffeine.pics is an independent informational site about the chemistry of caffeine. It sells nothing, runs no affiliate links and shows no ads. The drawing was made for this page. Figures come from PubChem (US National Library of Medicine), the 2019 SI definition of the Avogadro constant and the US Food and Drug Administration update "Spilling the Beans: How Much Caffeine Is Too Much?". Last reviewed: November 2026.
Educational content, not professional advice.