Over the years, Shopify (SHOP -1.68%) and Square (SQ -2.44%) have become increasingly similar, approaching the same market from different angles.

Shopify focused first on enabling e-commerce, then transitioned to point-of-sale (POS) solutions for physical retailers. Square did things in reverse, first launching mobile card readers for brick-and-mortar merchants and then moving into online shops.

Despite their different origins, both have been rewarding investments. Shares of Shopify and Square have surged 900% and 295%, respectively, over the past three years. But which one is the better buy today?

Investor analyzing financial charts on paper and digital tablet.

Image source: Getty Images

Shopify

In 2004, Tobias Lütke and Scott Lake set out to build an online snowboard shop. However, they found the experience frustrating, and with a lack of user-friendly tools, they were ultimately unsatisfied with the result. But that disappointment became the inspiration for a better idea: Shopify.

Lütke and Lake co-founded Shopify to make e-commerce easier. Driven by that mission, the company's cloud-based software is a comprehensive solution, allowing sellers to start, run, and grow their businesses across physical and digital channels.

Shopify also provides merchant services like payment processing, discounted shipping, and financing, all aimed at making commerce more accessible. The company has benefited from strong demand -- and today Shopify is the retail operating system for 1.7 million merchants around the world.

Moreover, despite competition from the likes of Amazon and Walmart, Shopify has consistently crushed Wall Street's expectations, posting impressive financial results like clockwork.

Metric

2017

Q1 2021 (TTM)

CAGR

Revenue

$673.3 million

$3.4 billion

65%

Free Cash Flow

($16.3 million)

$615.4 million

N/A

Data source: Shopify SEC filings. TTM = trailing-12-months. CAGR = compound annual growth rate.

Management currently puts Shopify's market opportunity at $153 billion, but that figure doesn't account for large enterprises (i.e. over 500 employees). That means Shopify Plus -- a customizable commerce platform designed for enterprise clients -- makes the company's true market opportunity even bigger.

That's particularly noteworthy because Shopify Plus appears to be gaining traction. It currently powers over 10,000 businesses, including Fortune 500 companies like General Electric, Nestle, and PepsiCo. If that momentum continues, I think Shopify could be a trillion-dollar enterprise by 2030.

Square

Like Shopify, Square started by solving a problem. In 2009, co-founders Jack Dorsey and Jim McKelvey introduced the now famous mobile card reader, a small dongle that allowed merchants to use their smartphones as point-of-sale systems and payment processing devices.

Since then, Square's business has expanded into two distinct segments: the seller ecosystem and the Cash App ecosystem, both of which have benefited as digital payments and e-commerce have become more popular.

Square hardware at bakery checkout desk.

Image source: Square

Square's seller ecosystem includes a range of hardware, software, and services that help merchants manage all aspects of their business, from payment processing and inventory to payroll and marketing. The company recently introduced Square Online, allowing merchants to create online stores that automatically sync with physical retail locations.

On the flip side, the Cash App ecosystem is targeted at consumers, allowing users to send, spend, and invest money. Square integrated bitcoin into the Cash App in 2018, supercharging customer engagement. And last year, the company acquired Credit Karma Tax, adding a mobile-first tax-filing solution to the Cash App.

Financially, Square has delivered impressive results in recent years, though investors should note that revenue figures are skewed by low-margin bitcoin sales. For that reason, it's more prudent to consider gross profit.

Metric

2017

Q1 2021 (TTM)

CAGR

Revenue

$839.3 million

$3.2 billion

50%

Free Cash Flow

$101.6 million

$16.5 million

N/A

Data source: Square SEC filings. TTM = trailing-12-months. CAGR = compound annual growth rate.

Management currently values Square's market opportunity at $160 billion, leaving significant room for future growth. Notably, Square recently launched its seller platform in Ireland, meaning its services are now available in six geographies (including the U.S., U.K., Canada, Japan, and Australia). As commerce continues to evolve, I expect both of Square's ecosystems to grow quickly.

The verdict

I'll preface this by saying I own both Square and Shopify. In fact, they are two of my largest holdings, and I'm very optimistic about the futures of both businesses.

However, Shopify wins this contest. The company is growing more quickly, and it has established itself in 175 countries, far more than Square. Ultimately, I think that leaves more upside for investors.