Microsoft's market cap was above Apple's at the close of trading Friday. Microsoft surpassed Apple periodically throughout the week during intraday trading, but Apple consistently beat out Microsoft in market valuation at market close.
At Friday's close, Microsoft held an implied market valuation of $851.2 billion at $110.89 per share, based on an outstanding share count of 7,676,218,736 shares as of Oct. 19, according to the company's most recent SEC filing.
Apple's market valuation, based on an outstanding share count of 4,745,398,000 shares as of Oct. 26, lagged just behind at $847.4 billion, at $178.58 per share.
If Microsoft ends the year as the most valuable company, it will be the first year it closes out in the top position since 2002.
Source: S&P Dow Jones Indices
Apple eclipsed a trillion-dollar market capitalization in August to become the first publicly traded U.S. company to hit the historic valuation. Amazon crossed the trillion-dollar threshold during intraday trading five weeks later but has never closed trading above the benchmark.
Apple's stock has had a painful few weeks, spurred by disappointing earnings on Nov. 1 and an announcement that it would no longer disclose how many iPhones, iPads and Macs it sells each quarter, reducing transparency for investors. Shares have lost roughly 16 percent of their value in the last month.
Meanwhile, Microsoft stock has tripled in the past four and a half years under the leadership of CEO Satya Nadella. It passed Google parent Alphabet by market cap and is up roughly 7 percent in the last month. Microsoft's closing price reached an all-time high of $115.61 on Oct. 1.
— CNBC's Patti Domm and Tom Franck contributed to this report.