How many grams in a cup of chocolate chips comes down to the size and shape of the pieces. A cup is a measure of space, and bigger pieces leave bigger gaps.
USDA FoodData Central notes that 1 ounce of regular semisweet chips is about 60 pieces. That means a full cup of 6 ounces holds roughly 360 chips. Counting is never needed in baking, but it shows how small each chip is, about half a gram each.
King Arthur Baking lists chopped chocolate at the same 170 grams per cup as chips. Chopped pieces are uneven, though, so the cup weight can shift with how fine you chop. When a recipe swaps a chocolate bar for chips, match the weight instead of the cups. For example, 1 cup of chips equals 6 ounces, or 170 grams, of chopped bar chocolate.
For cocoa powder, which is much lighter at 84 grams per cup, see our cocoa powder grams to cups chart.