Wood does not have a chemical formula because it is not an individual chemical compound but is made up of many chemical structures. Within its cellular structure, there are three chemical components which are principally composed of carbon, oxygen and hydrogen. These three chemical components are cellulose, hemicellulose, and lignin.
Cellulose provides reinforcing fibers, which creates wood's rigidity, stiffness and flexibility. Hemicellulose surrounds these cellulose fibers, helping to protect and support them. Lignin helps to maintain the wood's plasticity and rigidity, making it resistant to decay and attacks from insects that could otherwise prove fatal. It is due to lignin that wood's exterior is bark.