IBM rose $1.62 to $179.17 at 4 pm on the New York Stock Exchange, giving it a market value of $214 billion. Microsoft fell 13 cents to $25.45 on the Nasdaq Stock Market, giving it a market value of $213.2 billion.
Its the first time since 1996 that IBM closed ahead of Microsoft, though IBM had passed the software company on an intraday basis in May. Microsoft was worth three times as much as IBM in 2000.
IBM chief executive officer Sam Palmisano divested the companys PC business six years ago, calling it commoditised, to invest in software and services.
Microsoft, whose Windows and Office software are used primarily on PCs, lost its spot as the most valuable technology company last year to Apple, as sales of iPad tablets and iPhones crimped PC demand. Apple is now the worlds most valuable company, with a market value of $422.9 billion.