Apple announced on Wednesday that it would pay $38 billion in taxes to the federal government as it brings cash earned overseas into the United States. The big payment is the result of President Donald Trump's tax cut bill, passed last month, which created a new, special tax rate for overseas cash.

Apple is likely to be the biggest beneficiary of that provision. The American company had around $250 billion in cash and other short-term assets held by overseas affiliates. Under previous tax law, Apple would have had to pay a tax of 35 percent in order to bring overseas cash back to the United States. Under the new law, that rate is cut to 15.5 percent, saving Apple tens of billions of dollars compared to what it would have paid to bring the cash home in 2017.

Apple didn't have a choice about this. Under the new tax bill, all overseas cash is subject to a one-time 15.5 percent tax whether Apple leaves it overseas or moves it to the United States.

Apple says it expects to invest $30 billion in the United States over the next five years, though the company didn't say how much of that represented an increase over previous investment plans. $10 billion of that will be in data centers in the US.

Apple says it plans to add 20,000 American jobs in addition to the 84,000 people it already employs in the United States. The company is also expanding its advanced manufacturing fund, which supports US manufacturing activities, from $1 billion to $5 billion.

Update: I updated the story to make it clear that Apple's overseas cash is subject to tax whether or not Apple brings it to the United States.