Everything old is new again. For years, we've read stories about how people aren't buying PCs anymore, and how that was lousy news for computer hard drive makers like Western Digital (NASDAQ:WDC) and Seagate Technology (NASDAQ:STX) -- but no more. Yesterday, Wall Street analysts at Longbow Research and JPMorgan simultaneously decided to recommend buying shares of both of these big hard drive makers.

Here are three things you need to know about why they did that.

Hard disk drive.

Hard disk drives (HDDs) are in focus on Wall Street this week. Image source: Getty Images.

1. Upgrading Seagate...

We begin our story with Seagate, upgraded on Tuesday from neutral to buy at Longbow Research, with a $55 price target. Last month, as you may recall, we talked a bit about Goldman Sachs and its upgrade of Seagate storage rival Micron Technology (NASDAQ:MU), which Goldman said would benefit from "tight" supplies of NAND flash memory around the globe.

That was good news for Micron, which makes a lot of money from NAND. It may also be good news for Seagate, though (which like Micron -- and like Western Digital -- also makes NAND memory). This is because, as TheFly.com reports, "shortages of NAND are causing demand for hard disk drives to rise" as an alternative to flash memory. Longbow believes this demand will obey the laws of supply ­and demand, by driving hard disk drive prices up -- boosting profits at Seagate.

2. ...and Western Digital as well

And not only at Seagate. JPMorgan sees this dynamic of rising hard disk prices benefiting Western Digital stock as well -- maybe even more than Seagate. Additionally, JPMorgan points out that sales of personal computers are "stabilizing," according to TheFly.com, while at the same time Western Digital's costs are falling as the company finds "synergies" among its recent acquisitions.

Stable PC sales, falling costs, and widening profit margins on hard drives -- that all adds up to higher profits for Seagate, in JPMorgan's view, and justifies an overweight rating and a $116 price target on the stock.

3. Just how good will these profits get?

Doing a bit of quick pencil work, JPMorgan estimates that Western Digital stock will produce profits of $8.31 per share this year (3% better than previously expected). 2018 profits could be even better -- as much as $11.13 per share. Both those numbers would be significant improvements over the $1.59 per share that Western Digital lost last year. Even the lower number -- $8.31 -- would be enough to make 2017 the most profitable year Western Digital has booked in a single calendar year this millennium.

But would that be enough to make Western Digital a buy?

The upshot for investors

Because when you get right down to it, that's what matters to investors: Yeah, 2017 (and 2018) might be very profitable years for Seagate stock, and might be even better for Western Digital. But if the stocks cost too much relative to the profits, then neither stock would make for a good investment.

Fortunately, that looks to be not the case. At JPMorgan's projected profits, Western Digital stock looks likely to both earn great profits, and offer great value to investors as well. Here's how the numbers work:

JPMorgan is saying Western Digital will earn $8.13 this year. But Western Digital stock only costs about $85 a share. That works out to about a current-year price-to-earnings ratio of 10 on Western Digital stock. And with most analysts on S&P Global Market Intelligence predicting Western Digital will grow profits at 13.5% annually over the next five years, that works out to a price-to-earnings-to-growth (PEG) ratio of less than 0.8. Throw in a modest 2.4% dividend yield, and Western Digital stock is looking quite attractively valued indeed.

And Seagate? The story there is even better, because whereas JPMorgan bases its Western Digital valuation on projected profits, Seagate is already earning actual profits -- $514 million last year, and more than twice what it earned in 2015. S&P estimates show Seagate growing its earnings fourfold this year, to $3.22 per share. If they're right, that works out to about a current-year earnings valuation of 15 times on the stock. And again, between Seagate's projected growth rate (15%) and its dividend (5.3%), that looks like a very good deal for investors, indeed.

Long story short, I'm fully onboard with both these analysts' upgrades this week. Longbow Research may lean toward Seagate, while JPMorgan prefers Western Digital. I think either stock should perform just fine.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.