Sugar is the name of a group of organic compounds such as glucose, fructose and sucrose. Each of these compounds can be expressed by its own unique chemical formula, almost always as CnHnOn, where "n" is often a number between 3 and 7.
Fructose and glucose can each be expressed as C6H12O6, though the exact configuration of their atoms varies. When they combine and release a molecule of H20, the result is common table sugar. The white, granulated sugar crystals most often used in cooking or baking are technically known as sucrose; this compound has a chemical formula of C12H22O11.