If you're considering an investment in software giant Microsoft (MSFT -1.27%), you're not crazy, and you're hardly alone. The company helped shape the computer industry we all rely on today, and while it and the rest of the world have moved beyond personal computers over the past three decades, Microsoft is as relevant today as it ever was.

The stock's still dishing out gains, too. Despite being down 20% from last year's record high, shares are up more than 300% for the past five years. In fact, the recent lull is being eyed by many as a buying opportunity.

Before plowing into a position in the admittedly impressive company, however, there's a question you may want to ask yourself and an alternative choice you may want to consider.

There's nothing wrong with Microsoft...

To be clear, you could do much, much worse than stepping into a stake in Microsoft. Not only is its Windows operating system still the world's most popular PC platform, the company's deep into the cloud computing, video gaming, and personal productivity software markets. It also owns professional networking website LinkedIn and has integrated its software with the site quite nicely to make it a true business-building tool. Then, there's the techy stuff the company's doing that most investors never hear about.

This well-diversified (but complementary) mix of businesses is a big reason Microsoft not only has not failed to produce year-over-year growth in every quarter since late 2017 but also is still broadly accelerating that growth. Recurring revenue is another contributing factor to that persistent growth. Analysts are looking for more of the same, too.

Microsoft is expected to consistently grow revenue and earnings through 2024.

Data source: Thomson Reuters. Chart by author.

This reliable progress, however, still doesn't necessarily make Microsoft the best next trade for every investor. There's a potentially better option out there, even if you're on the hunt for tech-led growth. Indeed, Microsoft's sizable slide since the middle of last year underscores the very reason you may want to opt for the alternative.

...but here's a better idea for most investors

It's a question some investors don't want to ask themselves only because they know they won't like the answer. But it must be asked all the same: Is your portfolio diversified enough right now to make even the venerable Microsoft your next pick?

If you currently have fewer than 10 stocks and no diversified index funds in your mix of holdings, the answer to the question is a solid no; you need more breadth and depth before stepping into a stock like Microsoft that's clearly capable of double-digit drawdowns in just a matter of months.

Conversely, if half of your portfolio consists of index funds and the other half is spread out across 10 or more different stocks -- and different kinds of stocks -- Microsoft may well be the right addition after its big dip.

A person looking down at two chalk arrows pointing in different directions on the ground.

Image source: Getty Images.

What if, however, you're somewhere in between those two scenarios (as many investors are)?

Here's the thing -- you don't necessarily have to give up tech-driven growth to adequately diversify a portfolio.

When most investors think of "indexing," they tend to think of the S&P 500 (^GSPC -0.88%). And well, they should. Not only is it the world's most recognized market benchmark, encompassing about 90% of the market's total capitalization, but it also reflects the market's overall sector diversification. That's why some people aren't fans of indexing, in fact -- the S&P 500 is bogged down by lower-growth stocks from the utilities, financial, telecom, and consumer goods sectors.

Indexing isn't necessarily limited to S&P 500-based instruments, though. The market-cap-weighted Nasdaq Composite or a comparable exchange-traded fund like the Invesco QQQ Trust -- which mirrors the Nasdaq 100 -- are indexes too but still stacked with technology growth stocks. Among the Nasdaq's biggest constituents are Tesla, Amazon, Apple, Alphabet, and Microsoft, which is currently its second-biggest holding...not too far behind Apple.

Yes, you can own a piece of all the major tech names the world seems to want with one easy-to-trade fund.

The best plans are plans you can actually stick to

Don't misread the message. If there's a clear reason you know you should own Microsoft, even if your portfolio isn't fully diversified yet, buy it. Chief among these potential reasons are plans to add diversity to your holdings at a later time, after stepping into a stake in the software giant while it's down.

Unless you've got a clear plan to make that move toward full diversification, though, most investors will be better served by owning a broad mix of stocks representing the Nasdaq Composite first. This may be easiest to achieve with the aforementioned Invesco QQQ Trust. Its long-term performance is comparable to Microsoft's, without imposing all the stress and worry stemming from owning a volatile individual stock like Microsoft.

There's a bigger, philosophical takeaway buried in all of this discussion, too. That is, being a successful investor isn't entirely about picking a few great stocks. A lot of it's got to do with managing a portfolio you can live with, even when things get a little rocky.

Index funds make this easier to do, while owning individual stocks can invite panicked, errant decisions. Several investors have been shaken out of Microsoft in recent months due to its poor performance, but they may regret not being in those trades still once the stock starts to recover.