There is more than one kind of sugar, but the chemical formula for ordinary table sugar or sucrose is C12H22O11. Sucrose is a disaccharide, or a chemical composed of two sugars. "Di" means two, and "saccharide" means sugar.
Sucrose is made by using a condensation reaction to combine moderately sweet glucose and very sweet fructose, both monosaccharides. The condensation reaction eliminates a water molecule.
There are other types of sugars, such as galactose, maltose and lactose.
Glucose, galactose and fructose, all monosaccharides, have the same molecular formula but vary in molecular structure.
Lactose, sucrose and maltose, three common disaccharides, also have the same molecular formula but different structural formula.