Apple lost a whopping nine billion bucks in 2018 by overpaying for its own shares.

A report Thursday by The Wall Street Journal details the extend of Apple’s miscalculation, saying Apple along with other major US companies bought back its own shares after repatriating its cash parked overseas thanks to Trump’s 2017 tax overhaul.

The Tax Cuts and Jobs Act has permitted companies to shift foreign earnings to the US by slashing the corporate tax rate to 21% from 35%. Securities filings prove that the Cupertino tech giant bought back nearly $63 billion worth of shares during the first half of 2018.

But due to Apple’s stock decline and the recent plunge in stock prices, those repurchased shares are currently worth $54 billion, meaning it lost $9 billion to that underperforming investment. In May, Apple’s finance chief Luca Maestri said the company wanted to be “particularly thoughtful and flexible” in its buyback approach.

Howard Silverblatt, senior index analyst at S&P Dow Jones Indices, summed it up nicely, saying: “Apple makes iPhones. Timing the market is not what they do.”

Other companies that repurchased shares at rich prices only to see their value decline sharply include Wells Fargo (-$2.7 billion), Citigroup (-$2.8 billion) and Applied Materials (-$1.8 billion).

Companies usually buy back their own shares when other major sources of growth have been exhausted. By buying back its shares, a company reduces share counts which in turn artificially boosts the earnings per share reported to investors.

As an example, Apple’s buybacks in 2018 have reduced its shares outstanding by about 6.7%, raising its earnings per share as its profits are spread across fewer shares.