Getting to the bottom line of the royalty settlement reached on Tuesday between Nokia (NOK) and Apple (AAPL)  is difficult because the companies did not disclose terms. The unexpected agreement likely will benefit both parties, however, and could affect Apple's running dispute with Qualcomm (QCOM) .

Nokia gained 5% to $6.53 on Tuesday on news of the deal. Apple was essentially flat at $153.85.

Apple has battled with Nokia and Qualcomm about the royalties it pays for technology in its devices. Decisions in some of the IP disputes with Nokia would not have come until the later this year, and others would have taken longer.

"The timing is surprising as resolution from the cases was unlikely until [the fourth quarter] at the earliest," Wells Fargo analyst Maynard Um wrote in a Tuesday note.

The Finish networking technology company receives an initial cash payment from Apple and more payments over the life of the agreement.

Nokia benefits in other ways, though. Apple will also buy network gear from Nokia, and stock Nokia's digital health products in the Apple Store. Nokia gained a portfolio of activity trackers, baby monitors and other products with the $190 million purchase of Withings last year.

Nokia previously collected 0.2% of the price of a given Apple device that used its technology, Um wrote, less than Qualcomm's 2.7% rate.

If Nokia preserves its royalty rate, benefits in the third quarter from lower litigation costs and adds to its capital return program, earnings would increase by €0.02 per share in 2017 and €0.09 per share in 2018, Wells Fargo estimates. For every 10 basis point increase to the royalty rate, Um says, 2018 earnings per share would gain €0.01.

The impact on Apple's earnings is not material, Um suggested.

However, the agreement could help Apple in its patent battle with Qualcomm, Tim Long of BMO Capital Markets suggested in a report.

Qualcomm has accused Apple of being a latecomer to the mobile market that built a valuable brand by exploiting the innovations of others. "Apple's products rely heavily on the cellular inventions of Qualcomm and others," Qualcomm charges in pleadings. 

Coming to terms with Nokia could make Apple seem like a fair partner.

"For Apple, we believe the settlement comes at a critical time, as it demonstrates a willingness to negotiate fair and reasonable terms for wireless [intellectual property rights]," Long wrote, suggesting that Apple would cite the agreement in its defense against Qualcomm.

For Apple shareholders, the launch of the iPhone 8 could overshadow IP disputes. Jim Cramer and the Action Alerts Plus team expects the stock to appreciate as the launch approaches. Get a free trial subscription to Action Alerts PLUS.

Editors' pick: Originally published May 23.

If you liked this article you might like

Stocks Rise Solidly Ahead of Federal Reserve Minutes, Dow Back Above 25,000

Stocks Rise Solidly Ahead of Federal Reserve Minutes, Dow Back Above 25,000

What Will Be Broadcom's Next Move?

What Will Be Broadcom's Next Move?

Dow Drops Over 250 Points to End Six-Session Winning Streak

Dow Drops Over 250 Points to End Six-Session Winning Streak

Qualcomm Lifts Offer for NXP Semiconductors to $44 Billion

Qualcomm Lifts Offer for NXP Semiconductors to $44 Billion

Qatar Airways Takes Deliveries of Airbus' Largest Jet: LIVE MARKETS BLOG

Qatar Airways Takes Deliveries of Airbus' Largest Jet: LIVE MARKETS BLOG