This article was written by Serge, MSc. Plant Biologist and Environmental Scientist with a BSc in Plant Biology and an MSc in Environmental Biology and Biogeochemistry. My research focused on climate change effects on boreal forest ecosystems. I write from field experience, not just literature.
People talk about CBD and THC as if they were opposites, one calming and legal, the other the thing that gets you high. At the chemistry level the truth is stranger: they are nearly the same molecule, built by the plant from the same starting material, and the difference between them comes down to a single change in shape.
I want to show you how Cannabis sativa actually builds these compounds, and what that one structural difference really is, because it is a clearer and more interesting story than the marketing around either compound suggests.
This is a chemistry explainer. I am not going to talk about effects, doses, or what to buy. I want to stay on what the plant is doing, which is the part I find most worth understanding.
Everything starts from one compound
Here is the fact that makes cannabis chemistry click into place: the plant does not build CBD and THC separately. It builds one precursor first, and everything else branches off from that.
This is where my background is useful. During my training I studied how plants build their compounds, and cannabinoids are a good example of something I find genuinely interesting: they are a hybrid of two separate building routes meeting in one molecule.
One half comes from the terpenoid pathway, the same isoprenoid route that builds the aromatic compounds in so many plants, and it arrives as a piece called geranyl pyrophosphate. The other half comes from a different route entirely, a polyketide pathway, and it arrives as olivetolic acid.
An enzyme joins these two halves together, and the result is CBGA, cannabigerolic acid. That meeting of two pathways in a single compound is not something you see explained on most CBD pages, but it is the real starting point, and it is why cannabinoids sit chemically where they do, part terpenoid, part polyketide.
CBGA is often called the mother cannabinoid, and the name is fair, because nearly every other cannabinoid the plant makes starts from it. So before the plant has any CBD or THC at all, it has CBGA, sitting ready to be turned into one thing or another.
The branch point: which cannabinoid the plant makes
What happens next is the actual difference between the two famous cannabinoids, and it is decided by enzymes.
The plant has different enzymes that act on CBGA. One enzyme, CBDA synthase, converts CBGA into CBDA (cannabidiolic acid). A different enzyme, THCA synthase, converts the very same CBGA into THCA (tetrahydrocannabinolic acid). A third route makes CBCA (cannabichromenic acid). Same starting compound, different enzymes, different products.
Which one a particular plant makes most of comes down largely to its genetics, that is, which of these enzymes the plant’s genes tell it to produce. This is the real reason hemp varieties are high in CBDA and low in THCA, while other varieties are the reverse. It is not a different process. It is the same precursor sent down a different branch by a different enzyme. That single idea explains most of the difference between plant types that people otherwise find confusing.
Notice these are the acid forms, CBDA and THCA, with an “A” on the end. That matters for the next step.

Why raw and heated cannabis are chemically different
In the living plant, there is very little actual CBD or THC. What the plant holds is mostly CBDA and THCA, the acid forms. To become the CBD and THC people talk about, those acids have to lose part of their structure, a carboxyl group, which leaves as carbon dioxide. This step is called decarboxylation, and it mostly happens with heat or, more slowly, with time and exposure to air.
This is a very useful thing to understand: raw cannabis and heated cannabis are not chemically the same. The acids and their decarboxylated forms are different molecules. The plant makes the acids; heat converts them. It is one of the clearest examples I know of how a plant compound is not a fixed thing but a step in a chain that keeps changing with conditions.
It is also worth clearing up a common point of confusion: you cannot simply heat the CBD branch and get THC. The branch a plant takes is set earlier, by which enzyme acted on the CBGA. Decarboxylation only removes the carboxyl group from whichever acid is already there; it turns CBDA into CBD and THCA into THC, but it does not turn one branch into the other.
Same formula, different shape
Now to the part everyone asks about: how are CBD and THC actually different?
The surprising answer is that they are made of exactly the same atoms in the same number. Both share the molecular formula C21H30O2, twenty-one carbon atoms, thirty hydrogen, two oxygen. By that count they are identical. Compounds like this, same formula but arranged differently, are called isomers.
The difference is how those atoms are arranged. In THC, part of the molecule closes up into a ring. In CBD, that same part stays open. That is the core of it: one closed ring versus one open arrangement, built from the identical set of atoms.
That single difference in shape is why the two behave so differently. The shape of a molecule decides whether it fits into a particular site in the body. THC’s closed-ring shape fits one particular receptor in the brain; CBD’s open shape does not fit that same receptor in the same way.
I am staying on the structural side here rather than the biological effects, but the point is that the difference in what they do traces directly back to that one difference in shape, not to them being fundamentally different kinds of molecule. They are almost the same molecule, parted by a single structural turn.
That, to me, is the interesting thing about cannabis chemistry. Not the hype around either compound, but that the plant builds them both from one precursor, and that the gap between them is as small as a ring that either closes or stays open.
Common Questions
What is the chemical difference between CBD and THC?
They have the identical molecular formula, C21H30O2, so they are made of the same atoms in the same number. The difference is arrangement: in THC part of the molecule closes into a ring, while in CBD that part stays open. That single structural difference is why they behave differently.
Are CBD and THC the same formula?
Yes. Both are C21H30O2. Compounds that share a formula but differ in how the atoms are arranged are called isomers, and CBD and THC are a classic example.
How does the cannabis plant make CBD?
It first builds a precursor called CBGA by joining a terpenoid piece and a polyketide piece. An enzyme (CBDA synthase) then converts CBGA into CBDA, and heat or time later converts CBDA into CBD.
What is CBGA?
CBGA, cannabigerolic acid, is the compound the plant makes first and from which most other cannabinoids branch. It is often called the mother cannabinoid because CBDA, THCA, CBCA and others are all made from it.
Why does heating cannabis change its chemistry?
Because the plant mostly contains the acid forms, CBDA and THCA. Heat drives off part of their structure in a step called decarboxylation, converting them into CBD and THC. Raw and heated cannabis therefore contain different molecules.
Why is one cannabis plant high in CBD and another high in THC?
Because of genetics. The plant’s genes decide which enzyme acts on the shared precursor CBGA, sending it down the CBDA branch or the THCA branch. The starting material is the same; the enzyme balance differs.

















