The stats and facts
The UK's gross contribution to the EU was £18.8bn in 2014, the most recent year for which we have the final figure. That's equivalent to £361m a week.
But it ignores the rebate, negotiated by Margaret Thatcher, which reduces our bill by £4.4bn.
Then we get a further £4.6bn back, mostly for agricultural subsidies and development funds for poorer regions. And the EU spends about £1.4bn a year in the UK private sector.
That still leaves a net contribution of £8.4bn or £161m a week. (Source: HM Treasury)
What the EU does with the money?
The biggest area of EU spending is on agriculture. That accounts for 40% of the EU's budget, and more than half of the money that comes back to the UK, although this figure has fallen over time.
The other major area of spending, worth a third of the budget, is on funding for what the EU calls "economic, social and territorial cohesion". That means spending in poorer regions of EU member states, often on infrastructure projects like new roads.
Smaller amounts of money go on other economic projects, such as grants for technology research, and the EU's foreign affairs work. A total of 6% of the EU budget is absorbed by administrative costs.
What it doesn't do
The EU does not perform the principal everyday functions of a normal state.
It doesn't provide schools and hospitals. Those are are run by national governments. As are prisons, the emergency services and the armed forces, although there are some EU politicians who would like to see the creation of an EU army.
The EU does not raise taxes directly from citizens and it doesn't pay out pensions or benefits.
For countries inside the eurozone the European Central Bank sets interest rates and other elements of monetary policy, but that doesn't apply across the whole of the EU.
The UK has opt-outs from two of the most important EU programmes: the single currency and the border-free Schengen area.
It also has a flexible opt-out on EU legislation in the area of freedom, security and justice. That allows the UK government to pick and choose to some extent which laws they want to adopt.
Argument for Leave
We put much more money into the EU than we get back so if we left we'd have more to spend in the UK.
Argument for Remain
The benefits to the UK economy of staying in the EU far outweigh the cost of membership