The overhaul of the federal tax law in 2017 was the signature legislative achievement of Donald J. Trump’s presidency.

The biggest change to the tax code in three decades, the law slashed taxes for big companies, part of an effort to coax them to invest more in the United States and to discourage them from stashing profits in overseas tax havens.

Corporate executives, major investors and the wealthiest Americans hailed the tax cuts as a once-in-a-generation boon not only to their own fortunes but also to the United States economy.

But big companies wanted more — and, not long after the bill became law in December 2017, the Trump administration began transforming the tax package into a greater windfall for the world’s largest corporations and their shareholders. The tax bills of many big companies have ended up even smaller than what was anticipated when the president signed the bill.