Non-residents may have to file if they engaged in business in the United States during the tax year or otherwise earned income from U.S. sources throughout the year. Generally, people who are not U.S. citizens are considered nonresident aliens if they fail to meet either the green card test or the substantial presence test for the tax year in question.
If you are a foreign national who moved to the U.S. in the middle of the year, you may be surprised at the complexity of your first US filing.
You are required to file a dual-status return when you have been both a U.S. resident and a nonresident in the same year. In determining your U.S. income tax liability for a dual-status tax year, different rules apply for the part of the year you were a resident of the U.S. and the part of the year you were a nonresident.
Based on your visa, marital status, and your time in the U.S., you can make elections to either be treated as a full-year resident or Non-resident too. These options present choices that should be reviewed so you can make the best decision for your situation.