Department store stocks have fallen out of favor in recent years thanks to investors' worries about the growth of and other e-commerce rivals. Kohl's (NYSE:KSS) is no exception. The company's focus on suburban strip malls rather than big, enclosed malls was once seen as a strength, but investors now fear that it is just as prone to disruption as rivals like Macy's (NYSE:M).

Kohl's stock plunged again early last week after Macy's offered up weak margin guidance at an investor meeting on Tuesday. (The stock regained some ground on Friday, though.) Kohl's shares have fallen more than 50% since peaking in early 2015 and have lost more than a third of their value in the last six months alone.

KSS Chart

Kohl's Stock Performance, data by YCharts.

However, despite investors' fears, Kohl's remains solidly profitable and is churning out tons of cash. At its current sub-$40 price, Kohl's stock looks like a bargain -- which is why I scooped up some shares last week.

Kohl's has become a value stock

A decade ago, Kohl's was a high-growth company. However, the department store giant never got its mojo back after the Great Recession. By 2012, revenue growth had ground to a halt. Additionally, Kohl's profit margin has eroded significantly since then, putting pressure on the company's earnings.

KSS Revenue (TTM) Chart

Kohl's Revenue (TTM), data by YCharts.

Indeed, while share buybacks have helped limit the damage to earnings per share, Kohl's EPS still remains well below the peak reached about five years ago.

Kohl's changing capital allocation strategy also highlights its shift from being a growth stock to being a value stock. Up until 2011, Kohl's did not pay any dividends. By contrast, it is now one of the highest-yielding stocks in the S&P 500. Even after a 7% surge in its share price on Friday, Kohl's stock carries a lofty 5.8% dividend yield.

Bad news at Macy's drags Kohl's down

At an investor meeting last week, Macy's CFO Karen Hoguet warned shareholders that gross margin would likely fall by 100 basis points (1 full percentage point) year over year for a second straight quarter in Q2. She also projected that gross margin would decline by 60-80 basis points for the full year.

This news dragged down Kohl's stock -- and shares of pretty much every other department store operator. (A similar scenario played out after Macy's first quarter earnings report last month.) Investors appear to be worried that other retailers will face the exact same problems that are hurting Macy's results.

Yet gross margin actually increased by 83 basis points year over year at Kohl's last quarter. This, along with solid cost control, helped drive a 26% jump in EPS.

As of last month, Kohl's management expected gross margin to continue increasing for the rest of fiscal 2017, albeit at a more modest rate. This suggests that Kohl's isn't exposed to the same margin pressures as Macy's right now.

Kohl's stock is cheaper than it looks

On average, analysts expect Kohl's to produce EPS of $3.66 this year and $3.63 next year. Kohl's stock currently trades for a little more than 10 times these estimates, which makes it seem relatively expensive compared to some of its peers in the department store space.

However, cash flow tells a different story. While Kohl's earnings are well below peak levels, the company generated record free cash flow of $1.3 billion last year.

Free cash flow is likely to remain well ahead of net income for the next few years. Because Kohl's isn't building many new stores these days, its capital expenditures are significantly less than the depreciation and amortization it reports on its income statement. Additionally, Kohl's is steadily reducing its inventory, particularly in lower-volume stores. Both factors boost free cash flow relative to net income.

The exterior of a Kohl's store

Kohl's still produces tons of free cash flow. Image source: Kohl's.

Thus, Kohl's could produce $1 billion or more of annual free cash flow in the next few years. From this perspective, Kohl's $6.5 billion market cap seems far too low.

A risk worth taking

There's a risk that Kohl's will eventually succumb to the same headwinds that are battering Macy's right now. That said, Kohl's unique real estate strategy means that its destiny isn't tied to the fate of indoor malls. Furthermore, the company's focus on promoting the most powerful brands is working. While customer traffic was sluggish in February, Kohl's posted solid sales results in the last two months of Q1.

Moves to reduce square footage and to carry less inventory should also help Kohl's rebuild its profit margin in the coming years. With Kohl's stock trading for significantly less than 10 times free cash flow, I believe the upside outweighs the potential downside for investors.