It's said that compounding is the eighth wonder of the world. Compounding means growing your capital through long-term investing, aided by timely additions of money, to grow your overall pool of funds. For compounding to be effective, though, it's necessary to adopt a sufficiently long investment horizon.

Of course, successful investing involves not just buying and holding companies over the years, but also choosing the right ones in the first place. Ideally, such companies should have long growth runways with strong competitive edges. These businesses should pay out a dividend as well, as this can be reinvested to accelerate returns.

Here are two stocks that I intend to hold forever, as each has unique strengths and potential for long-term growth.

A woman looking at credit card while typing on laptop.

Image source: Getty Images.

Visa

Visa (NYSE:V) is a financial-services giant that processes credit- and debit-card transactions. It also facilitates electronic funds transfers. Last quarter, the company handled a staggering $2.1 trillion worth of payments made with its 3.5 billion branded cards. With more cards issued, Visa will enjoy a higher volume of transactions, for which the company earns a commission on each. Therefore, rising card numbers imply continued growth in Visa's top line.  The business continues to generate impressive free cash flow, close to $4.9 billion in just the first six months of the current fiscal year.

In the last decade, the payments space has grown by leaps and bounds, greatly benefiting companies like Visa. The global payments market size is poised to hit $2 trillion by the end of 2025, with a compound annual growth rate of 7.8%. The COVID-19 pandemic has greatly accelerated the adoption of cashless digital payments, as consumers move toward contactless services. As more countries switch to digital payments, this emerging long-term tailwind ensures that Visa will capture incremental business over time.

Management is also committed to growing business through several strategic initiatives. One involves expanding partnerships and collaborations with Visa's largest clients in the area of card issuance. That includes the signing of a 10-year exclusive issuing partner renewal with Australia's Bank of Queensland. The company acquired Plaid for $5.3 billion back in January to enhance payments connectivity between apps and financial institutions.

Visa is also not forgetting about small and medium-sized businesses. Its recent launch of Visa Small Business Hub provides a range of services for smaller companies in over 20 countries. All these initiatives not only point to a promising long-term future for the company, but also make its shares great to own for the long term. Visa also pays a dividend, and this has risen from $0.48 a year in 2015 to $1.00 a year in 2019. 

Apple

Apple (NASDAQ:AAPL) is regarded as one of the most innovative technology companies in the world. The introduction of its ubiquitous iPhone opened up an entirely new industry and completely changed the way we live, work, and communicate. Over the last decade, the company has continually wowed us with new devices such as the iPad and Apple Watch, showcasing the strength of the company's research and development teams.

Although Apple has a strong portfolio of products that are always in high demand, the company is slowly pivoting toward services. For the first half of fiscal 2020 (a period that ended March 28), services grew by 16.7% year over year and made up 17.4% of total revenue, up from 15.7% in the same period last year. Services comprise a plethora of offerings such as Apple TV with original shows and movies, Apple Pay for contactless payments at retail stores, and an Apple News service that bundles premium news sources and magazines. 

There are two reasons why the growth of services is great for Apple. First, services involve subscriptions, which introduce an element of recurring income for the company. By offering an array of compelling services, Apple is attempting to lock in customers with subscription packages that can build up a stream of recurring revenue. In contrast, selling products such as iPhones and iPads involves significantly more R&D and marketing expense.

Which brings up the next point: The gross profit margin for services is almost double that of products, at 63.3% versus 32.8% for the first half of the current fiscal year. This simple fact means that Apple is generating much more profit per sales dollar of services compared to products. If this trend carries on, we should see Apple's overall gross profit margin trending upward over time, and this should also eventually flow down to net income margin and pull it up too. Apple, like Visa, also pays a steadily increasing dividend. Dividend per share rose from $1.98 in 2015 to $3.00 in 2019.