If you weren’t following the UK election results closely, you could be forgiven for being a bit confused as to who actually won. With Labour declaring a victory for Jeremy Corbyn, Corbyn himself calling for Theresa May to resign and almost everybody agreeing that Mrs May has lost her credibility along with her majority, it’s not surprising that some Labour voters are incredulous not to see Mr Corbyn heading straight to Buckingham Palace to seek the Queen’s permission to form a new government.

So here’s a quick summary for those who are unfamiliar with the UK election process, or who are just a bit baffled by the result and the conflicting commentary surrounding it.

There are 650 seats in the House of Commons. Each seat corresponds to a constituency, or electoral ward – similar to the electoral college system in the United States.

In order to be able to secure an outright election win, and be able to form a government, a party needs to win one more than half of those seats, i.e. 326 seats.

With multiple parties contesting the election, it is very easy for no individual party to secure an outright majority. In this case, the party with the greatest number of seats has the first option to approach other parties in order to try to form a coalition – to use their combined seat count to form a government which has a majority in the House of Commons.

Theresa May entered the election campaign already holding an outright majority for the Conservatives, of 331 seats in the House of Commons. The Conservatives had held this outright majority since the 2015 election when David Cameron was Prime Minister.

Jeremy Corbyn entered the campaign with 232 seats. Again, these seats were won during the 2015 election, when Ed Miliband was the leader of the Labour Party. So this was a test for both candidates – neither candidate had previously stood as leader of their party in a general election.

As a result of yesterday’s vote, Theresa May’s Conservative Party now has 318 seats, and Jeremy Corbyn’s Labour party has 262 seats. So Labour has gained seats that it did not hold previously, and the Conservatives have lost seats. Hence the celebrations from Jeremy Corbyn’s team, and the condemnations of Mrs May’s performance.

The Conservatives, however, still have by far the largest number of seats – which is why Mrs May, and not Mr Corbyn, is in the position of being able to try to form a coalition.

In order to secure her majority, Mrs May needs 8 extra seats. Discussions are already underway with the Democratic Unionist Party, who hold 10 seats, to try to form a coalition. Assuming a coalition agreement can be reached, Mrs May will be free to form her government.

If Mrs May cannot reach an agreement with the DUP, Mr Corbyn could, in theory, try to form a coalition with the remaining parties in order to secure his own majority – but as he only has 262 seats and needs a further 64, he would need the support of the Liberal Democrats (12 seats), the Scottish National Party (35 seats), the DUP (10 seats) and Sinn Fein (7 seats) in order to be able to secure that majority. The likelihood of a coalition agreement being reached between all of those parties is roughly zero.

So whichever way you look at it, Theresa May has won the largest share of the vote, and has the greatest mandate to try to form a government.

The thing that’s truly incredible about this election result though, is that Theresa May, despite having lost her overall majority in terms of numbers of seats, actually won the largest share of the public vote that has been won by any Conservative Leader since Margaret Thatcher in 1979. Jeremy Corbyn, similarly, won more votes than Tony Blair did in his election landslide in 1997.

So how, then, if both candidates did so well relative to their predecessors, did neither of them secure an outright majority?

Well that’s down to three factors.

Firstly, turnout, at 68% was higher in this election than in any other election since 1997. Quite suprising given voter appetite for an election was supposedly so low. There is speculation that this is down to Jeremy Corbyn galvanizing the usually apathetic younger members of the electorate to get out and vote, but the proportion of voter turnout by age has not yet been confirmed – so it remains speculation.

Another theory (entirely my own at this stage, though it may be shared by others) is that the election campaign was so divisive, with both Jeremy Corbyn and Theresa May offering themselves as the only possible credible leaders of the country, and launching such bitter attacks on each other’s characters (backed up by mainstream media reporting and social media campaigns that were hugely biased in favour of either candidate), that people turned out to vote to try to prevent a win by the candidate they least liked. There was certainly a lot of “I’m gritting my teeth and voting for Mrs May because I can’t stand the idea of Jeremy Corbyn as Prime Minister” – just as there was an equal amount of “You have to vote Labour to prevent another 5 years of evil Tory cuts to public services”.

The second factor, is the wiping out of the UKIP vote share, and the massive loss of seats by the Scottish National Party. UKIP won 12.6% of the public vote in 2015 – this was almost entirely eradicated in yesterday’s vote, with most voters appearing to have switched to the Labour Party (a great surprise to most pundits who expected UKIP’s votes to go to the Conservatives). The SNP, similarly, lost 21 of its 56 seats – 12 to the Conservatives, 6 to Labour and three to the Liberal Democrats.

The final factor is the constituency voting system, which means that one party can win a higher number of votes across the country than another, but can still win fewer seats. You only have to look at the 2015 election results to see what sort of disparities this causes, particularly among the smaller parties – if you compare UKIP to the Liberal Democrats and the SNP, you can see that UKIP, with 12.6% of the public vote, won only one seat, whereas the Lib Dems, on 7.9% of the vote, won 8 seats, and the SNP, with only 4.7% of the vote, won 56 seats! In yesterday’s election, the Conservatives won 48.9% of the public vote but this only amounted to 42% of the number of available seats.

source: bbc.co.uk

The upshot of all this is that there are endless ways the two main parties can spin the results. Pretty much everybody, across all the parties, is in agreement that Theresa May and the Conservatives ran a disastrous campaign, and that Jeremy Corbyn, by contrast, as the obvious underdog at the start of the campaign, fought his corner very successfully.

On the other hand, the truth is that Jeremy Corbyn, in the vein of all opposition party leaders who don’t expect to win an election but do want to gain seats, ran a campaign based on wild promises he knew he would be unlikely to ever have to deliver on. His promises of free tuition fees for students, reversal of NHS and police spending cuts, and nationalisation of public services, would have likely bankrupted the country but were enough to gain him huge public support. The fact, then, that he was up against the worst Tory campaign in recent history, promising the earth, and yet still lost, does not bode well for his future election chances, no matter how much he wishes to celebrate the result.

Mrs May, similarly, went into the election against a candidate whom most of the general public viewed as a bit of a joke – she was expected to win a landslide majority. The fact that she managed to run such a bad campaign, particularly in so poorly explaining her proposed changes to social care policies, and then having to do an embarrassing U-turn when the proposals went down so badly with voters, and has ended up not only in not securing a landslide but in losing the parliamentary majority she already had, has done massive damage to her credibility.

All in all, it’s a bit of a sorry mess. The one thing it is not, though, despite the bleatings of a few die-hard Remainers, is a reversal or even a softening of the Brexit vote. Both major parties ran on a manifesto of delivering Brexit, and between them they secured 82% of the parliamentary seats available. Nick Clegg, one of the most die-hard Remainers in Parliament, lost his seat yesterday – as clear an indication as is possible that voters have rejected any notion of overturning the referendum result.

So if nothing else good can come out of this election, this is it – Mrs May absolutely has a mandate now, to get on with Brexit!