When the UK starts the Article 50 process of leaving the EU next month, one of the earliest items on the agenda - or so we are told - will be a demand for money from the EU. This is mostly to cover Britain's share of bills due from the EU's byzantine budget process.

But like all Brussels money fights, this one could turn ugly quite quickly. And if it gets out of hand it could easily sour the rest of the Brexit talks process, and the "new relationship" process to follow, writes Economics Correspondent Sean Whelan.

The EU budget is €142 billion this year. This sounds like a lot of money - indeed it is five times the combined spending of all United Nations agencies. But it is less than 2% of all government spending in the EU, and is only 1% of the EU's GDP. Or put another way, its about twice the size of the Irish budget, but spread over 530 million people. 

But there is something about the EU budget that brings out the worst in politicians, and the bitterness of budget disputes is completely disproportionate to the relatively small sums at issue. Which makes Britain's exit bill a potential slaughterhouse for the idea of a smooth and orderly negotiated settlement.

The sum of money is in the €30 to €60 billion range, with - predictably enough - the UK at the low end and the European Commission at the high end. But who is right, and more importantly, what is the bill for?

Alex Barker, the Brussels Editor of the Financial Times, has done us all a favour. In a new paper for the Centre for European Reform he has plunged into the unpleasant and confusing world of the EU budget to try and figure out answers to these important questions.

The biggest chunk of the bill is for spending commitments over the course of the EU's 2014-2020 multi annual budget framework. A key issue here is a rather antique French state accounting concept known as RAL - Reste a Liquider - roughly translated as "yet to be paid". 

By 2018 Barker estimates there will be a RAL of some €241 billion. More than half of this is for cohesion spending (for the new member states to catch up), and a fifth each for Agriculture and Research. Because the budget was late in being agreed, a lot of the spending has not taken place yet. In fact most of the cohesion payments - about 70% - are back-loaded into the years after Britain has left the EU.

But Britain as a full member state has agreed to this budget, so the European Commission expects it to honour its commitments and pay up its share - somewhere in the region of €29 - €36 billion. 

The newer member states - such as Poland, Hungary and Czech Republic - are also counting on getting this money, and have approved spending programmes on that basis. And for the net contributor states, those that pay in more than they get back from the EU budget, there is a danger that if Britain does not pay up, they will be stuck for having to make up Britain’s share. Which is not impossible for them by any means - but the politics of it are quite unpleasant.

Ireland became a net contributor to the EU budget two years ago - after a long run as one of the biggest recipients of EU aid - so we too could get stuck with a higher contribution if the UK failed to pay up. 

As the Netherlands would have to pay up an extra €4 billion, Ireland would probably be hit for another billion by 2023, maybe more. Yes there is fiscal space in the budget plans for a sum of this size - but it was earmarked for the Rainy Day Fund, not transfers to Eastern Europe. 

And that is assuming the economy stays upright as planned - but that planning was on a pre-Brexit basis, and growth projections have been dialled down since. Hence the prospects of a double Irish whammy from Brexit: a lower level of GDP growth and a higher EU bill, courtesy of the British voters. You can see how the politics of this could get toxic quite quickly.

A second set of spending commitments exist that could become the subject of an even bigger money fight - one that would be a field day for the British tabloids This is the evergreen topic of Eurocrat pensions. Like our own state, the pensions of EU civil servants are not paid from an invested pension fund - they are paid on a pay-as-you-go basis from each year's budget. 

The pension liability is about €67 billion (compared to an estimate of €98 billion for Ireland’s unfunded pension liabilities). Again the sums of money are not huge in the context of the 530 million citizens of the EU. 
But who wants to get stuck for a pension bill for Eurocrats (average retirement benefit €67,149 a year). 

The British will argue that their obligation stops the day they leave the EU, or might continue with pension payments for the British staff of the Commission (about 4% of staff) - this would cost about €80m this year. 

Michel Barnier's EU negotiating team will argue they have an ongoing commitment to pay, because they gave a commitment as a member state to cover the retirement cost of all staff hired, and must pay the UK share of that cost - between 12 and 15% - giving a cost this year of around €120m. But the pension funding commitment won't peak until 2049, when it will hit €218m for the UK share.

Thre are also a stack of other liabilities - such as the €16 billion Juncker fund for economic stimulus, or the €3 billion Galileo satellite navigation system, €10 billion for the Connecting Europe fund. And there are contingent liabilities and guarantees on loans made to the European Investment bank (€23 billion), and the various EU bailout schemes, which amount to €56 billion. €22 billion is owed by Ireland. The UK has a share of some of the guarantees that allow this money to be borrowed at low rates (adding its heft to the ratings agencies' AAA rating for EU debt). 

And there is a whole stack of off-balance sheet items that even Alex Barker says are too complex for the scope of his 15 page paper. 

But just as the EU has liabilities, it also has assets on its balance sheet, and the UK would be due a share of these to offset the exit bill. These include €8.6 billion of property, plant and equipment - including the Commission's Berlaymont Building in Brussels, and the Galileo satellites - and €13.9 billion of assets available for sale. 

The UK is also due a share of EU spending over the next few years, so about €9 billion is netted off the final figure for that. And there is some of Mrs Thatcher’s famous budget rebate due to the UK as well. So that has to come off to arrive at a net figure for the British bill.

A key point of contention is what is the British share of the EU budget - is it calculated from Gross National Income (GNI) in which case Britain has to pay up 15% of the overall EU bill. Or is it calculated (as the British would prefer) from an average of actual contributions after the rebate - in which case it is 12.1%.

Barker then works through three different scenarios for how much Britain could end up having to pay in an exit charge. A maximalist position would see the UK having to pay up all contingent liabilities upfront, and get no rebate money after 2018. If the UK share of the bils is set at 12% they would have to pay €57.4 billion. At 15% share, the cost to the UK would be €72.8 billion.

Excluding contingent liabilities and rebate would see the figures drop to €48 billion and €61 billion, depending on the percentage share used. While factoring in maximum receipts for the UK would see the bill drop again to €24.5 billlion and €33.4 billion. 

Barker works through the legal position of both the EU (which sees all liabilities as joint and several responsibility of the member states), and the UK (which thinks any funding gap is the EU institutions problem - they could cut spending after all). But Commission lawyers have been pouring over the UK treasury paper issued before the Scottish independence referendum, which insisted that Scotland would be liable in full for its share of UK liabilities.

Ultimately Barker believes the issue of the exit costs will be settled by politics, not law. That’s how pretty much all EU money fights end - by a political compromise. The entire system is set up to produce political compromises. 

Yes the EU could simply refuse to budge and run down the two year Article 50 clock to extract concessions from the British. But the danger is if the talks with Britain collapse completely there is no deal of any sort - on trade as much as the terms of departure - and the EU states are left to fight among themselves over filling a €60 billion budget hole, or cutting aid to the most needy states (who are already enjoying less generous terms than we got when we were net beneficiaries of the EU budget ). 

With pressure on both sides to do a deal, how the departure payment issue is dealt with will set the tone for most of the other negotiations over the terms of Brexit.