As investors, your goal is to put money to work in sound investments and let that amount grow over time. Warren Buffett, Berkshire Hathaway CEO, has compared building wealth to rolling a snowball down a hill that grows larger the further down it rolls.  

A great way to build wealth is by investing in high-quality companies and holding on to them for the long haul. Mastercard (MA -0.16%) is one stock that has crushed it for years, and you may be surprised about how much you could've made if you invested $10,000 in the company back in 2009.

A person uses a credit card to pay at a restaurant.

Image source: Getty Images.

Mastercard has a strong competitive advantage

Mastercard helps customers facilitate transactions its debit and credit cards and other products and operates the world's second-largest payment network. The company has built up a huge competitive advantage through network effects. Basically, it's harder for competitors to come in and take market share as its network grows. Mastercard and Visa dominate the payments markets and hold 90% of the credit and debit card markets.

Mastercard only processes payments and doesn't hold loans on its books like competitors American Express and Discover do. Instead, it collects a fee on every transaction through its network, resulting in fewer overhead expenses. Mastercard's asset-light business model and network effects give it excellent profit margins that have averaged nearly 40% over the last decade.

Furthermore, since 2009 Mastercard has grown its revenue and net income by 11% and 16%, respectively, compounded annually. At the same time, free cash flow, or cash left after paying for operating expenses and capital assets, has increased about 17%, compounded annually. Strong free cash flow gives Mastercard flexibility to pay down debt, pay out dividends, buy back stocks, or make acquisitions to drive future growth.

This stellar growth has rewarded investors handsomely, and if you invested $10,000 in Mastercard at the beginning of 2009, you'd have over $255,000 today. That, folks, is the power of compound returns.

MA Total Return Level Chart

MA Total Return Level data by YCharts.

Stellar growth in an uncertain economic environment

Mastercard recently announced earnings and put up another stellar quarter of growth despite fears of slowing growth and consumer demand. In the second quarter, Mastercard's revenue increased by 21% from last year, while its net income was up 10%. Consumer spending was robust in the quarter, and Mastercard's gross dollar volume increased by 14% globally.  

Mastercard has held up well through the first six months of the year, as revenue increased 23% and net income increased 26% from last year. The company saw strong growth in travel and entertainment expenses, which boosted cross-border spending volume by 56% from last year.  

Pay attention to this potential headwind

Investors must be aware of potential legislation that could impact business for both Mastercard and Visa. According to The Wall Street Journal, legislators could soon introduce a bill allowing merchants to process Mastercard and Visa credit cards over different networks. The bill aims to foster more competition among credit card networks.  

This isn't the first time Mastercard has undergone scrutiny from regulators. Last year the Justice Department investigated its role in the debit card and payment marketplace.

While details of the bill aren't known, increasing regulations could impact its profit margin and ultimately impact the company's top- and bottom-line growth. While it faces potential headwinds from regulations, Mastercard has a solid business and a strong payment network and should continue to be a strong player in the industry for years to come.