In today's fast-paced and hyperconnected world, investors are holding stocks for shorter and shorter periods. Trading frequently, however, has never made anyone wealthy. A buy-and-hold approach and a long-term mindset are crucial for building a comfortable nest egg for your retirement.

That's why it's important to search for stocks that can grow over years and decades without having to frequently check on them. Such businesses typically have a strong franchise, a dominant market position, well-known brands, and a capable management team. As Warren Buffett has said, time is the friend of a wonderful business. That's because it will become more valuable over time with increased revenue and net income.

Here are three stocks that you can buy and own for the rest of your life.

Pouring cola into a glass from bottle

Image source: Getty images.

1. Starbucks

Starbucks (SBUX -0.36%) is one of the largest coffee chains in the world with more than 34,000 stores worldwide. The company has demonstrated its resilience during the pandemic even though it had to temporarily shut the bulk of its stores.

Net revenue for its fiscal year 2020 (ended Sept. 30) dipped to $23.5 billion from $26.5 billion in the previous year but has surged to $29.1 billion in fiscal 2021 as economies reopened. Net income has also shown a similar pattern, falling sharply from $3.6 billion in 2019 to $928 million in 2020, only to rebound to $4.2 billion in the following year.

Its momentum has continued into the first quarter of 2022 with 19% year-over-year growth in revenue to $8.1 billion. Its loyalty program, Starbucks Rewards, also saw membership in the U.S. surge by 21% year over year to 26.4 million. Net income jumped by 31% year over year to about $816 million. The company also increased its quarterly dividend from $0.45 to $0.49, its 11th consecutive yearly increase.

Its Growth at Scale agenda, first announced in late 2020, should see the company steadily opening new stores as part of its international expansion. Management expects its global base of retail stores to reach close to 55,000 by 2030. With its strong franchise and brand name, investors should expect revenue and earnings to rise in tandem with the store expansion plans.

2. PepsiCo

Moving on to snacks and beverages, PepsiCo (PEP -2.82%) is one of the market leaders in this industry. As the owner of famous global brands like Pepsi-Cola, Lay's, Mountain Dew, and Doritos, the company commands the pole position in the snacks market and has a strong second position in the beverages industry.

PepsiCo has recorded a steady increase in revenue from 2018 through 2021, rising from $64.7 billion to $79.5 billion. That growth occurred even throughout the pandemic while net income rose by 7% year over year for 2021 to $7.6 billion.

The company has also been a consistent dividend payer and earlier this month announced a 5% increase in its quarterly dividend to $1.075 per share. Last year was PepsiCo's 49th consecutive dividend increase, which means the company is just a year shy of becoming a Dividend King.

PepsiCo believes there is still significant room for growth. In the global beverages industry, it estimates that it has just a 9% share in a market that is worth around $570 billion. For global snacks, it has a 7% share in a $550 billion market. Both markets are projected to grow around 4% to 5% per year for the next five years, opening up ample opportunities to grow its top and bottom lines.

3. Apple

Apple (AAPL 0.17%) is a pioneer in smartphones, which heralded an entirely new industry and spawned a wave of app developers. Today, it also manufactures iPads and wearables like its Apple Watch, and offers services including Apple TV and iCloud.

The $2.6 trillion behemoth has weathered the pandemic well with a surge in online activity, pushing up demand for its myriad devices. Net sales rose from $260.2 billion in 2019 to $365.8 billion by 2021, while net income soared from $55.3 billion to $94.7 billion over the same period.

Apple has continued its innovative streak by releasing a new iPhone and Apple Watch every year to much fanfare, and its loyal base of customers should ensure its brand stays at the top of people's minds.

The company continued to report an impressive set of earnings for its 2022 first quarter with net sales rising 11.2% year over year to $123.9 billion and net income jumping by 20.4% year over year to $34.6 billion. Aside from its rapid growth, Apple has also steadily increased its quarterly dividend since it started paying one in 2012.

Investors should rest assured that Apple can continue to wow its audience with cool, new products while increasing its services revenue over time, leading to an overall higher gross margin and, consequently, higher earnings and dividends.