Mastercard (MA 0.39%) and Square (SQ -0.28%) have crushed the market in recent years. Even after a sudden and steep fall recently, global payment processor Mastercard is up almost 170% in the past three years. Square, a fast-growing fintech company, is up almost 370% over the same period. Their gains compare to the S&P 500's increase of about 26% (through March 3). 

Both companies reported strong fourth-quarter results and seem positioned for future growth. But which is the better buy for the next three to five years? Let's take a look.

A smiling woman takes an order from a person standing in front of a digital cash register at a cafe.

Image source: Getty Images.

The case for Square

Square impressed Wall Street when it reported fourth-quarter and 2019 earnings on Feb. 26. Here's a look at a few key numbers:

Metric Q4 2019 Change Total 2019 Change
Total net revenue $1.31 billion 46% $4.71 billion 43%
Adjusted diluted earnings per share (EPS) $0.23 64% $0.80 70%

Note: Percent changes for total net revenue and gross profit exclude the effect of the sale of food-delivery service Caviar. EBITDA=earnings before interest, taxes, depreciation, and amortization; EPS=earnings per share. Chart by author. Source: Square .

Square's Cash App, which allows users to make peer-to-peer transactions and trade stocks or bitcoin, continued its blazing growth. The app produced $144 million in fourth-quarter gross profit, a 104% year-over-year increase. Its monthly active users reached 24 million, a 60% increase. That larger user base is important because it provides a network effect: As more people use the app, more hear about it and are enticed to use it.

Square's Seller segment, which includes the company's merchants, increased year-over-year gross profit 27%. Square Capital, which gives merchants the ability to quickly receive short-term loans, grew revenue 42%. Square Capital, along with Cash App and other merchant services, helped drive the company's year-over-year subscription and services-based revenue up 74% to $1.03 billion. Those services not only build revenue, they build loyalty. The more entrenched a merchant or Cash App user gets in Square's ecosystem, the more likely they are to stay.

The case for Mastercard

Mastercard reported fourth-quarter earnings on Jan. 29, and it continued to grow impressively for a company with a market capitalization of more than $300 billion (through March 2 trading). Here are a few key fourth-quarter numbers:

Metric Q4 2019 Change Total 2019 Change
Net revenue $4.4 billion 17% $16.9 billion 16%
Adjusted diluted EPS $1.96 28% $7.77 23%

Note: All percentage changes are on a constant currency basis; pp=percentage point. Chart by author. Source: Mastercard. 

The payment processor's size makes it a force. Mastercard, which receives small fees in every transaction, had 2.6 billion cards at the end of the fourth quarter, a 5% increase over the previous year, and it processed 23.8 billion transactions in the period, a 19% increase. A trusted brand combined with its massive network puts Mastercard in a strong position as worldwide digital transactions increase in what's been called the war on cash.  

Mastercard has diversified its revenue base through organic growth and acquisitions that allow the company to offer more services, such as cyber intelligence and data analytics. Its "other revenues" category grew 24% in 2019 on a constant currency basis and accounted for 24% of the company's net revenue. Not only do those services build revenue, they help build loyalty among Mastercard's banking partners, who could be less likely to defect to rival Visa.

Mastercard's stock soared to all-time highs after its earnings, but on Feb. 24, the company was forced to reduce first-quarter revenue estimates due to the effect of COVID-19, the coronavirus. The company expects first-quarter revenue growth to be 9% to 10%, about two to three percentage points below its original forecast. A day after the revenue warning, Mastercard announced that Ajay Banga would be stepping down as CEO on Jan. 1, 2021. He will become the company's executive chairman and will be succeeded by Chief Product Officer Michael Miebach, who has been with Mastercard for a decade.

The stock plummeted 17% from Feb. 20 to Feb. 27, but Mastercard's challenges could be short-term, assuming that Miebach's experience with the company translates into strong leadership and continued growth.

The final call

Before making a final call, let's look at valuations:

Company P/E ratio Forward P/E PEG ratio
Square 98 83 2.31
Mastercard 36 32 1.97

Source: Yahoo! Finance. Data through March 3. P/E=price-to-earnings ratio; PEG=price-to-earnings-growth ratio

Even after the market's recent drop, both companies' stocks still have high valuations, and Square's could look frighteningly high. However, it's worth noting that the companies are at different stages of their life cycles.

Mastercard, with a market capitalization about eight times that of Square's, has reached a massive scale. It uses profits to reinvest in its business, buy back shares, and pay a dividend (currently yielding just 0.5%). Square isn't buying back shares and doesn't pay a dividend. Instead, it invests heavily as it tries to scale its business and fuel future profit growth. During its earnings conference call, management noted that even if revenue outperformed projections this year, the company doesn't expect that to translate to increased earnings in 2020, which means the P/E ratio likely will remain high. Instead, Square plans to reinvest "back into the business where we see opportunities to benefit long-term profitable growth."

Mastercard's and Square's high valuations also could be a reflection of their strong financial positions. Both have cash on the balance sheet and produce free cash flow, which is critical if they need to withstand an economic slowdown or recession. Mastercard has $7.7 billion in cash, cash equivalents, and investments. It produced $7.5 billion in free cash flow last year and has $8.5 billion in long-term debt. Square has $1.5 billion in cash, cash equivalents, or short-term investments. The company has $939 million in long-term debt and produced $403 million in free cash flow last year.

In the end, this is a tough call because I think these are two good companies (both are in my portfolio). Right now, I believe the better choice is Square. While it comes with more risk, it also comes with more growth potential.