Wall Street has decided to put both Dollar General (DG -2.37%) and Ulta Beauty (ULTA -0.32%) in the discount bin. The retail stocks are underperforming the S&P 500 this year even though they are growing and remain highly profitable.

Those positive factors could set the stage for excellent returns if you're willing to hold the stock through some volatility. With that in mind, let's look at which of these businesses would make the better fit for your portfolio today.

Growth matchup

The growth picture has become cloudier for both companies, yet sales are still marching higher. For Dollar General, revenue rose 7% last quarter, mainly thanks to its expanding store base. Revenue at existing locations for the discount chain was up just 2%.

Ulta Beauty's comparable-store sales were much stronger, increasing 9%, which came on top of the prior year's 18% spike. The spa and beauty products retailer is seeing unbalanced gains, though, as an 11% boost in traffic was offset by a 2% drop in average spending. Competitors are beginning to cut prices on makeup and skincare products, and that's pressuring sales trends.

Still, Ulta Beauty stock will appeal more to investors who are seeking market-beating growth trends. Wall Street pros, on average, expect Dollar General to boost sales by 4% this year, while Ulta Beauty grows by nearly 10%.

The higher margins

Operating profit margin is a popular metric to follow because it can tell you a lot about a business's competitive strengths. Ulta Beauty shines in this department. Yes, profitability is declining from pandemic highs right now. Executives are forecasting an operating margin of between 14.5% and 14.8% of sales in 2023, down from last year's 16% level. But that reduced rate still puts Ulta near the top of the retailing industry.

ULTA Operating Margin (TTM) Chart

ULTA Operating Margin (TTM) data by YCharts

Dollar General turns roughly 8% of sales into profits, for context. Ulta has room to expand its earnings power over time through more digital sales. It can tilt its merchandising toward more premium products when consumer demand rises as well. Give Ulta Beauty another point in this investing matchup.

The prices

Both stocks are available at a discount to the prices that investors were paying as recently as last year. This shrinking valuation reflects the fact that Wall Street sees slowing growth ahead for the retailers, along with some potential earnings challenges as consumer spending softens.

If you're a value fan, consider Dollar General here at less than 1 times annual sales. This discount retailer is highly likely to be setting new sales and earnings records in the years to come with help from an aggressive pace of new store launches.

Ulta Beauty has more of the ingredients found in attractive growth stocks, though, including a prime market position in a growing industry, high customer loyalty, and unusually strong profit margins. These factors should help management boost annual sales and earnings over the next several years, benefiting patient shareholders. In my view, Ulta Beauty is the better buy at today's prices.