Unemployment hasn't been so low in years, wages are rising, consumer confidence is high and gasoline is cheap, all creating high expectations for department stores this holiday season.

So when Macy's and Kohl's reported lackluster holiday sales on Thursday, investors were taken aback, sending retail stocks into a tailspin and calling into question whether such mall-based chains can compete in a changing landscape where shoppers are shifting more of their spending online.

Macy's saw only a slight increase of 1.1 percent in sales during November-December at stores opened at least one year. And while sales were strong during Black Friday and Cyber Monday, the company said they fell off noticeably until the week of Christmas.

Get Breaking News Delivered to Your Inbox

Kohl's reported small sales growth that showed a dramatic slowdown from a year ago. Comparable sales rose 1.2 percent, versus 6.9 percent in the previous year.

In late afternoon trading on Thursday, shares of Macy's plummeted more than 18 percent, on track for their worst day ever. Kohl's stock was down around 5 percent. Even Target's stock took a hit, falling around 3 percent despite the chain posting robust sales over the holidays.

Earlier this week, J.C. Penney, one of the stragglers in the department store sector, reported a drop in comparable store sales of 3.5 percent for November and December. But because Macy's is considered a barometer for spending, particularly for the middle class and mall spending, investors may be looking for deeper meaning in its performance.

"Macy's report spooked investors because investors expected it to be a great holiday season across the board," said Neil Saunders, managing director at GlobalData Retail, a retail research firm. "Now, they're questioning how good the holiday season was. There's a lot of uncertainty out there."

Adding to the uncertainty is that investors will not be getting December's monthly retail sales data next week from the Commerce Department if the government shutdown is still in effect, as most observers expect. Saunders said investors are also worried that a recovery among traditional stores like Macy's is losing momentum, raising concerns that they might have to ramp up investments even more to increase sales.

Analysts said factors like a shift to online spending and consumer preferences for experiences like spas and restaurants have hurt impulse spending that likely put a dent in December's figures for Macy's and Kohl's.

Online retailers are relentlessly expanding their share of retail sales. In November, e-commerce and catalog sales jumped 10.8 percent from a year earlier, according to Commerce Department data, more than double the overall sales increase of 4.2 percent. Department store sales slipped 0.2 percent during the same period.

And Marshal Cohen, chief industry advisor at NPD Group, estimates that as much as 40 percent of shoppers bought experiential gifts this holiday season, up from 25 percent just a few years ago.

Analysts also point to factors that hit Macy's in particular. Some believe, for instance, the company may not have done enough to bring in consumers to make its merchandise and marketing compelling enough to compete against online players like Amazon.

Target, on the other hand, bucked the trend by posting strong online growth in November and December. Merchandise ordered online and picked up at stores surged 60 percent. Those sales are key to Target's campaign to hold online retailers like Amazon at bay, particularly during the competitive holiday season, because shoppers can dodge shipping fees.

Target said Thursday that sales at stores open at least a year increased 5.7 percent in the period, up from 3.4 percent a year earlier. Comparable online sales climbed 29 percent.

The company still expects full-year adjusted earnings in a range of $5.30 to $5.50 per share. Analysts polled by FactSet foresee $5.39 per share. That Target simply maintained its outlook may have disappointed investors.

Macy's on Thursday lowered its fiscal 2018 earnings outlook to $3.95 to $4 per share from its prior per-share earnings for $4.10 to $4.30. That's well below the per-share projections of $4.23 from industry analysts.