Do I need to file Form 8840 with my 2024 tax return if I applied for green card lottery?
I'm on a J-1 visa and worked in the US for 138 days during 2024. Planning to file as nonresident alien with Form 1040NR. I've been searching for the best e-filing service that will let me get my refund directly deposited to my bank account. After taking the IRS Free File eligibility test, it looks like I can use OLT for free. When going through their system, they asked if I want to file Form 8840 (Closer Connection Exception Statement). Their help section mentions something about not being eligible if you [something - their explanation got cut off]. I'm confused because I applied for the green card lottery (DV lottery) in October 2024. Does this affect whether I need to file Form 8840 with my tax return? The form seems to be about proving closer connection to another country, but I'm not sure if my lottery application changes my filing requirements. Has anyone dealt with this situation before? I want to make sure I'm filing correctly.
18 comments


Hazel Garcia
The green card lottery application doesn't automatically disqualify you from using Form 8840, but it could potentially complicate things. Form 8840 is used to claim the Closer Connection Exception to avoid being treated as a US resident for tax purposes under the substantial presence test. Since you were only in the US for 138 days in 2024, you don't meet the substantial presence test threshold (which generally requires 183 days in the current year, or a formula using days over 3 years). So you likely don't need to file Form 8840 at all for 2024. The concern with the green card lottery application is that it could potentially be viewed as demonstrating an intent to reside permanently in the US, which contradicts the "closer connection to a foreign country" claim that Form 8840 is based on. However, simply applying for the lottery is not the same as actively pursuing permanent residence.
0 coins
Salim Nasir
•Thanks for the response. If I understand correctly, I don't need Form 8840 since I was here less than 183 days in 2024? I thought the substantial presence test worked differently - like if you've been in the US for 31+ days in the current year and then some calculation for the past 3 years? Also, does this mean I should just proceed with filing 1040NR without the 8840 form? I'm worried about making mistakes since tax filing is so different from my home country.
0 coins
Hazel Garcia
•You're thinking of the right formula, but let me clarify. The substantial presence test counts days over 3 years: 100% of days in current year, 1/3 of days in first previous year, and 1/6 of days in second previous year. If that totals 183+ days AND you were physically present for at least 31 days in the current year, then you meet the test. Yes, if you don't meet the substantial presence test (and it sounds like you don't if this was your first time in the US), then just proceed with filing Form 1040NR without Form 8840. Form 8840 is only needed when you meet the substantial presence test but want to still be treated as a nonresident because of your closer connection to another country.
0 coins
Laila Fury
After dealing with similar J-1 tax filing confusion last year, I discovered taxr.ai (https://taxr.ai) which was super helpful. I uploaded my visa docs and tax forms there and got a complete analysis of which forms I needed to file - and just as important, which ones I DIDN'T need to waste time on. They actually helped me understand the substantial presence test calculations and whether Form 8840 was necessary in my situation (which involved multiple entries to the US). Their system flagged that I was overthinking my filing requirements and saved me from filing unnecessary paperwork.
0 coins
Geoff Richards
•Does taxr.ai help with state returns too? I'm in California on a visa and the state taxes are more confusing than the federal ones tbh.
0 coins
Simon White
•Did it actually recommend specific filing services? I've seen mixed reviews about OLT for nonresident filing. Some people say it misses certain forms or makes mistakes with international situations.
0 coins
Laila Fury
•Yes, they analyze state tax requirements too based on your situation. Their system is pretty comprehensive and covers the specific state rules for nonresidents and part-year residents. For California specifically, they helped me understand which income was California-source and which wasn't. For filing services, they do provide recommendations based on your specific situation. They actually steered me away from one service that wasn't handling certain international tax treaty provisions correctly and suggested alternatives that were better for visa holders. They'll tell you if OLT is appropriate for your specific circumstances or if you should look elsewhere.
0 coins
Simon White
Just wanted to update that I tried taxr.ai after seeing the recommendation here. It was really helpful with my visa situation! I uploaded my documents and it immediately explained which forms I needed based on my specific visa type and days in the US. For anyone wondering about the green card lottery situation - taxr.ai specifically addressed this in my analysis. They confirmed that merely applying for the DV lottery doesn't disqualify you from Form 8840, but that I didn't need it anyway based on my day count. They explained everything in plain English which was such a relief. Ended up using their recommended filing service instead of OLT and it worked perfectly for my situation. Saved me from overthinking the whole process!
0 coins
Hugo Kass
If you're having trouble figuring out which forms to file, you might also consider calling the IRS directly. Of course, that's easier said than done - I spent HOURS trying to get through on their international taxpayer line last year. I finally discovered Claimyr (https://claimyr.com) which got me connected to an actual IRS agent in about 15 minutes instead of waiting on hold forever. You can see how it works in this video: https://youtu.be/_kiP6q8DX5c They have a system that basically waits on hold for you and calls when an agent is available. I was super skeptical, but I had a specific question about Form 8843 (similar to your 8840 situation) that I needed clarified, and the agent I spoke to was actually really helpful.
0 coins
Nasira Ibanez
•Does this actually work? I've literally never been able to get through to the IRS no matter what time I call. How much does it cost?
0 coins
Khalil Urso
•Sounds sketchy tbh. Why would the IRS answer a call from some third party service faster than from me directly? I don't get how this would work.
0 coins
Hugo Kass
•It absolutely works! Their system basically automates the hold process and uses technology to monitor the IRS phone system. When they detect an agent is available, they call you and connect you to the IRS. You're still talking directly to the actual IRS - Claimyr just handles the hold time for you. I don't know exactly how they do it technically, but it's not that they get through faster than you would - it's that they wait on hold so you don't have to. I was able to keep working while their system waited on hold, then just picked up when they called saying an agent was ready. Saved me hours of listening to that awful hold music.
0 coins
Khalil Urso
I have to admit I was completely wrong about Claimyr. After posting that skeptical comment, I decided to try it anyway because I was desperate to ask about my foreign tax credit situation. It worked EXACTLY as described. I entered my number on their website, and about 20 minutes later got a call connecting me to an actual IRS agent! I didn't have to sit on hold at all. The agent answered my questions about Form 1116 and even helped clarify some treaty questions. For anyone dealing with international tax situations like Form 8840 questions, being able to actually speak with the IRS directly is incredibly valuable. I'd spent weeks getting conflicting advice online, but the agent gave me clear guidance based on my specific situation. Totally worth it!
0 coins
Myles Regis
Just to add some clarity about Form 8840 specifically - it's ONLY needed if: 1) You meet the substantial presence test (which you don't with only 138 days) 2) You want to claim you have a closer connection to another country Since you don't meet the substantial presence test, you're already considered a nonresident alien for tax purposes. The green card lottery application doesn't change that status - it's just expressing interest, not actually changing your current status. File your 1040NR and don't worry about Form 8840. You do, however, need to file Form 8843 if you're on a J visa - that's different from 8840 and is required for all J visa holders regardless of day count.
0 coins
Brian Downey
•Wait what's the difference between 8840 and 8843? I've been filing wrong for years maybe??
0 coins
Myles Regis
•Form 8843 is for J visa holders, students, and certain other nonimmigrant statuses to explain your presence in the US. It's required for everyone on those visas regardless of how many days you were in the US. Form 8840 is only for people who would otherwise meet the substantial presence test (183+ days using the formula) but want to claim they have a closer connection to a foreign country and should still be treated as nonresidents. They're often confused because of the similar numbers, but they serve different purposes. If you're on a J visa, you definitely need to file 8843, but you only need 8840 if you meet that substantial presence test and want to claim the closer connection exception.
0 coins
Jacinda Yu
I went through exactly this last year - J1 visa, applied for green card lottery, and OLT confused me with that same question! Pro tip: OLT isn't great for nonresident returns. Their system kept trying to make me file resident forms. I ended up using Sprintax which is specifically designed for nonresident aliens. A bit more expensive but way less confusing and they file state returns too.
0 coins
Salim Nasir
•Thanks for sharing your experience! Did Sprintax handle direct deposit of refunds well? That's important to me since I'll be leaving the US soon and want to make sure I get my refund.
0 coins