You need someone more scientific than I. Hopefully someone will be along. Does this help at all?
Q. How do you calculate the numbers on the table?
A. The numbers on the table are expressed as "percent of calories" (protein, fat, carbohydrate) or "amount per 100 calories" (fiber, phosphorus), based on as-fed information provided by the manufacturer. For pet foods, I follow the usual assumption that protein and carbohydrate each contain 3.5 calories per gram, and fat contains 8.5 calories per gram. You can use this Excel spreadsheet to see how the calculations are done, or read the longer explanation:
1.) Obtain "as fed" or "dry weight" values of protein, fat, carbohydrate, fiber, and phosphorus from manufacturer. Cross check: if you also have values for water and ash, the values of protein, fat, carbohydrate, fiber, ash, and water should add up to 100%. None of them should be negative.
2.) Calculate the amount of protein, etc, in 100 grams of food by dropping the percent sign. (Example: if a food is 9.5% protein, 100 grams of that food will contain 9.5 grams of protein.)
3.) Calculate total calories by multiplying protein by 3.5, fat by 8.5, and carbohydrate by 3.5, and summing the results.
4.) Calculate percent of calories from protein by dividing 3.5*protein by total calories. Calculate percent of calories from fat by dividing 8.5*fat by total calories. Calculate percent of calories from carbohydrate by dividing 3.5*carbohydrate by total calories. Cross-check: these numbers should add up to 100%, except for rounding error.
5.) Calculate grams of fiber per 100 calories by dividing fiber by total calories and multiplying by 100.
6.) Calculate mg of phosphorus per 100 calories by dividing phosphorus by total calories and multiplying by 100,000. (The extra 1000 is to change the units of phosphorus from grams to milligrams.)