As the end of 2022 draws nearer, the market remains volatile, and the S&P 500 is down 24% for the year. With continued global economic upheaval, it's hard to imagine any serious improvement by the end of the year.

That means many great stocks are still on sale. But lower prices don't necessarily mean great deals -- some on-sale stocks could also be value traps. Are Target (TGT -0.36%) and Home Depot (HD -0.38%) worthwhile investments?

Great companies, slowing growth

Both Target and Home Depot had standout growth throughout the early parts of the pandemic. Considered essential retailers, their stores remained open under lockdown. But they both also operate well-developed omnichannel models to serve customers with a variety of shopping options.

Those continue to generate growth, but sales are slowing down. In this year's second fiscal quarter (ended July 30), Target's comparable sales (also called comps) increased 2.6%. The operating margin was only 1.2%, which means that after operating costs, it's only taking in 1.2% of sales as operating income. That number got to 9.8% in the 2021 second quarter, and management has guided for an operating margin of 6% in the second half of the year, where it should stay.

Profits have been hampered by rising costs and too much inventory. Target is correcting this by trying to move more expensive products by way of large-scale promotions and, conversely, raising prices on more popular items. As a result, Target remained profitable, taking in $0.39 in earnings per share (EPS) although that was down from $3.65 last year.

Home Depot is faring better in the aftermath of high growth. Comps increased 5.8% in its fiscal second quarter (ended July 31), and EPS increased from $4.53 last year to $5.05 this year. It seems that despite inflation and a slower housing market, people are still working on home improvement projects and heading to Home Depot to make that happen. It has a wide product selection to meet diverse needs, so while some categories came in below expectations in the second quarter, others were very strong. A strong housing market is often seen as a boon for home improvement retailers, but the inverse is also working in Home Depot's favor, since if people are staying in their old homes, there may be a bigger need to remodel.

Dividend Kings and raises

Target is part of the exclusive Dividend Kings club, which are companies that have raised their dividends for at least 50 consecutive years. Target recently joined these elite ranks and has now raised its dividend for 51 years in 2022. At the current price, Target's dividend yields 2.91%. That's well above the average S&P 500 yield of 1.81%.

Target raised its dividend despite the challenges it's enduring in a show of cash strength, confidence in the future, and commitment to shareholder value.

Home Depot has been paying a quarterly dividend since 1987, but it has not raised it annually for even 25 consecutive years, since it took breaks in 2000 and 2008. It did continue to issue dividends in those tougher times. Home Depot's dividend yields 2.75% at the current price.

Should you buy Target and Home Depot stock?

Over time, dividend stocks typically outperform the market, in a slow-and-steady-wins-the-race type of way. Dividend stocks are committed to value and typically generate reliable growth, which can be slower than that of growth stocks, but without the risk. 

Both Target and Home Depot have demonstrated robust operating models and have the infrastructure in place to keep it up. They both look like great buying opportunities on the dip, with the chance for price appreciation when the market improves as well as passive income for many years into the future.