Consumer prices jumped 7% in 2021, the highest rate since 1982, while producer prices surged 9.7% in December from a year ago, the greatest year-over-year increase on record. In a period of runaway inflation and slowing economic growth, there remains one constant that investors can count on: the reliability of dividend stocks to see them through.

Last year, Hartford Funds released a report showing the performance of the S&P 500 from 1930 onward, with dividends and without. It found dividend-paying stocks contributed 41% to the total return of the benchmark index over that 90-year period.

Person paying out $100 bills.

Image source: Getty Images.

Even during the so-called "lost decade" of the 2000s (when the bursting of the tech stock bubble, 9/11, and the financial markets collapse resulted in the S&P 500 generating negative returns), dividend stocks returned a positive 1.8%.

The study also found that from 1970 on, dividends represented an amazing 84% of the index's total return. Reinvesting dividends in the benchmark, coupled with the power of compounding, would have turned a $10,000 investment into more than $3.8 million compared to the $627,161 that initial stake would have become based on just the index's price alone.

What it means is investors who stay in the market through occasional (and inevitable) periods of market downdrafts end up being rewarded for their patience and long-term outlook, and even more so if they buy income-generating stocks.

Regardless of whether you're a growth or value investor, there's a dividend stock that can fit your portfolio, and the following two are among the best you can buy today and hold on to forever.

Lowe's employee in the kitchen and bath department.

Image source: Lowe's.

Lowe's

Home improvement retailer Lowe's (LOW -0.72%) benefited from the booming housing market over the past two years, resulting in a better than 100% rise in its stock price over those 24 months as sales rose 16%. But inflation has hit home prices as well, with the average selling price over that same period up 18% to over $453,000.

With the Federal Reserve getting hawkish on controlling rising prices, signaling possibly as many as three interest rate hikes this year (Goldman Sachs thinks there could be four, with the first coming next month), the housing market slowed down in December with seasonally adjusted home sales falling 3.6%, the largest one-month decline since May 2020, according to data from Redfin.

Yet it's not quite as gloomy as it appears, and should still bode well for Lowe's, because much of the decline was due to a lack of inventory. There just weren't enough houses available on the market to meet the demand, which is still very high.

Yet even if home sales continue to fall, Lowe's should come out OK because, just as at the start of the pandemic when everyone was locked down in their homes, people will use the opportunity to spruce up their existing residences. Since Lowe's caters more to homeowners than rival Home Depot, which is geared more toward the professional contractor, a housing market slowdown won't impact it as badly. Contractors represent 45% of Home Depot's total sales, and just 20% to 25% of Lowe's.

And investors will have Lowe's dividend to fall back on. The second-biggest home improvement chain by sales, it has paid a dividend to shareholders every quarter since going public in 1961 and has increased the payout for 56 consecutive years (it last raised its dividend in May 2021), making it a Dividend King.

With a healthy and sustainable yield of 1.3% annually, Lowe's is a stock you can buy now and forget about for decades to come.

NAPA Auto Parts store employee.

Image source: Genuine Auto Parts.

Genuine Parts

Housing isn't the only industry hit by a lack of inventory. The auto market is suffering from a supply chain crisis that's creating a shortage of computer chips and making it difficult for manufacturers to put enough new cars onto dealer lots.

Because demand for new cars remains elevated as a result, it's driving car prices higher. But it's increasing prices for used cars too, which has been helpful to aftermarket auto parts retailer Genuine Parts (GPC -0.14%), best known for its NAPA Auto Parts stores. The shortage means people will hold on to their existing cars longer, which will require them to be repaired and maintained longer and more often. 

For the first three quarters of 2021, Genuine Parts sales jumped 14.5% to $14 billion while year-ago losses of $1.39 per share made a U-turn, swinging to big profits of $4.44 per share. 

Yet Genuine Parts is also known for its dividend that it has paid for nearly 100 years. Like Lowe's it has also raised the payout for decades, in the auto parts retailer's case, for some 66 consecutive years. Based on trailing earnings, it has a payout ratio of 57.9% and pays out less than 25% of its free cash flow as dividends, making it very safe and secure for years to come.

According to J.D. Power and Associates, the most recent data shows new car inventory at the end of November was at a record low of 850,000 vehicles. In comparison, there were some 1.4 million vehicles available for sale in the same period in 2018. The situation is improving, but very slowly, creating a long tail opportunity for Genuine Parts that should allow investors to be very comfortable owning this dividend stock forever.