The stock market is off to a great start this year, with the S&P 500 index up about 10% in just a few months. As stock prices rise, genuine bargains are becoming tougher to come by.

However, there are still a few stocks that look like great deals. AT&T (T 1.61%) and International Business Machines (IBM 0.18%) have rallied along with the market, but the stocks offer great value to investors hunting for bargains.

An underestimated telecom giant

AT&T is not the same company it was a few years ago. The telecom giant tried and failed to turn itself into a media conglomerate, snapping up media companies and racking up monstrous debt in the process. Undoing the damage has taken time, but AT&T has now mostly rid itself of everything outside of its core wireless and wireline businesses.

Debt levels remain a sticking point, but AT&T is successfully ramping up its free-cash-flow generation even as it invests heavily in 5G and fiber. The company produced a free cash flow of $16.8 billion in 2023, and it sees this metric rising to a range of $17 billion to $18 billion this year.

On the wireless side, AT&T continues to win new subscribers. The company tacked on 1.7 million net postpaid phone subscribers in 2023, and the mobility segment reported its best-ever operating income. On the wireline side, AT&T grew fiber revenue by 27% and added 1.1 million net new subscribers.

Based on the midpoint of AT&T's free-cash-flow guidance, the stock trades for a pittance. With a market capitalization of about $126 billion, the price-to-free-cash-flow ratio sits at just 7.2.

AT&T's results are sensitive to economic conditions as well as consumer appetite for new smartphones and pricey wireless plans. But with the media distraction gone and the company fully focused on the wireless and fiber businesses, AT&T stock can deliver impressive returns for investors as the cloud of pessimism is lifted.

An enterprise AI leader

Major enterprises and organizations, particularly those operating in heavily regulated industries, face unique challenges when adopting AI technology. Customer and proprietary data must be protected, regulations must be adhered to, and risks must be minimized. As powerful as advanced AI models have become, they're still prone to a variety of problems including hallucinations and spitting out training data.

IBM has a solution in the form of watsonx, the tech giant's enterprise AI platform. Customers can train, validate, and deploy generative AI models, store the massive amount of data involved in training AI models, and monitor AI applications to make sure they don't go off the rails.

IBM is still in the early innings of turning watsonx into a major business, but the results so far are positive. The amount of booked business related to generative AI had reached the low hundreds of millions of dollars by the end of the third quarter, not long after the components of watsonx began becoming available. That amount doubled by the end of the fourth quarter as demand remained strong.

IBM's secret weapon is its consulting business, which is responsible for driving about two-thirds of generative AI business. Enterprises need a capable AI platform, but they also need guidance, expertise, and integrated solutions. IBM can deliver all of the above.

IBM stock has rallied recently, so it's not nearly as cheap as it was even a year ago. But with free cash flow expected to come in around $12 billion this year, a price-to-free-cash-flow ratio below 15 seems like a steal. IBM is positioning itself to be the enterprise AI leader, a long-term opportunity likely measured in the billions of dollars.