You can take one exemption for yourself unless you can be claimed as a dependent by another taxpayer. If another taxpayer is entitled to claim you as a dependent, you cannot take an exemption for yourself even if the other taxpayer does not actually claim you as a dependent.
Your Spouse's Exemption:Your spouse is never considered your dependent.
Joint return - On a joint return, you can claim one exemption for yourself and one for your spouse.
Separate return - If you file a separate return, you can claim the exemption for your spouse only if your spouse had no gross income, is not filing a return, and was not the dependent of another taxpayer. This is true even if the other taxpayer does not actually claim your spouse as a dependent. This is also true if your spouse is a nonresident alien.
Head of household - If you qualify for head of household filing status because you are considered unmarried, you can claim an exemption for your spouse if the conditions described in the preceding paragraph are satisfied. To claim the exemption for your spouse, check the box on line 6b of Form 1040 or Form 1040A and enter the name of your spouse in the space to the right of the box. Enter the SSN or ITIN of your spouse in the space provided at the top of Form 1040 or Form 1040A.
Death of spouse - If your spouse died during the year, you generally can claim your spouse's exemption under the rules just explained in Joint return. If you file a separate return for the year, you may be able to claim your spouse's exemption under the rules described in Separate Return instructions.
If you remarried during the year, you cannot take an exemption for your deceased spouse.
If you are a surviving spouse without gross income and you remarry in the year your spouse died, you can be claimed as an exemption on both the final separate return of your deceased spouse and the separate return of your new spouse for that year. If you file a joint return with your new spouse, you can be claimed as an exemption only on that return.
Divorced or separated spouse - If you obtained a final decree of divorce or separate maintenance by the end of the year, you cannot take your former spouse's exemption. This rule applies even if you provided all of your former spouse's support.
For more information, see Form 1040 Instructions