The new year hasn't exactly been a happy one for most investors so far. The S&P 500 is nearly in a correction. Many stocks have fallen 20% or more.

That isn't the case for all of them, though. Here are three great dividend stocks to buy that are trouncing the market.

Two smiling people looking at a laptop.

Image source: Getty Images.

1. ExxonMobil

Shares of ExxonMobil (XOM 0.02%) have soared more than 20% so far in 2022. The main factor behind this impressive gain is the overall booming environment for the oil and gas industry after a big downturn in 2020.

ExxonMobil has long been a favorite for income-seeking investors. With a dividend yield of  4.7%, it still is. The stock is even a Dividend Aristocrat with 39 consecutive years of dividend increases.

But is ExxonMobil a good stock to buy right now? There's a good argument that it is. For one thing, the company's business appears to be the strongest it's been in years with ExxonMobil generating strong cash flows.

ExxonMobil also recently discovered two new oil reservoirs off the coast of Guyana. The company thinks these sites will add to its previous estimate of 10 billion oil-equivalent barrels from its off-shore rigs in the area.

2. Enterprise Products Partners

Enterprise Products Partners (EPD 0.48%) stock has jumped 8% year to date while the broader market indexes are in negative territory. Like ExxonMobil, the midstream energy company is benefiting from rising oil and gas prices.

Investors have more to like about Enterprise than its newfound momentum, though. The company's dividend yield currently stands at nearly 7.7%. And Enterprise has increased its dividend payout for 23 consecutive years.

2022 should be a good year for the company. Enterprise thinks that overall oil demand will reach and perhaps even top pre-pandemic levels. The demand for gasoline and diesel is already at least where it was in 2019. The possibility of a Russian invasion of Ukraine also seems likely to keep prices high.

Over the longer term, the shift from fossil fuels to renewable energy sources could negatively impact Enterprise. However, the company still expects that the demand for oil and natural gas will increase over the next couple of decades, driven by the increased use of petrochemicals. That should keep Enterprise's dividends flowing and potentially growing for years to come.

3. Viatris

It isn't just energy stocks that are performing well in this market downturn. Generic-drug maker Viatris (VTRS 1.67%) is also off to a good start, with shares up a little over 8% year to date after falling nearly 28% in 2021.

Viatris' market-beating gain in 2022 has come despite some bad news. The company announced on Jan. 18 that it was recalling one batch of its insulin biosimilar Semglee. But the problem related to a missing label on the products in the batch. That didn't bother investors too much.

On the other hand, Viatris also had some good news. The company stated on Jan. 9 that it is boosting its dividend by 9%. Viatris' dividend yield now stands at close to 3.3%.

Probably the best reason to consider buying the stock is that it's dirt cheap. Viatris' shares trade at less than 3.4 times expected earnings. Regardless of what the stock market does, this attractively valued stock should be poised to move higher over the next few years.