Shares of SanDisk (NASDAQ: SNDK) reached an all-time high on Monday as the market surged higher. With shares up more than 60% over the last year, the stock still trades at a moderate P/E of 18.9. While that's in line with competitor Western Digital (WDC -1.26%), it's well above others like Micron Technology (MU -0.27%) and Seagate Technology (STX).

If you look at SanDisk's cash flow over the last twelve months, it looks a bit overvalued even compared to the high-flying Micron. Although free cash flow has climbed 188% over the last 12 months compared to the prior 12 months, SanDisk has been unable to outpace the competition.

Let's take a closer look at SanDisk's cash flow and see if it's still a good buy.

SanDisk's cash flow
SanDisk has been able to capitalize on the growth of smartphones and tablets through the sale of SSDs and is in a great position with its Enterprise SSD segment as more businesses convert to SSDs from hard drives made by Western Digital or Seagate. As a result, revenue more than doubled over the last five years, and net income turned positive once again.

SNDK Free Cash Flow (TTM) Chart

Source: SanDisk free cash flow data by YCharts.

Over the last 12 months, SanDisk generated $6.34 billion in revenue, netting $1.15 in profits. Free cash flow was slightly higher than net income at $1.57 billion. That means the company turned 24.8% of revenue into free cash flow.

Here's how that stacks up with the competition:

Company

Revenue (ttm)

FCF (ttm)

FCF/Revenue

SanDisk

$6.34 billion

$1.57 billion

24.8%

Micron Technology

$13.31 billion

$2.72 billion

20.4%

Western Digital

$15.21 billion

$2.19 billion

14.4%

Seagate

$13.85 billion

$1.81 billion

13.1%

Source: Yahoo! Finance.

A closer look at SanDisk's cash flow
In order to understand the quality of SanDisk's cash flows, we'll have to take a deeper dive into its cash flow statements.

The company has seen an increase in depreciation after heavy capital expenditure on property and equipment. The latter has decreased in the last twelve months freeing up further cash flow, but not to a concerning degree. Meanwhile, inventories and accounts payable both declined by a small amount. At the same time, accounts receivable declined significantly, which is a sign the company is collecting payments faster.

Line Item

Contribution to Free Cash Flow (TTM)

Net Income

$1.145 billion

Depreciation

$233 million

Change in Inventories

($36 million)

Change in Accounts Payable

($39 million)

Change in Accounts Receivable

($151 million)

Source: SanDisk 10-Q and 10-K.

Overall, the percentage of free cash flow coming from less replicable sources is increasing. For example, the impairment line increased significantly and capital expenditures decreased significantly. On the other hand, net income more than doubled over the previous 12 months.

Valuation
On a price-to-FCF basis, SanDisk is expensive relative to its peers. With a market cap of around $20.6 billion, SanDisk is priced at 13.1 times FCF. Comparatively, Micron Technology trades for 10.8 times FCF, Western Digital trades for 8.8 times FCF, and Seagate trades for 9.0 times FCF.

With much stronger growth expected from Micron compared to SanDisk, SanDisk may be overvalued. At the same time, however, secular trends regarding SSDs and NAND memory bode well for the company.

Don't sell just yet
Although SanDisk's cash flows are increasing rapidly, they've failed to keep up with the torrid pace of its competitor, Micron. While it might make sense for SanDisk to be priced at a premium to hard drive makers Seagate and Western Digital, Micron is growing much more quickly and should trade more in line with SanDisk.

The investment thesis remains intact, however, and SanDisk is poised to capitalize on the growing demand for SSDs. So, while shares may not present great value to buyers, investors with a stake in the company would be smart to hold onto the stock for now.