There are treaties with some countries, but most of  these treaties have &quot;reverse loopholes.&quot; E.g., on any freelance income, a 15.5% Social Security tax from the first dollar, with no exemptions. Also, you pay the higher of both countries taxes for each kind of income. E.g., if the US has lower taxes than the other country in general, but higher taxes on  cap gains , you pay the US the delta on the cap gains.