One teaspoon of sugar is about 4 grams. It comes out to 4.2 precisely. I recommend just finding a measurement converter online for when you need to do these types of calculations.
First of all, the type of sugar makes a difference. The following number is calculated with granulated white sugar. One teaspoon has approximately 4.2 grams of sugar.