For a brief period today, Microsoft achieved greater market value than Apple, which is often called the world's most valuable company. The temporary shift recalls a long, up-and-down history of a rivalry between the two companies—though they are partners in many areas today.

Microsoft reached a market capitalization of close to $813 billion today, with Apple falling only about a billion behind. Apple has fallen a long way since earlier this year, and Microsoft has also seen declines along with many other tech companies, but Microsoft's struggles have not been as pronounced, at least in terms of investor confidence.

The last time Microsoft secured this lead was in 2010. Earlier this year, Apple became the first US company to achieve a $1 trillion market cap. Amazon followed shortly after. Microsoft has still not reached that milestone, and all three are below it now, following a trying period for tech stocks.

Today's market valuation shifts shouldn't be taken as definitive or absolute statements on the relative health of the companies; it's far more complex than that. But generally, Apple has been barely meeting (or falling just short of) investor expectations lately. This is in no small part because of the saturation of the smartphone market. Apple just isn't able to sell as many phones. As we've noted many times recently, the company is focusing on making more money from each iPhone purchase with higher per-unit-prices, add-on services and content, and software subscriptions.

That's not to say that Apple is in any danger as a company—by many metrics, it is still in an enviable position. It just means that the company has recently been struggling to meet investors' steep demands for continual growth.

Microsoft has its own problems, but it has secured some big wins lately. Its Azure and Office 365 cloud services are thriving, and the Xbox platform, while lagging behind Sony's PlayStation, is looking up, with major studio acquisitions and a streaming strategy around the corner that would leverage Azure and make for an advantage Sony likely won't be able to match.

More relevant to the Apple comparison, Microsoft's Surface computers have crept into some of Apple's Mac mindshare with creative professionals, though that is only a small portion of business for either tech giant.

Microsoft CEO Satya Nadella has focused Microsoft's recent strategies on software subscriptions and cloud services, and that has proved a winning plan so far. The company weathered recent turmoil for tech stocks better than some other companies—though few tech stocks are untouched by the recent troubles.