Use this fiber calculator food chart to estimate fiber and protein in an edible portion, or find the food weight for a fiber amount you choose. Select a food and its preparation state, enter a weight or household measure, and optionally check your own minimum protein per portion. The result is food arithmetic, not a daily fiber goal. For interpretation and meal ideas, read foods that provide both protein and fiber.
Calculate fiber and protein in your portion
Your entries stay in this browser. This calculator makes no network requests and does not save your numbers.
Turn on JavaScript for interactive results, or use the food chart and formulas below to calculate by hand.

Which food entries are included?
The food list uses USDA FoodData Central’s SR Legacy final release from April 2018, checked in November 2026. The entries below were individually checked for protein, total dietary fiber and household weights. The chart uses a shared weight so you can inspect the numbers behind the calculator; it does not rank foods or suggest portions. USDA describes SR Legacy as historical data drawn from analyses, calculations and published literature.
| Food | Fiber per 100 g | Protein per 100 g | Example USDA measure |
|---|---|---|---|
| Lentils, boiled without salt | 7.9 g | 9.0 g | 1 cup (198 g) |
| Tofu, raw, firm, calcium sulfate | 2.3 g | 17 g | 0.5 cup (126 g) |
| Chickpeas, boiled without salt | 7.6 g | 8.9 g | 1 cup (164 g) |
| Black beans, boiled without salt | 8.7 g | 8.9 g | 1 cup (172 g) |
| Almonds, raw | 12.5 g | 21 g | 1 cup, whole (143 g) |
| Chia seeds, dried | 34.4 g | 17 g | 1 oz (28.35 g) |
A household measure is a convenience for that particular entry. A cup of cooked lentils does not have the same weight as a cup of whole almonds. The selector keeps the USDA portion description attached to its weight. For nuts, sliced, slivered and whole forms have separate cup weights. When you can weigh the food, choose grams and use the edible weight that matches the listed state. See protein in beans and lentils for a broader comparison, including preparation differences.
How does the food fiber calculation work?
The calculator scales the USDA nutrient amounts in direct proportion to food weight. Fiber means total dietary fiber, nutrient ID 1079; protein is nutrient ID 1003. Both are taken from the same food entry. If you know food grams, fiber = food grams × fiber per 100 g ÷ 100, and protein = food grams × protein per 100 g ÷ 100. If you choose a household measure, food grams = measure count × that measure’s USDA gram weight.
The reverse calculation uses the same relationship: food grams = chosen fiber grams ÷ fiber per 100 g × 100. Protein then scales at that calculated food weight. Only displayed results are rounded: food weight and fiber to the nearest tenth of a gram, and protein to whole grams at 10 g or more, otherwise to the nearest tenth. Positive amounts below 0.05 g display as “<0.1 g” so a tiny amount is not presented as zero. The protein criterion compares unrounded values, so the displayed rounding never decides whether a portion meets your minimum.
A worked lentil example
Suppose you choose 5 g of fiber from boiled lentils and enter a minimum of 6 g protein. These are example inputs you chose, not recommended targets. USDA SR Legacy lists 7.9 g fiber and 9.02 g protein per 100 g for this food.
The food weight is 5 ÷ 7.9 × 100 = about 63.3 g. At the unrounded weight, protein is (5 ÷ 7.9 × 100) × 9.02 ÷ 100 = about 5.7 g. That portion supplies the chosen fiber amount but does not meet the example protein minimum. A different food or portion may give a different balance; the tool does not silently enlarge your portion to satisfy both criteria.
What happens with invalid or missing inputs?
For an invalid-input example, entering −50 g is rejected rather than converted into a negative nutrient result. Blank required amounts, letters, infinity and scientific notation are also rejected. Enter a plain nonnegative decimal, without a unit or thousands separator; the field label provides the unit. Leaving the optional protein criterion blank simply skips that comparison.
Zero is a valid amount and returns zero nutrients for a known food. A food with known zero fiber can be scaled by food weight, but cannot be used for the reverse calculation because that would divide by zero. Missing fiber is unknown and prevents output; missing protein is shown as unknown and cannot pass a protein criterion. All included entries have both nutrients available. These rules also protect future additions to the food list.
The input limits are 5,000 g of food, 200 g of chosen fiber, 100 household measures and 500 g of minimum protein. A reverse calculation or household conversion that exceeds the food-weight limit is rejected. These are practical software limits, not safe intake limits or suggested servings. An oversized result is a reason to reconsider the chosen amount and food, not a recommendation to eat it.
What can this estimate tell you?
The estimate tells you what accompanies a selected portion in this USDA dataset. It does not measure your particular batch, predict fullness, treat constipation or decide a universal fiber prescription. Changing the food’s preparation changes the match: cooked legumes, dry seeds and raw tofu should not be treated as interchangeable weights. Sauces and other ingredients need their own entries in a food log. A packaged product’s label may be a better match for that exact product than a generic historical entry.
For pregnancy, kidney disease, a bowel condition or a medically managed diet, ask your care team how fiber and protein fit your plan. Do not use this portion calculation to replace individualized dietary advice. The tool does not derive a daily fiber goal from energy intake and does not reproduce an app’s daily-goal calculation.
Your next step can be simple: weigh the edible portion, record its preparation state, and log the estimated protein for the amount you actually ate. Keep the fiber estimate beside it if useful. For meal planning beyond a single portion, see plant protein basics and protein in nuts and seeds.
Sources
- USDA Agricultural Research Service. FoodData Central, SR Legacy final release, April 2018. Lentils (FDC 172421); firm tofu, calcium sulfate (FDC 172475); chickpeas (FDC 173757); black beans (FDC 173735); almonds (FDC 170567); dried chia seeds (FDC 170554). Protein nutrient ID 1003, total dietary fiber ID 1079, and food_portion gram weights. Individually checked November 11, 2026. SR Legacy April 2018 source-data downloads.
- USDA Agricultural Research Service. FoodData Central Data Type Documentation. Release and data-type descriptions, accessed November 11, 2026.
This article is general information, not medical advice. If you have a health condition, are pregnant, or follow a diet set by your doctor, talk to them or a registered dietitian before changing how you eat.