There are additional costs than those above associated with the retail price of fountain drinks. There are the initial purchase of the equipment, maintenance, depreciation, cost of CO2, electricity, water filters, etc. There is also labor involved in non self-service locations. The truer cost is about 40 cents for a 20 ounce fountain drink. For those giant 44 ounce super size drinks, the ratio is lower than 2:1, higher for small 12 ounce size.
Still, fountain drinks are a high profit item at practically every place that sells them: convenience stores, fast food places, stadiums, theme parks, etc. That's why C-stores can occasionally offer all sizes for 99 cents and still make a tidy profit.