Buffett revealed the investment during an interview on CNBC on Monday. Buffett's company, Berkshire Hathaway Inc. (BRK-A), planned to file a full quarterly update on its U.S. stock portfolio Monday afternoon.
Buffett has long refused to invest in high-tech companies because he has said it's too difficult to predict which technology businesses will prosper in the long run.
But he said he recently changed his view of IBM based on what he read in the company's annual reports and what he learned by talking to information-technology departments at Berkshire subsidiaries. He said he should have realized years sooner that the heart of IBM's business is providing service and equipment to IT departments.
"There's a fair amount of presumption in many places that if you're with IBM, you stay with them," Buffett said.
So Berkshire has bought about 64 million shares since March, or about 5.5 percent of IBM. Buffett says he believes IBM has a sound plan for the future.
IBM officials declined to comment Monday on Buffett's investment.
International Business Machines Corp., which marked its 100-year anniversary in June, has proven resilient even in a downturn because of hard decisions it made in the 1990s, when it tapped an outsider as CEO to help with a turnaround.
At the time, IBM was slipping with the rise of cheap microprocessors and rapid changes in the industry. Although it helped make the personal computer a mainstream product, it quickly found itself outmatched in a market it helped create. PCs also began to perform many of the functions of mainframes computer, throwing IBM's main moneymaking business into disarray.
The company decided then to focus on the high-margin areas of software and technology services and move away from computer hardware. That intensified with IBM's $3.5 billion purchase of PricewaterhouseCoopers' consulting business in 2002 and the sale of its PC business to Lenovo for $1.75 billion in 2005. Today, IBM is the world's biggest technology services provider.
The shift is important because it has allowed IBM to ride two recessions. When times are tough, businesses pay IBM to help them find ways to cut costs and handle technology chores that would be more expensive to perform in-house.
IBM's stock has more than doubled since the depth of the recession in 2008. IBM shares gained 74 cents to $188.12 in midday trading Monday, near the 52-week high of $190.53 reached in mid-October.
Buffett said Berkshire paid an average of about $170 per share for the IBM stock.
IBM executives insist the company's focus on long-term contracts insulates it from economic swings. The company has said it is ahead of its own aggressive forecasts. IBM has disclosed a goal of hitting $20 per share in adjusted earnings by 2015, a rare example of a long-term earnings target made public by a major company. IBM, which is based in Armonk, N.Y., says it plans to continue growing its software business and invest about $20 billion in acquisitions from 2011 to 2015.
Berkshire's investments are closely watched in the market because of Buffett's successful record. Buffett has said that Berkshire has been buying aggressively during the recent market turmoil.
Buffett said Monday that Berkshire had been adding to its already sizeable stake in Wells Fargo, but he didn't say how many more shares had been bought recently. At the end of June, Berkshire held 352.3 million Wells Fargo shares. That was up from 342.6 million shares Berkshire held at the end of March.
Monday afternoon's filing with the Securities and Exchange Commission may not reveal a full picture of Berkshire's investments because regulators often allow the Omaha-based company to conceal new investments for a time while building a position.
Buffett said that the third-quarter report that will be filed Monday won't show all of Berkshire's new IBM stake because some of the shares were bought in the fourth quarter.
Besides investments, Berkshire owns roughly 80 subsidiaries including insurance, railroad and utility firms.