Carbohydrates example based on a 2,000 calorie diet:

Carbohydrates = (x(0.5)/4) grams

(2000(0.3)/9) = 250g