NEW YORK (CNNMoney) -- If everything in its stores costs a buck, it will take 8.5 billion items sold for Dollar Tree stores to buy rival Family Dollar.
Dollar Tree is buying its larger rival for $74.50 a share in cash and stock, 23% more than Family Dollar's closing price on Friday, for a total value of $8.5 billion.
Dollar Tree has 5,080 stores and annual revenue of $7.8 billion in its most recent fiscal year. Family Dollar has 8,200 stores and annual revenue of $10.4 billion.
The combined companies could overtake the leader in the dollar-store sector, Dollar General, which has more than 11,000 stores and revenue of $17.5 billion.
A big winner in the deal is activist investor Carl Icahn, who holds 9.4% of Family Dollar shares, according to sales tracker LionShares. Icahn acquired most of the shares in the past year.
Shares of the company shot up in June when Icahn disclosed his stake, but have given back most of the gains since. The stock is down nearly 6% for the year through Friday's close.
Shares of Family Dollar soared on the news in premarket trading.