Shares of Intel (INTC 1.74%) are up nearly 40% from their 52-week low, with the latest surge due to the company raising its guidance for the second quarter on the back of stronger demand for business PCs. With the stock now trading around $30 per share, the highest level in more than a decade, is Intel a buy? Or have most of the gains already come and gone?

Intel's long-term story
While the increase in guidance and the subsequent boost in the stock price are nice, it doesn't change the long-term story at Intel. Intel dominates the PC and server chip markets, leaving rival Advanced Micro Devices (AMD 1.51%) with the scraps. Its push into mobile devices, while a long time in the making, is likely to eventually succeed due to Intel's manufacturing edge over fabless competitors. But the PC market is mature, and while Intel's server sales are strong, the fact that Intel has a de facto monopoly may not be sustainable in the long term due to competition from ARM-based competitors. Intel should remain the leader in the server chip market, but a 90%-plus market share might be difficult to maintain.

After losing most of its presence in the server market, AMD is making a big push with ARM-based processors. The company expects to launch its first ARM server processors later this year, and its expectations are quite high. But the reason why Intel managed to steal away most of AMD's market share in the first place was because it made better products, and moving to ARM-based chips doesn't change that. Fellow Fool Ashraf Eassa pointed out earlier this year that AMD's upcoming ARM chips aren't actually competitive at all compared with Intel's products, so while ARM-based server chips may pose a long-term threat to Intel's server dominance, it will be an uphill battle for AMD.

What is a good investment at one price can be a bad investment at another price, and while Intel has some serious competitive advantages, significant earnings growth over the next few years will be difficult. Intel's earnings have been declining for the past two years as the PC market has shrunk, and while analysts expect modest earnings growth going forward, the spread between estimates is extremely wide. While the average estimate for EPS in 2015 is $2.11, higher than the $1.89 from 2013, estimates range from $1.57-$2.51. Analysts typically don't have great records of being correct, but the size of this spread suggests that there is a lot of uncertainty about Intel going forward. And on that point, the analysts are right.

Intel's new guidance for the second quarter points to a continued stabilization of the PC market. Strong demand for business PCs has led Intel to now expect revenue for the whole year to grow, rather than to remain flat. While guidance for earnings wasn't given, this will certainly help Intel's bottom line. But to achieve significant earnings growth, it will take more than stabilization of the PC market.

The opportunity has passed
How much will Intel be earning from tablets and smartphones five years from now? It's a difficult question to answer. Intel has a near monopoly in the PC and server markets, and this allows the company to enjoy extremely high margins. But the mobile market already has entrenched players, and both ASPs and margins are going to be far lower there compared to PCs and servers.

The questions that investors need to ask themselves: Will buying Intel at $30 per share lead to acceptable results? Is Intel likely to perform better than the market as a whole in the long term from here? Late last year, when shares of Intel were in the low $20s and the stock had a dividend yield in excess of 4%, the answer was likely yes. But at $30 per share, and with a dividend yield barely piercing the 3% barrier, I don't think this is true anymore.

The dividend is unlikely to be significantly raised anytime soon, given that Intel now pays out about half of its earnings to shareholders, and earnings growth over the next few years will be slow at best. Intel's P/E ratio, based on 2013 earnings, now sits around 16, certainly no bargain, and it's the highest valuation that Intel has managed in the past few years.

INTC PE Ratio (TTM) Chart

INTC P/E Ratio (TTM) data by YCharts

Intel is a fantastic company with durable competitive advantages, but even the best company has a price that makes it a bad investment. Intel isn't overvalued, but it's no longer an attractive investment. The time to buy shares expecting an above-average return has passed. In the low $20s, I would be buying shares of Intel, hand over fist. At $30, I'll pass.