Local elections are, on the whole, a much better guide to the next general election than anything the polls might do.

In 2012, Kevin Cunningham, then working in Labour’s targeting and analysis team, surprised his colleagues by announcing that they had lost the 2015 election. Despite gaining 823 councillors and taking control of 32 more local authorities, Cunningham explained to colleagues, they hadn’t made anything like the gains necessary for that point in the parliament. Labour duly went on to lose, in defiance of the polls, in 2015.

Matt Singh, the founder of NumberCruncherPolitics, famously called the polling failure wrong, in part because Labour under Ed Miliband had underperformed their supposed poll share in local elections and parliamentary by-elections throughout the parliament.

The pattern in parliamentary by-elections and local elections under Jeremy Corbyn before the European referendum all pointed the same way – a result that was not catastrophically but slightly worse than that secured by Ed Miliband in 2015. Since the referendum, thanks to the popularity of Theresa May, the Conservative poll lead has soared but more importantly, their performance in contests around the country has improved, too.

As regular readers will know, I was under the impression that Labour’s position in the polls had deteriorated during the coup against Corbyn, but much to my surprise, Labour’s vote share remained essentially stagnant during that period. The picture instead has been one of steady deterioration, which has accelerated since the calling of the snap election. So far, voters buy Theresa May’s message that a large majority will help her get a good Brexit deal. (Spoiler alert: it won’t.)

If the polls are correct, assuming a 2020 election, what we would expect at the local elections would be for Labour to lose around 100 councillors, largely to the benefit of the Liberal Democrats, and the Conservatives to pick up around 100 seats too, largely to the detriment of Ukip.

But having the local elections just five weeks before the general elections changes things. Basically, what tends to happen in local elections is that the governing party takes a kicking in off-years, when voters treat the contests as a chance to stick two fingers up to the boost. But they do better when local elections are held on the same day as the general election, as voters tend to vote for their preferred governing party and then vote the same way in the elections on the same day.

The Conservatives’ 2015 performance is a handy example of this. David Cameron’s Tories gained 541 councillors that night. In 2014, they lost 236, in 2013 they lost 335, and in 2012 they lost 405. In 2011, an usually good year for the governing party, they actually gained 86, an early warning sign that Miliband was not on course to win, but one obscured because of the massive losses the Liberal Democrats sustained in 2011.

The pattern holds true for Labour governments, too. In 2010, Labour gained 417 councillors, having lost 291 and 331 in Gordon Brown’s first two council elections at the helm. In 2005, with an electoral map which, like this year’s was largely unfavourable to Labour, Tony Blair’s party only lost 114 councillors, in contrast to the losses of 464 councillors (2004), 831 councillors (2003) and 334 councillors (2002). This holds true all the way back to 1979, the earliest meaningful comparison point thanks to changes to local authorities’ sizes and electorates, where Labour (the governing party) gained council seats after years of losing them.

So here’s the question: what happens when local elections are held in the same year but not the same day as local elections? Do people treat them as an opportunity to kick the government? Or do they vote “down-ticket” as they do when they’re held on the same day?

Before looking at the figures, I expected that they would be inclined to give them a miss. But actually, only the whole, these tend to be higher turnout affairs. In 1983 and 1987, although a general election had not been yet called, speculation that Margaret Thatcher would do so soon was high. In 1987, Labour prepared advertisements and a slogan for a May election. In both contests, voters behaved much more like a general election, not a local election.

The pattern – much to my surprise – holds for 1992, too, when the Conservatives went to the country in April 1992, a month before local elections. The Conservatives gained 303 seats in May 1992.

What does this mean for the coming elections? Well, basically, a good rule of thumb for predicting general elections is to look at local election results, and assume that the government will do a bit better and the opposition parties will do significantly worse.

(To give you an idea: two years into the last parliament, Labour’s projected national vote share after the local elections was 38 per cent. They got 31 per cent. In 1985, Labour’s projected national vote share based on the local elections was 39 per cent, they got 30 per cent. In 2007, the Conservatives projected share of the vote was 40 per cent – they got 36 per cent, a smaller fall, but probably because by 2010 Gordon Brown was more unpopular even than Tony Blair had been by 2007.)

In this instance, however, the evidence suggests that the Tories will do only slightly better and Labour and the Liberal Democrats only slightly worse in June than their local election performances in May. Adjust your sense of what “a good night” for the various parties is accordingly.