At a little past 9:30 p.m. Tuesday, the head of a little-known data analytics team working for Donald Trump in San Antonio sent a flurry of messages to the campaign’s New York war room: Florida had tipped and the models were predicting a more than 50% chance he would win the presidency.

Until then, the number-crunching and analytics for Mr. Trump felt more like a “data experiment,” said Matthew Oczkowski, head of product at Cambridge Analytica, who led the team for nearly six months.

“I still don’t know if it’s hit me yet,” he said in an interview Wednesday, after about four hours of sleep. “Sometimes the more data you have, the more confused you feel.”

The election upset is seen as a coup for Cambridge Analytica, the U.S. arm of a British behavioral research and strategic communications company called SCL Group Ltd. The company also assisted the Leave.EU group in the U.K. ahead of the surprising Brexit vote to exit from the European Union and did work for the failed presidential campaign of Sen. Ted Cruz of Texas.

Cambridge Analytica is funded in part by Robert Mercer, a computer scientist and co-chief executive of secretive quantitative hedge fund Renaissance Technologies. Mr. Mercer was a pivotal supporter of Mr. Trump, donating millions to the campaign. A separate data team from Cambridge Analytica also assisted a super PAC pushing for Trump’s election, Make America Number 1.