In the past several years, Apple’s leaders have been touting the benefits—and wisdom—of its gigantic stock repurchase campaign. That wisdom, given that Apple’s shares have tumbled 20% in the past six months, is looking pretty misguided. On Tuesday, Alphabet overtook Apple as the world’s most valuable company.

For the past nine quarters, from September 30, 2013 to year-end 2015 (its fiscal 2016 first quarter), Apple bought back 760 million shares, lowering the count from 6.3 billion to 5.54 billion, a reduction of 12.1%. The program cost a total of $87.2 billion. Over those two-plus years, Apple paid an average of $115 for each share it retired.

Today, however, Apple aapl is trading at around $95. So management paid a 21% premium over the value investors are now according its stock. If Apple were purchasing its shares at current prices, it could buy back 918 million shares, or about one-fifth more. Put another way, Apple’s share buyback, as it turned out, because of what now looks like poor timing, cost it $15 billion more than it had to.

The heavy buying in early 2015, when Apple shares hovered around their all-time record, is especially striking. From January to June of last year, Apple lavished $11 billion on buybacks at $127 on average, 34% over to its current price of $95.

Even now, it’s not clear Apple is the great buy it was supposed to be last year. “Who knows where it stock is going to go? It’s an unanswerable question with all buybacks,” says Jack Ciesielski, author of the Analysts’ Accounting Observer. “Another problem is that buybacks send a message of fatigue, that management doesn’t have any good ideas for using the cash, other than giving it back to shareholders.”

The supposed advantages of buybacks are basic: They return money to investors, tax-free. When a company buys its own stock, it reduces the overall number of shares outstanding. That raises earnings-per-share, and all other things being equal, the stock price, making shareholders richer. Put simply, the folks who own Apple get a bigger share of the Apple pie, courtesy of the constantly shrinking count of shares outstanding.

But buybacks fail to enrich investors if management overpays for their shares. Over the past two years, companies have been plowing a record portion of their cash flows into repurchases, only to see their stocks keep swooning. So they’re failing on two levels. First, the repurchases aren’t raising the share price as intended. Second, their timing was terrible. Judging from the frothy prices when they bought, it’s more likely that their shares were a sell, not a bargain.

Despite the recent results, Apple still appears to be a big fan of buybacks. In its filing for its first fiscal quarter of 2016, the iPhone maker disclosed that $30 billion remains earmarked for repurchasing its shares. If Apple was a buy at $128, it’s got to be a no-brainer at $95, right? Once again, that’s unknowable. The buyback craze proves that the market can confound even the most even storied braintrust in corporate America.