SodaStream makes machines that carbonate home tap water. "Costa gives us access to this market through a strong coffee platform", Coca-Cola chief executive James Quincey said in a joint statement.
The purchase from Britain's Whitbread of Costa's nearly 4,000 outlets thrusts the world's biggest soda company into one of the few bright spots in the sluggish packaged food and drinks sector.
Another of JAB's coffee brands, Keurig, merged its business with one of Coca-Cola's domestic competitors - Dr Pepper Snapple - in January. And in May, Nestle paid more than $7 billion for the rights to sell Starbucks coffee and tea in supermarkets and other stores outside its coffee shops.
"Coca-Cola are one of the few companies in the world that could justify the valuation", said Nicholas Hyett, equity analyst at Hargreaves Lansdown.
"Its global reach should turbo-charge growth in the years to come, and hot drinks are one of the few areas of the wider beverages sector where the soft drinks giant doesn't have a killer brand", he said.
Speaking on the BBC's Today programme, Ms Brittain explained that Coca-Cola wanted to buy Costa because "they want the coffee product, they have no coffee in their range".
Coca-Cola, which has over 500 brands in its stable including Fanta, innocent smoothies and Powerade sports drinks, certainly has the deep pockets to help push Costa on the world stage. It has invested heavily in Costa's expansion overseas recently, but had been looking to siphon off the business to generate funds for the expansion and for its other business, the budget hotel chain Premier Inn.
The company said net cash proceeds from the deal were expected to be approximately £3.8 billion at completion, after adjusting for estimated transaction and separation costs.
Whitbread shares soared almost 20% in early morning trade, catapulting it to the top of the FTSE 100.
Whitbread had meant to spin off the chain as a separate firm, but said a straight sale was more profitable.
Whitbread had bought Costa for 19 million pounds in 1995, when it had just 39 shops.
"Whitbread will also reduce debt and make a contribution to its pension fund, which will provide additional headroom for the expansion of Premier Inn".