caffeine.pics

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

Skeletal structure of caffeine A six-membered ring fused to a five-membered ring. Two carbonyl oxygens, three methyl groups on nitrogen atoms, and one hydrogen on the carbon of the five-membered ring. NNNN OO CH₃CH₃CH₃H
Caffeine, C8H10N4O2. Nitrogen atoms are blue, oxygen atoms red, and every unlabeled corner is a carbon atom.

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.

CompoundChemical nameFormulaMolar mass (g/mol)
Caffeine1,3,7-trimethylxanthineC8H10N4O2194.19
Theobromine3,7-dimethylxanthineC7H8N4O2180.16
Theophylline1,3-dimethylxanthineC7H8N4O2180.16
Paraxanthine1,7-dimethylxanthineC7H8N4O2180.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

PropertyValueSource
Molar mass194.19 g/molPubChem
Sublimation point178 °C at atmospheric pressurePubChem, experimental properties
Solubility in water21.6 mg/mL at 25 °CPubChem, 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.

AmountMillimolesMolecules
100 mg0.5153.10 × 1020
400 mg (FDA daily figure for most healthy adults)2.0601.24 × 1021
1,200 mg (FDA: rapid intake linked to toxic effects)6.1803.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.