For the part of the year you are a resident alien, you are taxed on income from all sources. Income from sources outside the United States is taxable if you receive it while you are a resident alien. The income is taxable even if you earned it while you were a nonresident alien or if you became a nonresident alien after receiving it and before the end of the year.
For the part of the year you are a nonresident alien, you are taxed on income from U.S. sources and on certain foreign source income treated as effectively connected with a U.S. trade or business. (The rules for treating foreign source income as effectively connected are discussed in chapter 4 under Foreign Income.)
Income from sources outside the United States that is not effectively connected with a trade or business in the United States is not taxable if you receive it while you are a nonresident alien. The income is not taxable even if you earned it while you were a resident alien or if you became a resident alien or a U.S. citizen after receiving it and before the end of the year.
Income from U.S. sources is taxable whether you receive it while a nonresident alien or a resident alien unless specifically exempt under the Internal Revenue Code or a tax treaty provision. Generally, tax treaty provisions apply only to the part of the year you were a nonresident. In certain cases, however, treaty provisions may apply while you were a resident alien. See chapter 9
for more information.
When determining what income is taxed in the United States, you must consider exemptions under U.S. tax law as well as the reduced tax rates and exemptions provided by tax treaties between the United States and certain foreign countries. For a further discussion of tax treaties, see chapter 9