The UK is set to have a referendum by the end of 2017 on whether or not to remain a member of the European Union.

The European Union is an economic and political partnership between 28 European countries. It began after World War Two to foster economic co-operation with the idea that countries which trade together are more likely to avoid going to war with each other. It has since grown to become a "single market" allowing goods and people to move around, basically as if the member states were one country. It has its own currency, the euro, its own parliament and it now sets the rules in a wide range of areas - including on the environment, transport, consumer rights and even things like mobile phone charges

The one thing we know for sure is that Prime Minister David Cameron has said it will happen by the end of 2017. The most likely times of the year for referendums are generally May or September, and some people think it should be held as soon as possible. There had been suggestions that it could be held in May 2016, to coincide with elections in Scotland, Wales, Northern Ireland and London, rather than waiting for 2017 - but the government has ruled that out. Here is a full rundown of the likely dates and key events.

When David Cameron announced in January 2013 his pledge to hold a referendum, a key element was that he would seek to make changes to the way the European Union works - or at least the rules covering the UK as a European Union member. Only once this renegotiation of British membership had been completed would he put the new arrangement to the public vote.

During the election the Lib Dems and Labour both said they did not want a referendum unless there were plans to transfer more powers from the UK to the EU. Labour has since dropped its opposition, so the Conservatives are expected to get their Referendum Bill passed easily. The House of Lords could delay it, but as the referendum was promised in the Conservative election manifesto (a manifesto is a document setting out what a party would do if they won the election) it is not likely to reject the bill once MPs back it.

he question is always crucial in any referendum. The 2013 suggestion from the Conservatives was: "Do you think that the United Kingdom should remain a member of the European Union. Yes or no". Some people thought this phrasing leaned too far towards the status quo - the current state of affairs - and the Electoral Commission, which has to approve the question, said it was not clear enough and proposed: "Should the United Kingdom remain a member of the European Union or leave the European Union?" The final decision will be made by MPs but Downing Street has accepted the amended wording.