It’s a paramount consideration for most wine consumers, yet the industry likes to keep us guessing.
The relative dryness of a wine is measured in terms of residual sugar, or RS in the wine geek’s argot. This is the level of natural grape sugar left after fermentation. Once grapes are crushed, yeast feeds off grape sugar to produce alcohol and carbon dioxide. It’s hard to predict exactly how yeast will behave, and they rarely finish the job completely, mainly because some sugars are not easily fermented. There’s always a little sugar left, even in the case of “dry” wines, though the level is pretty trivial. Technically, a wine is considered dry if it contains less than two grams of sugar per litre of fluid. But even here the perceived dryness of the wine depends on a host of other components, most notably acidity. If there’s a lot of acidity in the wine (as in the case of, say, riesling), it can still taste pretty dry even if it contains much more than two grams per litre.
To produce off-dry or sweet wines, winemakers will intentionally halt fermentation prematurely, usually by controlling temperature. Chilling the vat paralyzes the yeasts, halting them from completing the job. Alternatively, many dessert wines are produced from dried grapes, essentially raisins, which contain a higher sugar-to-juice concentration. The yeasts will gorge till they get their fill, then die off as the alcohol rises, leaving behind lots of extra sugar. Many dessert wines contain much more than 100 grams of sugar per litre. Sweet port is made in yet another way, by halting fermentation halfway through the process with the addition of high-alcohol spirit. That extra alcohol instantly kills the yeast, once again leaving behind lots of natural grape sugar.
Still curious? read Kevin Zraly's Complete Wine Course.