Your spouse’s residency status will determine how you can claim them as an exemption. Your spouse can either be a resident alien or a non-resident alien. Here are two ways to tell if your spouse qualifies as a non-resident alien.
Your spouse has a green card which gives them government clearance to live and work in the United States on a permanent basis. This is referred to as the green card test by the IRS.
Your spouse spent at least 31 days in the year in the United States and at least 183 days for the previous three years. This is referred to as the substantial presence test by the IRS.
If your spouse doesn’t meet these criteria then they are considered a non-resident alien.
You have two options if your spouse is a non-resident alien.
You can treat your spouse as a resident alien on your taxes. If you decide to do this you can file a joint tax return with your spouse. You will get an exemption for your spouse but any income earned, anywhere in the world will be taxed by the United States.
You can also treat your spouse as a non-resident alien on your taxes. Doing this will not allow you to file a joint tax return and you must file married filing separately. There is still a possibility you can claim your spouse as a dependent on your return if they have no income in the United States and they cannot be claimed as a dependent by someone else.