How Many Carbs in an Onion? Raw, Cooked & Keto

A medium raw yellow onion (about 110 grams) contains roughly 10 grams of total carbohydrates. Per 100 grams, that breaks down to 8.6 grams of carbs, 1.9 grams of fiber, and 5.8 grams of sugar. Whether you’re counting carbs for keto, managing blood sugar, or just curious, onions land in a moderate range for vegetables.

Carbs in a Raw Yellow Onion

Yellow onions are the most common variety in kitchens, and they carry 8.6 grams of carbs per 100 grams (about 3.5 ounces). Most of those carbs come from simple sugars, primarily fructose and glucose, which is why onions turn sweet when you caramelize them. The remaining carbs come from fiber (1.9 grams per 100 grams) and small amounts of starch.

Onion sizes vary more than you might expect. A small onion weighs around 110 to 125 grams, while a medium one can range from 150 to 175 grams, and a large onion often hits 225 grams or more. That means a large onion could easily contain 19 to 22 grams of total carbs, more than double what’s in a small one. If you’re tracking closely, weighing your onion is more reliable than estimating by size.

Net Carbs for Low-Carb and Keto Diets

To calculate net carbs, you subtract fiber from total carbohydrates. For 100 grams of raw yellow onion, that’s 8.6 minus 1.9, giving you 6.7 grams of net carbs. A medium onion (around 150 grams) comes to roughly 10 grams of net carbs.

On a standard keto diet capping net carbs at 20 to 50 grams per day, a whole onion can eat up a meaningful chunk of your allowance. That doesn’t mean you need to avoid onions entirely. A few slices on a burger or a quarter of an onion diced into a stir-fry adds flavor without blowing your carb budget. The key is being aware that onions contribute more carbs than many people realize for a vegetable.

How Other Onion Types Compare

Not all onions carry the same carb load. Green onions (scallions) are significantly lower: half a cup of chopped green onion contains just 2 grams of carbs and 0.6 grams of fiber. That makes them one of the most keto-friendly options in the onion family. You can use them generously as a garnish or in salads without much impact on your daily count.

Shallots, on the other hand, are considerably higher in carbs than yellow onions. Per 100 grams, shallots pack 16.8 grams of carbs, nearly double the 9.3 grams in the same amount of onion. Shallots are typically used in smaller quantities, but it’s worth knowing they’re the most carb-dense option in this family if you’re measuring carefully.

Cooking Changes the Math

Cooking doesn’t destroy the carbohydrates in onions, but it does change the volume. When you sauté or caramelize onions, they lose water and shrink dramatically. A full cup of raw chopped onion cooks down to a few tablespoons. The carbs that were spread through that whole cup are now concentrated into a much smaller portion, so it’s easy to eat more carbs than you’d expect from what looks like a modest amount of cooked onion.

If you’re tracking, measure your onions before cooking. A cup of raw chopped onion (about 160 grams) contains roughly 14 grams of total carbs. That number stays the same after cooking, even though the pile on your plate looks much smaller.

Onions vs. Other Common Vegetables

Compared to leafy greens and cruciferous vegetables, onions are moderately high in carbs. Spinach has about 1.4 grams of carbs per 100 grams, broccoli around 7 grams, and bell peppers roughly 6 grams. Onions sit at 8.6 grams, placing them above most vegetables people consider “low carb” but well below starchy options like potatoes (17 grams) or corn (19 grams).

For most people not following a strict carb limit, onions are a nutritious addition to meals with a modest calorie cost of just 38 calories per 100 grams. They also provide small amounts of vitamin C, B vitamins, and potassium. The fiber content, while not dramatic at 1.9 grams per 100 grams, contributes to your daily intake. Where onions deserve attention is in low-carb diets where the grams add up quickly, especially if you’re using them as a base ingredient in soups, sauces, or stews where multiple onions might go into a single pot.