The price is right. That isn't just the name of a TV game show. It's also a cornerstone to investing successfully. If you buy a stock when the price is right, your chances of generating a profit improve dramatically.

Many stocks come with valuations that aren't attractive. Thankfully, that's not the case for all of them. Here are two bargain stocks you can buy today and hold forever.

1. Bank of America

Bank of America (BAC -0.21%) shares trade at a forward price-to-earnings ratio of less than 8.4. By comparison, the S&P 500's forward earnings multiple right now is 18.5.

If you've followed the news much at all this year, you no doubt know why Bank of America stock is so cheap. Three U.S. banks failed. Swiss bank Credit Suisse faced challenges that led to its acquisition by key rival UBS. Bank stocks, in general, took a beating in the aftermath, with BofA no exception.

It's understandable why many investors would shun many bank stocks. Even Warren Buffett has exited Berkshire Hathaway's position in several major banks (although he began the process of selling before this year's banking crisis.)

However, Bank of America remains Berkshire's second-largest holding. What's more, Buffett added to the conglomerate's position in the stock in the first quarter. Why is the legendary investor continuing to buy Bank of America? He recognizes a good opportunity when he sees one.

Bank of America's steep sell-off hasn't just made its valuation attractive. It has also driven the financial giant's dividend yield to over 3% -- near the highest levels in over a decade.

More importantly, Bank of America continues to rank among the biggest and strongest banks in the industry. Its balance sheet appears to be rock-solid. BofA is highly profitable. Earnings jumped 15% year over year in the latest quarter. 

The company is also well-positioned to succeed with the ongoing shift to digital banking. Bank of America won several honors last year for its technology efforts, including Global Most Innovative Financial Institution, MMI/Barron's Industry Award for Digital Innovation, and Aite-Novarica's award for Digital Client Experience. 

There's no way to know exactly how long it will take for the dust to settle with the banking turmoil. However, long-term investors have a great opportunity right now to buy one of the best bank stocks on the market at a discount.

2. Pfizer

Pfizer (PFE 0.55%) stock trades at close to 11.7 times forward earnings. That's well below the valuations of the S&P 500, the overall healthcare sector, and the pharmaceuticals industry. 

Why are Pfizer's shares priced so low? The big pharma company's revenue and earnings are falling due to declining sales for its COVID-19 products.

Investors also know that Pfizer will soon face a significant patent cliff. Several of its top-selling products lose patent exclusivity over the next few years, including Eliquis, Ibrance, Vyndaqel, Xeljanz, and Xtandi. 

There's more to the story, though. Pfizer expects that 2023 will be a trough year for COVID-19 vaccine Comirnaty. It looks for a big boost beginning in 2025 with the anticipated launch of a combination COVID-flu vaccine. The company also projects a solid rebound for sales of COVID-19 antiviral therapy Paxlovid next year. 

Sure, the loss of exclusivity (LOE) for several key products will hurt. However, Pfizer thinks that its new product launches through the first half of 2024 will generate enough annual revenue by 2030 to more than offset all of those LOEs. The big drugmaker also believes that its business development deals will add another $25 billion or so to annual revenue by 2030. 

In the meantime, Pfizer continues to reward shareholders with a strong dividend. Its dividend currently yields more than 4.1%. Like Bank of America, Pfizer appears to be a great bargain stock for long-term investors to buy and hold.