Implemented by the Wine Council of Ontario in Canada, the sugar code of a wine is a numerical representation of its sweetness. Save for very dry wines, Sugar Codes are calculated:

Sugar Code = SR / W

Where

SR is residual sugar in grams
W  is volume of wine in litres

The amount of sugar is most often measured colourimetrically using refractometers.
```Grams of              Sugar Code        Apparent Sweetness
Sugar per Litre

0 to 4.9                0                Very Dry
5.0 to 14.9               1                Dry
15.0 to 24.9               2                Dry
25.0 to 34.9               3                Medium
35.0 to 44.9               4                Medium
45.0 to 54.9               5                Medium
55.0 to 64.9               6                Medium
65.0 to 74.9               7                Sweet
75.0 to 84.9               8
85.0 to 94.9               9
...                        ...              ...
195.0 to 204.9             20
205.0 to 214.9             21
215.0 to 224.9             22
225.0 to 234.9             23
235.0 to 244.9             24
245.0 to 254.9             25
```
Ice wines often have a sugar code of 20 or more.

Consider that a can of Coke (with approximately 40 g of sugar per 355 mL can) would have an sugar code of close to 110.