The deal will include Yahoo's core internet operations like advertising, content, and mobile capabilities but will will leave its shares in the Chinese retail company Alibaba and Yahoo Japan untouched.

Marissa Mayer became the CEO of Yahoo in 2012 in an effort to restore the company as a front-runner on the web. At the time, the company had been through four CEOs in a span of five years, and its stock was plummeting.

Eventually, Yahoo will change its name and become a publicly traded investment company.

The sale follows Verizon's purchase of AOL in 2015 for around $4.4 billion and marks the end of Yahoo's nearly 22-year run as an independent company.