David Cameron EU UK shale gas
David Cameron, the UK prime minister, has called a referendum on the UK's membership of the EU Reuters

As Britain prepares for a referendum on staying in the European Union (EU), just how much the country pays out every year to Brussels will be fuel for the debate.

All of the 28 member states pay into a central EU pot. That money is then redistributed around the EU, with more going to poorer countries to help them develop into strong modern economies by improving their infrastructure. The idea is that the whole of the EU is only as strong as its constituent parts. So developing poorer states makes sense because it will benefit everyone by boosting growth, demand, consumption and so on.

But eurosceptics in Britain argue it is not our taxpayers' responsibility to subsidise development projects and spending in other countries. Instead, they say the money should be kept in the UK. After all, we have our own infrastructure problems -- just look at the ageing rail network.

Of course, membership of the EU is about more than how much you get allocated from the budget -- there is a bigger picture. Membership allows people, goods and money to flow unfettered across borders, which gives a significant boost to EU states. The EU is a giant free market with over 500 million citizens. And for those on the left of politics, there are a number of social protections the EU affords for workers, such as holiday entitlement, working hours restrictions, and so on.

However, the numbers do matter. When you compare how much the UK received in 2014 from the EU budget against what it paid in, it is a net contributor by €4.6bn (£3.31bn, $5bn). For Germany, which is the EU's largest economy, this is even higher -- it is a net contributor to the budget by €14.33bn (£10.32bn). France, the second largest economy, contributed €6.1bn (£4.39bn).

And the two poorest EU economies got more out than they put in. Bulgaria, the poorest, was a net beneficiary by €1.85bn (£1.33bn). Romania, the second poorest, got €4.59bn (£3.31bn) more out than went in. Greece, whose economy has been crippled by years of financial and economic crisis, took out €5.18bn (£3.73bn) more than it put in.

The EU has put together a handy tool so you can see how much each EU state gets from the budget, where that money goes, and how much it put in at the start. Take a look.