Everybody loves a good bargain, whether it's clothes, electronics, cars, or stocks. And it just so happens that the stock market is full of them. Even with the stock market's unexpected 2023 surge, some stocks are still floating in bargain territory.

If you have $3,000 you can afford to invest, these two companies can provide reliable income and lots of long-term upsides.

1. AT&T

It hasn't been the most enjoyable ride for AT&T (T 1.02%) investors over the last decade (or three), as the stock has lagged considerably behind the overall market.

AT&T's total returns over the past decade are just over 14%, compared to the S&P 500's 228%. Luckily, investing is about the future, and at current prices, AT&T is looking like a bargain that may be too good to pass up.

AT&T's revenue was up less than 1% year over year (YOY) in the second quarter, but the encouraging figure to focus on should be its cash flow. The $4.2 billion in free cash flow and $9.9 billion in operating cash flow were up 200% and 29% YOY, respectively.

Company management says it wants to generate $16 billion in free cash flow this year (it's generated $5.2 billion through Q2), and it seems to be headed that way when you consider the typical second-half boost it gets every year, particularly in the fourth quarter.

It's important to focus on AT&T's free cash flow because that helps address two of AT&T investors' biggest concerns: The company's huge debt, and the security of its lucrative dividend.

AT&T went into a lot of debt for its media and entertainment ambitions, but it's taken active steps to reduce it. Still, $137 billion in long-term debt isn't something to just gloss over. However, the projected $16 billion in free cash flow is more than enough to cover its dividend and debt obligations for the year. AT&T says it plans to reduce debt by around $4 billion.

Chart showing AT&T's debt and dividend falling, and free cash flow rising, since 2022.

Data by YCharts

With a yield of around 7.6%, AT&T's dividend is one of the more lucrative in the market. It's also a safety net that makes betting on AT&T's worst days being behind it worthwhile for long-term investors. AT&T's forward price-to-earnings ratio is 5.9, well below Verizon's 7.2 and T-Mobile's 17.7. It's a bargain for a giant operating in an indispensable industry like telecom.

2. Brookfield Renewable

Brookfield Renewable (BEPC 0.09%) is a renewable energy company specializing in hydro, wind, solar, and storage power solutions. It's one of the largest renewable power platforms in the world, with more than 25 gigawatts (GW) of operating capacity and 110 GW in its development pipeline.

For perspective, 25 GW is enough to power roughly 20 million U.S. homes at any given time. At 135 GW, Brookfield's potential capacity could be enough to simultaneously supply around 112.5 million U.S. homes (there were around 142 million housing units in the U.S. in 2021). The 110 GW in development is equivalent to 100% of Poland's annual emissions.

Brookfield's stock has outpaced the S&P 500 over the past five years, but it's down over 22% in the past 12 months. Now is an attractive time for investors to get into the stock, with the renewable energy industry seemingly on the earlier end of what it can (and will likely) be.

Since Brookfield operates under a lot of long-term contracts, it has predictable cash flow and earnings that should ensure the security of its dividend.

Brookfield's dividend yield is around 4.3%, almost three times the average of the S&P 500. Since 2014, its annual dividend has had a 6% compound annual growth rate, with the company planning to increase it between 5% and 9% annually going forward. 

Brookfield's CEO, Connor Teskey, says the company aims to deliver 12% to 15% long-term total annual returns, and there's no reason to believe it can't happen if historical results are any indication. The stock is a bargain for long-term investors.