GlaxoSmithKline and Pfizer plan to merge their consumer-health divisions in a joint venture with a product portfolio that would include an array of popular pain relievers, toothpastes, cold treatments, vitamins and dietary supplements.

GlaxoSmithKline, which is based on Britain, will own 68 percent of the new entity; Pfizer, which has its headquarters in New York, will own the balance, according to a news release announcing the venture on Wednesday.

The companies said they expected the deal to close in the second half of next year, and that plans call for the new business to be spun off within five years via a listing on the British stock markets.

The divisions being merged had combined global sales of $12.7 billion in 2017.

GlaxoSmithKline’s shares rose 7.4 percent in early trading in London after the deal was announced. The company’s stock was up 10.6 percent for the year before Wednesday. Shares in Pfizer, which trade in the United States, were up 14.8 percent.

GlaxoSmithKline’s over-the-counter products include Aquafresh, Flonase, Nicorette, Polident, Sensodyne and Tums. Pfizer’s portfolio includes Advil, Caltrate, Centrum, ChapStick, Emergen-C and Robitussin.

By moving to shed the consumer health divisions, the drugmaking giants can focus their efforts on chasing potentially greater profits via their prescription-drug units.

But such concentration comes with risks, given that prescription drugs are costly to develop and are subject to boom-and-bust cycles in which consumer products can provide some insulation.