Flickr/Mike Mozart

Nutrisystem Inc. (NTRI) has agreed to be acquired by Tivity Health Inc. (TVTY)  for about $1.4 billion. 

News of the deal on Monday bloated shares of Nutrisystem, which closed up nearly 28% to $43.68, while Tivity slimmed down by nearly 32% to end the day at $27.65.

The deal is in both cash and stock. Nutrisystem shareholders will receive $38.75 in cash and 21 cents a share of Tivity for every Nutrisystem share they own. Tivity shareholders will own about 87% of the combined entity. 

The revenue from both companies if combined would have been been roughly $1.3 billion for a full year ended Sept. 30.

Both companies aim to help customers manage their health and diets. Nutrisystem, which sells a meal-kit plan, frequently advertises on ESPN. 

Nutrisystem shares have declined about 14% year to date. Tivity Health's shares had beaten the broader market this year, rising 11.11% from January 1 to Monday morning.

More from Markets

Trading in the Age of Computer Algorithms

Trading in the Age of Computer Algorithms

What the Government Shutdown Means for Retail

What the Government Shutdown Means for Retail

VW CEO: 'You Have to Compete, But You Also Need to be Smart'

VW CEO: 'You Have to Compete, But You Also Need to be Smart'

Progress Software's Shares Dive on Forecast of Weaker Revenue

Progress Software's Shares Dive on Forecast of Weaker Revenue

Keebler, Famous Amos' Sale Draws Hungry Bidders

Keebler, Famous Amos' Sale Draws Hungry Bidders