Came to the US in 2014 with F-1 visa, currently on OPT under same visa. We were married before 12/31/2017 and I spent 365 days in the US (and in case it matters: have bought a house with my name on the deed). Spouse is US citizen.
Since you are a nonresident alien, you need to attach a statement to your return that you choose to be treated as resident alien for the entire year, otherwise you cannot file jointly. To add the statement, you need to file by regular mail.
Hi bine22, thank you for your answer. Do you have an example of what that statement looks like?
there is no template, here is an excerpt from the IRS website
<a rel="nofollow" target="_blank" href="https://www.irs.gov/individuals/international-taxpayers/nonresident-alien-spouse">https://www.irs.gov/individuals/international-taxpayers/nonresident-alien-spouse</a>
How to Make the Choice
Attach a statement, signed by both spouses, to your joint return for the first tax year for which the choice applies. It should contain the following information:
A declaration that one spouse was a nonresident alien and the other spouse a U.S. citizen or resident alien on the last day of your tax year, and that you choose to be treated as U.S. residents for the entire tax year
The name, address, and identification number of each spouse. (If one spouse died, include the name and address of the person making the choice for the deceased spouse.)