There's a funny thing about the estimated $1.7 trillion that American companies say they have indefinitely invested overseas: A lot of it is actually sitting right here at home.

Some companies, including Internet giant Google Inc.,  software maker Microsoft Corp. and data-storage specialist EMC Corp., keep more than three-quarters of the cash owned by their foreign subsidiaries at U.S. banks, held in U.S. dollars or parked in U.S. government and corporate securities, according to people familiar with the companies' cash positions.

In the eyes of the law, the Internal Revenue Service and company executives, however, this money is overseas. As long as it doesn't flow back to the U.S. parent company, the U.S. doesn't tax it. And as long as it sits in U.S. bank accounts or in U.S. Treasurys, it is safer than if it were plowed into potentially risky foreign investments.