Apple CEO Tim Cook participates in an American Workforce Policy Advisory Board meeting with U.S. President Donald Trump and others in the White House in Washington, March 6, 2019.

Apple probably paid Qualcomm between $5 billion and $6 billion to settle the litigation between the two companies, UBS analyst Timothy Arcuri estimated in a note distributed on Thursday.

Apple probably also agreed to pay between $8 and $9 in patent royalties per iPhone, estimated UBS, based on Qualcomm's guidance that it expects earnings per share to increase by $2 as a result of the settlement.

The UBS estimate suggests that Apple paid a high price to end a bitter legal battle that spanned multiple continents and threatened Apple's ability to release a 5G iPhone and put pressure on Qualcomm's licensing business model that contributes over half of the company's profit.

Since the settlement, Qualcomm stock is up over 38%. Apple shares are 2% higher.

The companies, which announced the settlement on Tuesday as a trial in one of their many legal disputes got underway, said that the settlement included a one-time payment from Apple to Qualcomm as well as a chipset supply agreement that suggested that future iPhones would use Qualcomm modem chips.

Arcuri wrote that the one-time payment was likely for royalty payments that Apple had stopped paying when the two companies were embroiled in litigation, and that is how it was calculated.

The settlement is "a solid outcome for Qualcomm and certainly better than the [roughly] $5 [royalty payment] assumption we had been making," Arcuri wrote.

If Apple does pay between $8 and $9 in royalties per iPhone it would be a significant increase over the $7.50 in royalties that it previously paid Qualcomm per phone, according to Apple COO Jeff Williams' testimony in an FTC trial.

Apple and Qualcomm didn't reply to a request for comment. When CNBC asked Qualcomm CEO Steve Mollenkopf how much Apple pays it per phone on Wednesday as well as the size of the one-time payment, he declined to answer.

"Well, a deal like this, there's a lot of value back and forth, and it's just best to keep it confidential," he said.

