(CNN) Yes, dark chocolate has compounds that offer health benefits and can be enjoyed without guilt, even on a daily basis. But the portion size matters, since too many bites can contribute extra fat, sugar and calories and negate its health benefits.

Dark chocolate is rich in cocoa solids, which contain compounds known as flavanols. At high levels, cocoa flavanols have been shown to help lower blood pressure and cholesterol, improve cognition and possibly lower the risk of diabetes. Dark chocolate has the highest amount of cocoa flavanols; milk chocolate has less, and white chocolate has none.

But while cocoa flavanols in dark chocolate make it a healthful treat, they give it a bitter flavor. Manufacturers may process chocolate to make it more palatable, but doing so can remove some of these beneficial compounds

Factors in processing, including fermentation and roasting, which deepen the flavor and give chocolate its distinct aroma, can affect flavanol content, explained Matt Hartings, assistant professor of chemistry at American University.

"Roasting generates all sorts of new flavors ... and to generate those flavors, you have to destroy molecules in the unroasted bean ... and there is always the chance that it is destroying compounds that we want around, including flavanols," Hartings said.

Though the flavanol content may vary among dark chocolate brands, it's still a healthier choice than milk chocolate, which also tends to have more sugar.

If you need more justification to enjoy dark chocolate, consider this: A third of the fat in cocoa butter is stearic acid, a saturated fat that, unlike other saturated fats, appears to have a neutral effect on blood cholesterol . Additionally, cocoa powder contributes minerals, including calcium, copper, iron, magnesium, phosphorus, potassium and zinc.

So feel free to enjoy a piece of dark chocolate after a meal. Just keep a few facts in mind before you indulge.

First, buy chocolate that is at least 60% cacao (i.e. cocoa). Generally speaking, the higher the percentage, the more flavanols, though the exact amount varies from batch to batch and depends on the extent of processing, according to Hartings.

"These higher-percentage chocolates have the added benefit over the lower percentages and milk and white chocolates because they contain less sugar and less fat," he said.

Second, if possible, choose natural cocoa over Dutch processed cocoa, which is treated with an alkali, a compound that neutralizes acid. This gives chocolate a milder flavor but removes healthful flavanols.

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

If you are cooking, the ultimate choice of cocoa will depend on the recipe, according to Hartings. "Some things are just better if you bake with Dutch processed cocoa," he said. "If one ingredient in a recipe is highly acidic, then with natural cocoa, it may be too acidic."

And finally, to keep weight in check, limit portions to 1 ounce of dark chocolate daily, or about 150 calories.