When it comes to your total returns from stocks, dividends can play an underrated role. Paid out quarterly from a company's profits, dividends are a way for companies to reward shareholders for simply holding on to their shares. However, not all dividends are created equal.

If you're looking for lucrative dividends that you can count on being around for the long haul, look no further than these three companies.

Procter & Gamble

Even if you're unfamiliar with the name Procter & Gamble (PG -0.37%), you're most certainly familiar with one of its brands. P&G is a consumer goods conglomerate that owns some of the best-known household brands in the country. Here are some notable examples:

  • Baby care: Luvs, Pampers
  • Fabric care: Bounce, Downy, Tide
  • Family care: Bounty, Charmin, Puffs
  • Feminine care: Always, Tampax
  • Grooming: Gillette, Venus
  • Hair care: Head & Shoulders, Old Spice, Aussie
  • Home care: Dawn, Febreze, Mr. Clean
  • Oral care: Crest, Fixodent, Scope
  • Personal healthcare: Pepto-Bismol, Vicks, ZzzQuil

Since the products that P&G sells are considered consumer staples (items that people need) instead of consumer discretionary (items that they want), P&G is the textbook definition of a defensive stock. Defensive stocks are companies with stable earnings, cash-filled balance sheets, and products that sell regardless of economic conditions. P&G checks all three boxes.

You likely won't see consistent double-digit percentage yearly gains from P&G's stock, but its dividend is one of the more reliable ones you'll find. It's paid dividends for 132 years and has earned the title of Dividend King by increasing its yearly dividend for at least 50 consecutive years (66 years in P&G's case).

Walmart

There are cash cows, and then there's Walmart (WMT -1.22%). Across the globe, no company brings in more revenue than Walmart. In just the third quarter of its fiscal 2023 year, the company brought in $152.8 billion, up 8.7% year over year.

Walmart's current yearly dividend is $2.24 per share, but it's managed to increase it every year since first declaring one in 1974. With 49 years of increasing dividends under its belt, Walmart is not yet a Dividend King, but it's just about there.

What makes Walmart's dividend safe is how the company has positioned itself as the one-stop value shop. Given current economic conditions -- such as high inflation and a looming recession -- consumers have flocked to Walmart to take advantage of its comparatively low prices. When people are strapped for cash, they tend to head toward value, and there's no other retailer positioned to provide more value than Walmart.

For long-term investors, Walmart's e-commerce growth should be a positive sign as the company continues to compete with Amazon in that space. In the latest quarter, the company's e-commerce segment grew 16% and 24% on a two-year stack. Couple that growth with the approximately 230 million customers who visit its 10,500+ stores each year, and it's safe to say Walmart isn't going anywhere anytime soon.

AT&T

Telecommunication services have increasingly become a necessity in American life. Both consumers and companies rely on phone services, the internet, satellites, broadcasting, and much more to operate. That makes telecom companies like AT&T (T -0.44%) more indispensable than companies in most other sectors.

After spinning off its WarnerMedia unit, AT&T cut its yearly dividend by roughly half, yet it still stands at a lucrative $1.12 per share. With a trailing-12-month dividend yield of over 5.8%, it's no question what attracts investors to the company.

AT&T's stock is down over 30% in the past five years, but after the $43 billion WarnerMedia spinoff, the company is primed to return to its roots and focus on its core telecom business. This should be good news for investors after an all-but-failed attempt to enter the media and entertainment space that left the company with massive debt.

The refocus to telecom is seemingly working in AT&T's favor. In its fiscal year 2022 fourth quarter, the company added 656,00 postpaid phone customers, bringing the total close to 2.9 million for the full fiscal year. AT&T Fiber, its fastest internet service, added 280,000 customers in Q4 and over 1.2 million for the year.

It's been a rough past few years for AT&T, but the company is showing positive signs of being a good long-term investment -- especially for investors interested in dividends.