Nearly every stock has been hammered over the past few weeks as the novel coronavirus transitioned from an outbreak in China to a global pandemic. There are now over 4,500 confirmed cases and 85 deaths in the United States, and dramatic measures like school closings, restaurant dine-in restrictions, and other business closures have been implemented to help slow the spread.

Every company is going to be negatively affected by the pandemic as the U.S. economy slows. A recession now appears certain. Some industries, like airlines, are being decimated by plunging demand. Other industries, like e-commerce, should hold up better. But the pain will be widespread.

Buying any stock as the market tumbles is painful, but that pain is the price you must pay if you want solid long-term results. The stock market's returns aren't free.

We're now in a bear market, and suddenly there are plenty of stocks that are a whole lot cheaper than they were just a few weeks ago. Tech stocks, even high-flying Wall Street darlings, have tumbled right along with the market. Not every stock is a screaming buy, but there are some that should not be ignored. One dirt cheap tech stock worth considering is International Business Machines (NYSE:IBM).

The IBM logo on a building.

Image source: IBM.

The story is improving

Prior to the novel coronavirus pandemic, 2020 was shaping up to be a solid year for IBM after years of weak results. Revenue and profit had been declining for more than half a decade. Some of that decline was by design as the company divested and de-emphasized certain legacy businesses and invested in growth areas like hybrid cloud computing, artificial intelligence, and data analytics. Some was due to unfavorable currency exchange rates. And some was due to lost business.

This year, IBM will benefit from a recently launched mainframe system and the mega-acquisition of software company Red Hat. IBM believes selling its existing large customers on Red Hat software is a multi-billion-dollar revenue opportunity, and that's on top of selling more IBM software to existing Red Hat customers.

In January, IBM said it expected its revenue to grow in 2020. The company called for adjusted earnings per share of at least $13.35, with some negative accounting effects of the Red Hat acquisition weighing on the bottom line.

IBM hasn't warned about an impact from the pandemic yet, but its business will likely be hurt by the outbreak. The company has a new CEO, Arvind Krishna, and the stock market reacted positively to that change earlier this year. All those gains and then some have now been wiped out. IBM stock trades below $100, down more than 35% from its 52-week high.

It's time to buy

IBM may not hit its earnings guidance this year, depending on how severely the pandemic hurts its results. But based on that guidance, IBM stock now trades for just over 7 times earnings. That's incredibly cheap for a company with key competitive advantages in some areas.

IBM did take on a lot of debt to acquire Red Hat, which is a concern now that its business could slow down for a while. But IBM also had nearly $9 billion in cash and marketable securities on its balance sheet at the end of 2019. IBM should be able to weather this storm.

IBM's dividend also looks enticing with a yield of 6.6%. That's the highest yield in decades, and IBM's track record is enviable. The company has paid consecutive quarterly dividends for over a century, through World Wars and the Great Depression.

Fair warning: The pandemic situation is both evolving quickly and highly uncertain. There's no guarantee that IBM won't be forced to cut its dividend. It doesn't look likely, but neither did a global pandemic a few months ago. Don't buy the stock just for the dividend. Don't buy any stock just for the dividend.

Like almost every company, IBM is going to face some major challenges this year. The impact of the pandemic on its business is an unknown, and the stock could still go much lower. But at the current rock-bottom valuation, it's hard to see investing in IBM today not working out in the long run.