The deal comes at a nearly 57% premium to yesterday's close at $8.43.
This is the latest in a string of acquisitions involving cloud-based software companies, including this week's $3.4 billion acquisition of SuccessFactors by SAP, and Oracle's recent $1.5 billion bid for RightNow.
DemandTec provides cloud-based analytics software that help businesses examine different customer buying scenarios, both online and in-store.
DemandTec has about 450 customers worldwide in retail, consumer products and other industries. The company also had a portfolio of 31 relevant patents. DemandTec, which has more than 350 employees, will be integrated into IBM's Software Group.
The deal is subject to DemandTec holder approval and the usual regulatory approvals. Closing is expects in Q1 2012.