This hidden carbs calculator works by using the formula (Fat X 9 calories per gram) + (Carb X 4 calories per gram) + (Protein X 4 calories per gram) = total calories. The calculator takes the difference between the calories listed on the label and the calculated calories and divides that result by 4 to arrive at the answer. It then adds that number of grams to the carbohydrate grams listed on the label. This hidden carb calculator assumes that all missing calories are from hidden carbohydrates.