The bigger the gaffe, the better Donald Trump’s odds of winning the White House have become during the raucous GOP primary season, according to bookmakers in the UK, where gambling on politics is legal.

Top UK bookmaker Ladbrokes and other bookies — who calculate odds based on the amount of money people wager on sporting events or a political race — analyzed Trump’s chances before and after what for a normal politician in a normal year could have been fatal foul-ups.

And they concluded that bettors had it all over political pundits when it came to predicting Trump’s rise.

“Anyone making a bet obviously has skin in in the game. Take millions of people all waging real cash on a prediction and you have a pretty strong ‘wisdom of the crowd,’ ” said Alex Donohue, a rep for top British bookmaker Ladbrokes.

“I’ll start with this point: Anyone who said Trump had slim or no chance these past months, I’m very confident in saying we are more accurate than that.”

Famed handicapper Danny Sheridan added that bookies themselves saw Trump’s ascendancy long before TV news talking heads realized the Manhattan mogul was for real.

“Oddsmakers are much smarter than TV chatter pundits, as it’s in their self-interest to be — unlike the TV and print pundits. Oddsmakers have to be right or they’re out of business,” he said.

Trump started out as a 100-to-1 shot days after referring to Mexicans as criminals and rapists on June 16, according to data from Ladbrokes and Bettingexpert.com.

By the time he mocked John McCain’s POW status and heroism on July 18, he was down to 50 to 1.

Then, after insulting Megyn Kelly during the Aug. 6 GOP debate, he improved to 20 to 1.

By Dec. 7, when he called for a ban on Muslim immigration, the odds were 6 to 1 — and he’s currently at 2 to 1.

Larry Sabato, a political science professor at the University of Virginia, said Trump benefits from all the attention — and that his voters don’t care when he spouts off.

“Trump has gained after gaffes because, even with a controversy, he has seized center stage,” he told The Post.

“All of the supposed gaffes made by Trump jacked up the amount of news coverage Trump got and perhaps that led to more people betting on him and the odds getting shorter,” agreed Seton Hall University political science prof Matt Hale.

And the British bookies say they expect more action on the US presidential race than on the country’s upcoming vote to leave the EU.

Donohue predicted about $150 million will be bet on the White House campaign on legal websites.

“This race will be the biggest political betting event, globally, of all time. Interest here in the UK has been off the charts,” Donohue said.

“And despite the EU referendum outcome being vastly more significant to daily lives of your average British punter (gambler), there are millions more being wagered on your White House race.”

And then there’s the millions, perhaps billions, being wagered in back rooms and barrooms that’ll never be counted.

“I guarantee you there are lines being put out every day in the Garment District and Wall Street,” Sheridan said, “with a frightening amount of money — I’m talking about enough to finance revolutions in small South American countries — being bet on the presidential race.”

If he ultimately wins the White House, Trump will go down in history, mentioned in the same breath as Buster Douglas, the 2004 Boston Red Sox and the 1980 US Olympic hockey team — the longest of long shots who somehow won it all.

The Sox were 100-to-1 underdogs to win the World Series after falling down 3-0 to the Yankees in the American League Championship Series — but came back to win it all.

The “Miracle on Ice” hockey team that beat the powerful Russian squad to capture the gold were 500-to-1 underdogs, while the unheralded Douglas beat Tyson in 1990 despite being a 42-to-1 underdog.

Sheridan said he believes Trump will be an even-money pick later this summer, especially if he makes a popular VP pick.

“Right now, I’d bet the hell out of Trump — for value reasons alone,” Sheridan said.

“Our biggest handle for any future (sports bet) is the Super Bowl. If we were able to take bets on the presidential election, we’d easily surpass that,” said Jay Kornegay, head oddsmaker at the Westgate Las Vegas.

“I believe sometime down the line, we have a good chance of taking wagers on the presidential election.”