The overall stock market has done quite well in recent history, with the S&P 500 generating a total return of more than 65% over the past five years.

However, some stocks have done much better than this average. There are some very well-known companies whose stocks have rewarded investors by multiplying their investment dollars several times over.

Man looking up and cheering as money falls around him.

Image source: Getty Images.

Here are three well-known stocks that have delivered total returns that would have turned $1,000 investments into $5,000 or much more over the past five years or less, followed by some analysis as to why each has performed so well and why they may not be "expensive" despite their strong performance.

Company (Symbol)

Industry

5-Year Total Return

Value of $1,000 Investment

Square (SQ 2.48%)

Payment processing

512%

$6,340

Netflix (NFLX 1.84%)

Streaming entertainment

435%

$5,350

Amazon (AMZN 2.94%)

E-commerce

496%

$5,960

Data source: yCharts as of 7/31/2019. Square returns are from IPO to present, which is less than five years.

Why such strong performance?

First, none of these companies performed so well because of their earnings growth. In fact, not one of them is highly profitable, even today. Even Amazon has just started to generate consistent profits that aren't all that high considering the company's market cap.

In a nutshell, the reason they've performed so well is because of growth -- both over the past few years and projected future potential.

NFLX Revenue (TTM) Chart

NFLX Revenue (TTM) data by YCharts.

Take Square, for example. Over the past two years alone, the company's adjusted revenue has grown by 135%. Gross payment volume in its core payment-processing business has grown by 63%. The Square Capital business lending platform has grown from facilitating $318 million in new loans in the second quarter of 2017 to $528 million on loans in the second quarter of 2019 -- growth of 66%.

Square's Cash App has grown much faster. The company's person-to-person app had 15 million monthly active users at the end of 2018, and Cash App revenue has grown from just $1 million in the second quarter of 2016 to $135 million in the second quarter of 2019. Plus, the growing ecosystem opens the door for future products that Square can market to its millions of users.

In Netflix's case, it's also clear that profitability isn't what the market focused on. After all, Netflix's free cash flow has actually declined considerably over the past five years. However, one look at the company's growth rates tells you all you need to know about why the stock has performed so well:

Metric

2Q 2014

2Q 2019

Growth Rate (Annualized)

Revenue

$1.15 billion

$4.92 billion

33.7%

Operating income

$130 million

$706 million

40.3%

Paid members

35.09 million

151.56 million

34%

Data Source: Netflix earnings releases.

Amazon's growth is just as impressive over the past five years. What's more, Amazon has become consistently profitable in recent years.

Metric

2Q 2014

2Q 2019

Growth Rate (Annualized)

Revenue

$19.34 billion

$63.40 billion

26.8%

Operating income

$404 million

$3.08 billion

50.1%

Net income

($126 million)

$2.63 billion

N/A

Free cash flow (TTM)

$1.04 billion

$25.02 billion

88.9%

Data Source: Amazon earnings releases. Parenthesis indicate negative numbers.  TTM = trailing 12 months. N/A = not applicable.

Could these stocks still be good long-term investments?

All three of these companies continue to grow impressively. As long as they manage to keep up their impressive growth, there can certainly be more upside potential, especially as these companies gradually start to realize their true profit potential over the years.

My personal preference of the three is Square, which has been a staple in my own portfolio since shortly after its IPO. The short explanation is that unlike the other two, Square is just starting to scratch the surface of its addressable market and could still spend several more years in hyper-growth mode.

To be clear, I don't think investors will go wrong with any of these three. Amazon is starting to focus a bit more on profitability than it used to and so far, it's been quite successful at doing so. Netflix is continuing to grow its membership base and produce unique and top-quality content, which should give it a big advantage when it comes to pricing power going forward.

The bottom line is that just because a stock has performed incredibly well doesn't necessarily mean that it's expensive. In many cases, the exact opposite can be true.