For quite some time now, tech stocks have been the poster child for growth stocks. Total returns for the tech-heavy Nasdaq Composite index are up around 350% in the past decade, compared with around 230% for the more diversified S&P 500 over the same timeframe.

Regardless of tech's great run, many companies have blossomed and then have fallen by the wayside. Despite the huge return potential of some tech stocks, you don't want to lose sight of the long term and invest in companies without staying power.

If you have $5,000 available to invest that isn't needed to reduce short-term debt or build an emergency fund, here are three tech stocks that are great long-term options.

1. Apple

It seems cliche to start with Apple (AAPL -0.35%), but you don't become the world's most valuable public company for no reason. Apple has been a titan in the tech world, and that's not likely to change anytime soon.

In its Q2 2023, ended April 1, Apple made $94.8 billion in revenue, and iPhone sales accounted for more than 54%. There's no denying that it's Apple's foundation. However, Apple's future growth probably isn't in the iPhone -- or any hardware, for that matter -- it's in its services. Over the past five years, Apple's Services revenue has jumped tremendously.

Time Period Services Revenue
FY 2019 $46.2 billion
FY 2020 $53.7 billion
FY 2021 $68.4 billion
FY 2022 $78.1 billion
Q3 2023 $20.9 billion

Data source: Apple. FY = fiscal year.

After testing the waters with ApplePay, Apple Card, and, most recently, Apple Pay Later, it's certain that Apple will make a serious entrance into financial services. According to Boston Consulting Group, fintech is projected to grow from $245 billion to $1.5 trillion globally by 2030.

Not many companies are better positioned to take advantage of that than Apple if it commits the resources. There are more than a billion active iPhones, giving Apple an inside route to becoming a financial one-stop-shop.

Having the iPhone pad its bottom line while expanding its service ecosystem is a recipe for long-term sustainability for Apple.

2. Microsoft

When it comes to tech companies, none may be as engrained in the business world as Microsoft (MSFT 1.82%). That puts the company in a unique position for longevity that few, if any, other tech companies can replicate. From Excel for databases to LinkedIn for recruiting, Windows for operating systems, Azure for cloud infrastructure, and more, Microsoft is a staple in the corporate world.

Microsoft's footprint has positively affected its top line in recent years. In its Q2 2023, Microsoft had $52.7 billion in revenue, up 2% year over year. The growth isn't jaw-dropping by any means, but it's decent considering broader economic conditions.

Microsoft's stock has received a lot of love this year, mainly because of its ownership stake in ChatGPT's creator, OpenAI, and the potential investors see in this partnership. The partnership allows Microsoft to benefit from OpenAI's growth, as well as have the ability to incorporate its technology into Microsoft products such as Office and Azure.

The future of Microsoft isn't as reliant on having AI live up to the hype, as is the case for some tech companies, but it can definitely be a catalyst for impressive growth in the years to come -- especially if it makes Azure more competitive in the fast-growing cloud industry.

Investors can feel confident holding on to Microsoft for the long haul.

3. CrowdStrike

CrowdStrike (CRWD 2.03%) is a cybersecurity company that's pioneered AI into the field. Its platforms use AI to provide real-time threat detection and prevention, and their efficiency has made CrowdStrike one of the leaders in the cybersecurity industry.

Despite its efficiency, CrowdSrike has noted that cyberattacks continue to get more sophisticated, growing the demand for CrowdStrike's services. In its 2023 Global Threat Report, CrowdStrike noted 33 newly named adversaries and a 95% annual increase in cloud exploitations. CrowdStrike's continued growth should be aided by the fact cybersecurity is becoming an indispensable industry.

If money is tight and companies need to trim their budgets, many things will get cut before their cybersecurity budget. It's essentially insurance in today's digital world: Either pay for relatively priced cybersecurity services or risk the huge financial and, maybe more importantly, reputational hit.

According to IBM's 2022 "Cost of a Data Breach" report, companies using AI and automation had a 74-day shorter breach lifecycle and saved around $3 million more than companies not using AI. That plays right into the hands of CrowdStrike, which has shown a commitment to staying ahead of the innovation curve.