The 2017 general election wasn’t that close – at least in terms of seats. The Conservatives won 317 and Labour 262.
Within a few days, people were claiming that Labour had been just 2,227 votes away from the chance of government. That claim has enjoyed a recent renaissance on social media. It is a claim with many problems, as the original analysis appears to miscalculate the figure.
The claim relies on the smallest number of votes changing in a specific way. It ignores that, based on the same logic, the Conservatives needed only 50 switched votes for a working majority. It also ignores the fact that constituencies are not independent events.
Far more votes would need to have shifted to plausibly change the outcome.
Responding to the recent leak of an internal Labour report, the former shadow Chancellor John McDonnell claimed: ‘Labour came within 2,500 votes, spread across a limited number of constituencies, of forming a government in 2017’.
Days earlier, Guardian columnist Owen Jones had also asserted: ‘Labour came within 2,227 votes and seven constituencies of forming a government in 2017.’
What does ‘2,227 votes’ mean? In the 2017 general election, the Conservatives won 13.6m votes and 317 seats, and Labour won 12.9m votes and 262 seats.
In Great Britain, the Conservatives won a vote share of 43.4%, up 5.8 points from 2015. For Labour, their vote share was 41.0% — an increase of 9.8 points from the 2015 election.

The R code for the graphs is available on GitHub. There is also a R Markdown page to view. The House of Commons Library collected the electoral data.
General elections in the UK are fought under the first-past-the-post system, and each constituency is a separate election.
Some constituencies are close, where the result between first and second-placed candidates is called ‘marginal’. In 2017, for instance, the most marginal of these was North East Fife, where Stephen Gethins (SNP) won this seat by just two votes.
The 2,227 figure is the sum of the seven smallest majorities in Conservative seats where Labour finished second. Even that is debatable. The figure should be either switched votes (1,118 votes Labour needed to switch from the Conservatives) or added votes (2,234 votes that Labour needed to add to win).
The claim rests on a hypothetical outcome – Labour winning those seven constituencies by minimal votes.
The hypothetical House of Commons would have had the Conservatives on 310 seats and Labour on 270 seats. The DUP would have had 10 seats. Even if the Conservatives had support from the DUP, the party would be left without a working majority.
However, there are strong assumptions behind this claim that Labour could have formed an alternative government.
For example, we have to assume that the switched or added votes occur only in those specific seven constituencies, and that no other votes in any other constituencies change.
We have to assume that the Conservatives would not form a minority government, or that the Commons doesn’t just call another election. Finally, we have to assume that Labour agrees with other parties to lead a minority government.
This is a profoundly hypothetical scenario. Claims that Jeremy Corbyn had ‘the chance’ and ‘could have formed’ a government downplay all these important assumptions.
They also ignore the fact that we can do a similar calculation for the Conservatives. We can find this figure by looking at their second places.
By the same logic, the Conservative needed only 50 switched votes to reach 321 seats. Given Sinn Fein’s abstentions, this is a probable working majority. 528 votes would have needed to switch for the Conservatives to win 326 constituencies — a Commons majority.
We should remember that constituencies are not independent events. We can also calculate what vote share would need to switch across Great Britain. How big does a uniform national swing need to be?
That also requires three assumptions. If one party increased their vote share, that same change happens in every seat. Only switching between Labour and the Conservatives occurs. Turnout does not change.
Under those assumptions, 0.04 points from Labour to the Conservatives gives the Conservatives 321 seats. Some 0.37 points in the other direction reduces the Conservatives to 310 seats.
These two switched vote shares are equal to around 13,000 and 116,000 votes across Great Britain. The Conservatives would have needed fewer switched votes than Labour to plausibly change the outcome in their favour.
There are other considerations to take into account, too. If Labour had been closer to the Conservatives in votes, then the electoral dynamics would also have changed.
In this alternate universe, the messages and targeted campaigns could have been dissimilar. Indeed, Theresa May might not have called the election in the first place.
The ‘2,227 votes’ figure appears to be a miscalculation. Suggesting Labour were a few thousand votes from “forming a government” relies on diamond-strong assumptions. It is time to bring it to an end.
By Anthony B. Masters, Royal Statistical Society Statistical Ambassador.