On a keto diet, you track net carbs rather than total carbs, and the basic formula is simple: subtract fiber and certain sugar substitutes from the total carbohydrates listed on a nutrition label. Most people need to keep net carbs between 20 and 50 grams per day to stay in ketosis, where the body burns fat for fuel instead of glucose.
The Net Carb Formula
For whole foods like vegetables, nuts, and avocados, the calculation is straightforward:
Net carbs = Total carbohydrates − Fiber
Fiber is a carbohydrate, but your body can’t break it down into glucose. Insoluble fiber passes through your digestive system unchanged, contributing zero calories and having no effect on blood sugar or insulin. Soluble fiber is partially fermented in the gut, but its impact on blood sugar is minimal enough that the keto community subtracts all fiber from the total. So if a cup of broccoli has 6 grams of total carbs and 2.4 grams of fiber, you count it as 3.6 grams of net carbs.
For packaged foods that contain sugar alcohols or specialty sweeteners, the formula gets one extra step.
How to Handle Sugar Alcohols
Sugar alcohols are sweeteners commonly found in “keto-friendly” bars, chocolates, and baked goods. They’re only partially absorbed by your body, so they raise blood sugar less than regular sugar. But not all sugar alcohols are equal, and this is where people make mistakes.
The general guideline, used by the UCSF Diabetes Teaching Center, is to subtract half the grams of sugar alcohol from total carbohydrates. Here’s how that works in practice: if a protein bar lists 29 grams of total carbohydrate and 18 grams of sugar alcohol, you divide the sugar alcohol by two (9 grams), then subtract that from the total. The result is 20 grams of net carbs, not the 11 grams you’d get if you subtracted all the sugar alcohol.
The exception is erythritol. It has virtually no impact on blood sugar and is almost entirely excreted unchanged by the body, so most keto practitioners subtract it completely. If a label lists 10 grams of sugar alcohol and the ingredient list shows erythritol as the only sugar alcohol, you can subtract all 10 grams.
Maltitol, on the other hand, is one of the worst offenders. It raises blood sugar nearly as much as table sugar, yet it still shows up in products marketed as low-carb. If you see maltitol in the ingredient list, subtract very little or none of it from your count.
The Allulose Exception
Allulose is a newer sweetener that’s become popular in keto products, and it creates a labeling quirk you should know about. The FDA requires manufacturers to include allulose in the “Total Carbohydrate” line on nutrition labels because it’s technically a carbohydrate. But allulose provides only 0.4 calories per gram (compared to 4 calories per gram for sugar) and has almost no effect on blood sugar.
This means a product sweetened with allulose can look surprisingly high in carbs on the label even though most of those carbs won’t affect ketosis. Check the ingredient list. If allulose is present, subtract its full amount from total carbohydrates along with fiber. Some newer labels are starting to break out allulose separately, but many still bury it in the total carb number.
Setting Your Daily Carb Target
Harvard’s School of Public Health defines the ketogenic diet as typically less than 50 grams of total carbs per day, and sometimes as low as 20 grams. In terms of net carbs, most people aim for 20 to 30 grams daily when starting out, since that range reliably triggers ketosis for the majority of adults.
You can also calculate your carb limit as a percentage of total calories. On a standard keto diet, carbs make up about 5% of daily calories. Each gram of carbohydrate contains 4 calories, so on a 2,000-calorie diet, 5% equals 100 calories from carbs, which works out to 25 grams. On a 2,500-calorie diet, the same percentage gives you about 31 grams.
The percentage method is useful if your calorie needs are unusually high or low, but for most people, simply targeting 20 to 30 grams of net carbs is easier to track and works just as well.
Reading Nutrition Labels Step by Step
Start at the “Total Carbohydrate” line. Directly below it, you’ll usually see “Dietary Fiber” and “Total Sugars” indented as sub-categories. Sugar alcohols may or may not be listed separately, depending on the product.
- Step 1: Note the total carbohydrate number.
- Step 2: Subtract all grams of dietary fiber.
- Step 3: Check the ingredient list for sugar alcohols. If present, subtract half their listed grams (or all of them if the only sugar alcohol is erythritol).
- Step 4: Check for allulose in the ingredient list. If it’s listed and you can identify the amount, subtract it entirely.
The number you’re left with is your net carb count for that serving.
Counting Carbs in Whole Foods
Whole foods like meat, eggs, and oils don’t come with nutrition labels, and many contain zero or negligible carbs. The foods that require careful tracking are vegetables, fruits, nuts, seeds, and dairy.
Leafy greens and above-ground vegetables tend to be low in net carbs. A cup of raw spinach has less than 1 gram. A cup of chopped cauliflower comes in around 3 grams. Below-ground vegetables like potatoes and carrots are significantly higher, often 10 or more net carbs per serving, and most keto dieters limit or avoid them.
Nuts vary widely. A one-ounce serving of pecans has about 1 gram of net carbs, while the same amount of cashews has closer to 8 grams. Berries are the most keto-compatible fruits, with a half-cup of raspberries providing around 3.5 grams of net carbs thanks to their high fiber content.
For whole foods, a food tracking app or a simple carb reference chart is the most practical tool. You don’t need to do mental math at every meal once you learn the net carb counts of your regular staples.
Common Mistakes That Inflate Your Count
The most frequent error is forgetting to subtract fiber, which makes vegetables seem more carb-heavy than they are and can lead you to unnecessarily restrict nutrient-dense foods. The second most common mistake goes in the opposite direction: subtracting all sugar alcohols instead of just half, which makes packaged keto snacks seem lower in carbs than they really are.
Serving sizes trip people up too. A “keto” chocolate bar might list 4 grams of net carbs per serving, but the bar contains 2.5 servings. If you eat the whole thing, you’ve consumed 10 grams, which could be a third to half of your entire daily budget.
Finally, hidden carbs in sauces, dressings, and condiments add up quickly. A single tablespoon of barbecue sauce can contain 6 or more grams of carbs, with no fiber to subtract. Tracking condiments separately, even roughly, prevents the kind of mystery carb creep that knocks people out of ketosis without an obvious explanation.

