Dietary fiber is indeed completely or almost completely indigestible. That’s how it is defined: those parts of our foods that provide us with no vitamins, minerals, or even calories.
Chemically, the fiber compounds in plants are complex carbohydrates. They are therefore included in the total amounts of carbohydrates listed on the labels.
Sometimes the chart will break the dietary fiber down into soluble and insoluble fiber, but they’re both noncaloric anyway. The “other carbohydrates” listed are sugars, sugar alcohols, and, well, other carbohydrates, mostly starches. All the numbers should add up to the number of grams of “Total Carbohydrates.”
The number of carbohydrate calories, however, comes only from the digestible carbohydrates: from the starches and sugars that you would expect. If you subtract the number of grams of fiber from the number of grams of total carbohydrates, you’ll have the approximate number of grams of nutritional carbohydrates, which, at 4 calories per gram, should equal the number of carbohydrate calories in the chart.
I said “approximate” because there may be other carbohydrates hiding somewhere off the Nutrition Facts charts of many foods, the sugar alcohols, for example, which include glycerol, mannitol, sorbitol, inositol, and xylitol (in fact, anything in the ingredient list ending in -ol).
They are present in relatively small amounts as sweeteners, but they are metabolized less completely than sugars and therefore contribute fewer calories.