The ongoing effort by Bristol-Myers Squibb Co. (BMS) to become a specialty biopharma firm led to its $2.7 billion split from the joint venture for Type II diabetes with Astrazeneca plc, leaving investors in both firms to sort through details.

Along with the up-front money, Astrazeneca has agreed to provide potential regulatory- and sales-based milestone payments of up to $1.4 billion, plus royalty payments based on net sales through 2025. As much as $225 million more could come if and when certain unspecified assets are transferred.

BMS’ board has approved the transaction. The company expects to collect $3.4 billion in the first quarter of 2014, which includes the $2.7 billion up-front payment and $700 million more, assuming regulatory approvals of Forxiga (dapagliflozin), the SGLT2 inhibitor for Type II diabetes that gained an FDA advisory panel’s 13-1 “yes” vote recently.

The diabetes franchise includes Onglyza (exenatide), Byetta (saxagliptin), Bydureon (exenatide extended-release for injectable suspension) and Forxiga.

High royalty rates on Onglyza and Forxiga in the first few years “doesn’t help the economics for Astrazeneca,” wrote Jefferies analyst Jeffrey Holford in a research report. Specifically, the payouts are 44 percent in 2014, 35 percent in 2015 and 27 percent in 2016.

BMS, which Holford pegged the clear winner in the deal, “has even stated in its press release today that the disposal will actually be accretive to non-GAAP earnings per share in the ‘near term.’”

The joint venture between the pair “clearly was not working out, with disappointing sales of Bydureon in particular,” Holford wrote. “We think this will only worsen as [Indianapolis-based Eli Lilly and Co.] likely launches its once-weekly dulaglutide later in 2014.”

Onglyza has had its problems, too, with an overall slump in the market for dipeptidyl peptidase-IV inhibitors (DPP-IVs) and more competitors entering the space.

Forxiga’s launch could help, though the market size is smaller than for DPP-IVs, and New Brunswick, N.J.-based Johnson & Johnson was first to market with an SGLT2 inhibitor, Invokana (canagliflozin).

The latest news leaves BMS with much riding on its combination of the fully human IgG4 monoclonal antibody nivolumab with the approved melanoma therapy Yervoy (ipilimumab). At next year’s American Society of Clinical Oncology meeting, BMS is expected to offer Phase I data in first-line non-small-cell lung cancer.

Umer Raffat, analyst with ISI Group, conducted a webinar with investors that walked them through the deal. “In terms of [BMS’] confidence in PD-1, clearly [this transaction] reiterates that,” he said, adding that the firm is “doubling down” on PD-1.

“The deal is interesting,” Raffat said. “It clearly evens up the [profit and loss] for BMS. They got a good price for it, actually. We think the market potential value of this business may not be much more than $8 billion to 10 billion, but that depends on what sales assumptions you make and all that. If BMS could hedge it all off and just get $5.5 billion in cash – and if the sales go above and beyond what we thought, they get additional milestones – it’s a fantastic deal they were able to get, on a cash basis.”

Numbers disclosed by BMS and Astrazeneca, along with those in SEC filings, show the diabetes franchise was performing less than ideally.

“They’re doing $1.7 billion in sales right now, and still running at a loss,” Raffat said. “It seems like collaborations have been really messy, especially in diabetes.”

In Astrazeneca’s press release, he noted, “they actually go out and just say they had a pre-tax loss of $400 million in 2012.” Since the venture was evenly split, “both sides were burning $300 million to $400 million in cash,” he said.

Another clue lay in selling, general and administrative expenses (SG&A). About 4,100 sales reps from BMS will be transferred to Astrazeneca, which Raffat estimated as worth about $650 million. Probably BMS is spending another $50 million on marketing, he reckoned, and a 10-K filing revealed that BMS paid about $140 million more in Astrazeneca for reimbursement, since both sides agreed to spend the same amount on commercialization.

Adding the costs brings a total of $800 million to $850 million, so the entire SG&A outlay for the diabetes franchise – since the companies were contributing equally – would be $1.6 billion or more. The companies together may have been spending $400 million or more on research and development, based on trials that are under way and planned.

BMS and Astrazeneca expect to finish the diabetes deal in the first quarter of next year.

BMS’ stock (NYSE:BMY) closed Thursday at $53.84, up $1.84. Astrazeneca’s shares (NYSE:AZN) ended the day at $58.90, up 6 cents.