Soft drink makers are considering taking legal action against the government over its controversial sugar tax as George Osborne’s budget shows further signs of unwinding.

Suing the government is one option that companies are considering as they await more details on the tax, which will come into force in 2018 and cost £1bn to implement, almost double the amount that it is expected to raise.

The cost of the sugar tax has been revealed in documents published by the Office for Budget Responsibility alongside the budget. The extra cost will come from a predicted rise in accrued interest that the government will have to pay on debt that is linked to the rate of inflation.

The new tax will add 24p a litre to soft drinks with the highest sugar content, a cost that could be passed on to shoppers through higher prices, meaning inflation would rise.

The chancellor has predicted the tax will raise £520m in its first year, far less than the cost of introducing the levy.

Gavin Partington, director general of the British Soft Drinks Association, said: “This just reaffirms our view that this tax is ill-considered. The evidence does not suggest it will be effective and taxpayers will be left paying a heavy price for it.”

The announcement of the sugar tax led to sharp falls in the share prices of major drinks companies, such as Britvic, the maker of Robinson, and AG Barr, the maker of Irn-Bru.

The leading companies are now considering how to respond to the tax, with legal action against the government one option. The soft drink makers could sue the government through European courts on the basis that other types of food and drink – such as fruit juice and milkshakes – are not included. Similar taxes in Scandinavia have been successfully challenged.

Partington added: “At this stage all options are on the table. We need clarification about how this tax is going to work, exactly what’s excluded and what’s not. Nothing can be ruled out at this stage.”

Coca-Cola also refused to rule out legal action. A Coca-Cola Great Britain spokesperson said: “We need to know more about the levy and how the government plans to implement it. Once this is clear to us, we’ll decide on what steps to take as a business and how best to continue the work we have done to help people consume less sugar and calories from our drinks.”

However, the government defended the tax, claiming the chancellor was putting the next generation first, and that the soft drink makers had two years to cut the sugar content in their products.

A HM Treasury spokesperson said: “He introduced a new levy on the soft drinks industry to pay for a doubling of dedicated sport funding for every primary school in the country, a huge expansion of breakfast clubs to ensure that every child gets the best start to the day, and new funding for a longer school day.

“The chancellor also made clear that this was a policy aimed at driving meaningful change. The new levy will not be introduced until 2018, giving companies plenty of time to change product mix and reduce sugar content.”