I am not a lawyer or CPA and this is not legal advice. It is for general guidance only. You should work with an attorney and a CPA for specific professional advice.
If youโre American, this gets really sticky. The US taxes you on your worldwide income. If you have a US corporation, it is also taxed on worldwide income, so it can be double taxed. And foreign corporations in the US are taxed on US-sourced income.
However, there is a loophole. If you own a company outside the US, and the company earns money outside of the US, itโs only taxed in the US when the money comes back into the US. So, many people have companies registered abroad (Hong Kong is a popular jurisdiction) and money earned offshore is accrued in the foreign corporation. Expenses abroad are also paid by the foreign corporation. So, you can effectively avoid the money being double taxed (paying personal income tax only) if you earn money offshore and your offshore corporation pays your salary.
Also, if youโre working abroad, itโs not a vacation. A lot of things you spend money on are legitimately considered business expenses. So, if something is a business expense, pay for it with company earnings that havenโt been taxed.
Now, what about paying income tax in the jurisdiction where you were living abroad? Typically, countries only tax income sourced within the country, and many countries have tax treaties where income is only taxed once. So, for example, if youโre living in China, a country that has a tax treaty with the US, and youโre paid by a company outside of China, and you pay taxes in the US, you donโt actually have to pay taxes in China. Technically you are supposed to file there (at least in Beijing), but this isnโt actually enforced unless youโre on a Z-type visa and you are working for a Chinese company. And, if youโre on a tourist visa pretty much anywhere in the world, you wonโt owe any tax in the country you were visiting. As best I know, no country in the world charges tourists income tax!
One thing that WILL happen if youโre living abroad, and have foreign bank accounts: You will get audited if you claim tax exemptions that apply when you live outside the US. In my case, this came in the form of a letter to my Chinese address which basically said โprove youโre really living in China,โ and gave me a list of documents to supply as evidence of same. There was a list of 8 or so things, of which I had to supply 3. I just sent the IRS everything on the list (not only 3 of the things, but all of the things), mailed the package from Beijing, and I never heard from them again. I think they just wanted to make sure I really was living abroad.