What does a fast-food restaurant chain have in common with discount retailers? On the surface, not a lot. Look deeper, though. There is a common thread -- and it's that customers of both kinds of companies are looking for value.

This premise is backed up by a recent comment from McDonald's (MCD -0.91%) CEO Christopher Kempczinski -- and it ought to be encouraging to current and would-be shareholders of Dollar Tree (DLTR 0.04%) and Dollar General (DG -0.41%).

Let's see what Kempczinski had to say and why it makes both discount chains attractive stocks to consider now. 

"Trading down"

The comment in question came from Kempczinski during an earnings call for the company's second quarter, which saw sales up 11.7% year over year. Kempczinski had this to say about last quarter's customer mix:

If you look at incomes under $100,000, we're actually doing quite well there, which suggests that we're getting some benefit from trade down, from things like full-service dining, casual dine, et cetera.

And then even if you go to incomes of $45,000 and less, our business is performing well there. What we're seeing with that group is we are seeing a little bit of a decrease in order size. But it's being offset by a very strong or continued strength in traffic.

CFO Ian Borden reaffirmed that point, saying, "We are seeing some consumers that are kind of trading down from those more premium or higher-priced items in the menu to more core and value." He added, "I think the consumer still remains under pressure, obviously, with the macro context, with all of the inflationary impacts that they're seeing on their kind of their basket of goods and obviously with rising interest rates."

Translation: Money is tight for a lot of households right now. However, they're still spending when and where and how they reasonably can.

Same customers, same mindset

Great, but what's that got to do with Dollar General and Dollar Tree (which is also parent to Family Dollar)? More than you might think. If consumers are "trading down" their meal sizes as well as their entire meal-out experiences, they're likely doing the same on other fronts.

Namely, they may be comparing prices on a variety of goods and finding Dollar General and Dollar Tree offer meaningfully better bargains than their nearby grocery store or even Walmart.

It's certainly not a stretch to suggest the possibility. Former Dollar General CEO Todd Vasos noted at an industry conference late last year that "the highest trade-in [business growth] that we've seen and the most robust has actually been between the $75,000 and $100,000 [in annual income] group."

And The Wall Street Journal reported in June that the so-called "one-percenters" -- the highest of the high earners -- were more than content to look for bargains in dollar stores. Numbers from Morning Consult suggest this crowd is now 15% more likely to shop in a dollar store than they were a year ago, jibing with Kempczinski's comments.

Kempczinski's cited stratification of households annually earning $45,000 or less should be a familiar one for Dollar General and Dollar Tree investors. Dollar General's former CEO confirmed in September that the company's "core customer" earns less than $40,000 per year.

Connect the dots. These are the same consumers, and they're still spending money. They're just more careful than usual right now about how they're spending it. Dollar Tree, Family Dollar, and Dollar General no doubt are enjoying the same rush of these new customers by helping this crowd make their discretionary and non-discretionary dollars go further.

Bolstering the case for Dollar Tree, Dollar General

Most investors probably already intuitively knew that consumers are tightening up their spending habits in the shadow of lingering inflation. And they likely knew such adjustments are being made in areas ranging from restaurants to household goods to apparel to groceries.

Now they know for sure, though, from the chief of what's perhaps the country's single-best consumer inflation and consumer-confidence barometer.

This should bode well for Dollar Tree and Dollar General's upcoming earnings announcements, the latter of which really needs a win. Its previous quarter's same-store sales were only up an anemic 1.6% year over year, leading to a small decline in operating profits. Struggling businesses aren't turned around overnight, but the current economic backdrop is one that firmly favors its value-minded business model.

To this end, analysts' estimates for 5.5% overall revenue growth for Dollar General's recently ended quarter are not only not out of line but might be conservative. These same analysts, meanwhile, are calling for very plausible 6% sales growth for Doller Tree's quarter ended late last month. That outlook may be a bit too conservative as well.

Bottom line? Neither Dollar Tree nor Dollar General shares have been particularly great performers of late. This might be a great time to sneak into either stock at a bargain price -- not unlike the bargains a bunch of cost-conscious consumers are finding in their stores now.