SAN FRANCISCO — Activist investor Dan Loeb is leaving Yahoo's board with a windfall after a 15-month stint that vindicated his crusade to shake up the long-slumping company under new leadership.

Yahoo Inc. is spending $1.16 billion to buy back 40 million of the shares that Loeb's hedge fund, Third Point LLC, began buying in 2011 around the same time Yahoo was ushering out Carol Bartz as its CEO.