H1B1 substantial presence test first year — do I file 1040NR?

I arrived on an H1B1 visa in late March of this year from Chile and started working for a tech company in April. My employer's payroll system withheld federal taxes as if I were a resident the whole time. Now I'm sitting here with a W-2 and trying to figure out the H1B1 substantial presence test first year situation — do I file 1040NR or regular 1040? I counted my days using the IRS formula (all days this year, 1/3 of last year, 1/6 of the year before), and since every day since my late-March arrival counts in full this year, I'm over the 183-day threshold for substantial presence. I looked at the first-year choice election but I'm not sure I qualify. My only income is wages from the U.S. employer. No investments, no foreign income yet. Do I just file 1040NR and claim the overwithholding as a refund, or is something more complicated going on here?

30 comments

H1B1 is a nonimmigrant visa status, so the substantial presence test is what determines your residency for tax purposes — you don't get automatic resident alien treatment the way a green card holder does. If you don't meet substantial presence and you don't make the first-year choice election, you file 1040-NR. The refund from overwithholding comes back to you on that return.

Diego F.

Author

That tracks with what I read. But my count comes out well over the threshold, because every day since my late-March arrival counts in full this year. So I meet substantial presence, and a plain 1040-NR isn't right for me.

I was in almost the same position two years ago, also arrived mid-year on a nonimmigrant visa and had to work through the substantial presence count carefully. I uploaded my entry and exit records and the visa paperwork to taxr.ai and it read through each document, flagged the exact day counts, and drafted a summary showing which days were exempt or countable. Worth doing before you finalize anything. On the 1040-NR itself, your wages go on line 1a and the withholding credit appears on line 25d — double-check that against your W-2 box 2.

Diego F.

Author

Good to know about those specific lines. My W-2 box 2 shows a decent amount withheld so I want to make sure that credit lands correctly on the return.

One detail people get wrong: the substantial presence test counts only the days you were actually in the U.S. in the relevant years — but certain visa categories have exempt days that don't count toward the threshold at all. H1B1 is not an exempt visa category the way F or J visas are, so all your U.S. days count. That changes the math if you were comparing yourself to colleagues on student visas.

Correct. F and J visa holders have exempt periods; H and H1B1 do not. The IRS pages on resident and nonresident aliens spell this out.

My first year on an H visa I nearly filed a 1040 by mistake because my employer's HR told me I was a resident for payroll. That's a payroll concept, not a tax filing concept. The two don't have to match. I filed 1040-NR, attached a statement explaining the overwithholding, and got the refund. Took about four months but it came.

Diego F.

Author

This is exactly the reassurance I needed. My HR said the same thing and I was confused why the form choices seemed different from what payroll assumed.

I had a complicated version of this where I traveled in and out a lot during the year and wasn't sure which trips broke my day count. I pasted my passport stamp records and my I-94 history into Taxr and it laid out each entry and exit, calculated the weighted day totals for all three years, and showed me I was well under the threshold. Made it easy to decide: 1040-NR, no first-year election needed. The first-year choice election has specific requirements anyway — you need to meet substantial presence in the following year and have been present for a minimum uninterrupted period in the current year. Check the instructions for Form 1040-NR and Publication 519 on those conditions.

Diego F.

Author

The uninterrupted presence requirement is new info for me. I'll check Publication 519 on that before ruling the election out entirely.

Worth adding: the first-year choice is made by attaching a statement to a timely filed return — you can't just check a box. The statement has to include specific information about your presence dates.

If you end up filing 1040-NR and you have a tax treaty between the U.S. and Chile, that could affect your wage income. The U.S.–Chile income tax treaty is relatively recent. Treaty positions on 1040-NR go on Schedule OI and you'd also attach a Form 8833 if you're taking a treaty-based return position. Worth checking whether any provision applies to your wage income.

Form 8833 is required when you're claiming a treaty benefit that overrides a code provision. If the treaty just confirms the same treatment the code gives you, you may not need 8833 — but when in doubt, attach it.

I want to flag something in the original post. You mentioned the first-year choice election but said you're not sure you qualify. The key conditions are: (1) you weren't a resident in the prior year, (2) you're a resident in the year after the year you're electing for (which you can't know yet), and (3) you were present in the U.S. for at least 31 consecutive days in the election year and for at least 75% of the days from the first day of that 31-day period through December 31. If you can't meet condition 3 with an April arrival you might still be fine — do the math on that 75% test.

Diego F.

Author

I arrived in late March actually, so my first full period started around then. Let me run those numbers. But with every day since late March counting in full, I already meet substantial presence this year, so the election isn't available to me — it's only for people who don't.

Filing 1040-NR when you had W-2 income is straightforward in one sense — wages from U.S. sources are always effectively connected income for a nonresident, so they go in the ECI column. What complicates it is state taxes. Your state may have its own residency rules that differ completely from the federal substantial presence test. I'd sort the federal question first, then look at your state separately.

Something I didn't understand until my second year: if you do make the first-year election and you're treated as a resident for part of the year, you file a dual-status return — not a pure 1040 or pure 1040-NR. A dual-status return uses 1040 as the main form for the resident period and attaches a 1040-NR for the nonresident period. The income rules differ between the two periods.

Dual-status returns are genuinely annoying to prepare. If the overwithholding refund is significant and you'd otherwise get it back on a plain 1040-NR, the first-year election isn't always worth the complexity.

Diego F.

Author

This is making me lean toward the dual-status return. Since I meet substantial presence from my late-March arrival, the election doesn't apply and a plain 1040-NR isn't an option. Simpler to know that, and I still get the refund on the overwithholding.

Your situation touches the community topic here because if you had any brokerage account opened before you became employed — even a foreign one — and you received dividends or interest from U.S. sources, those go in the non-ECI column on 1040-NR and are taxed differently than wages. The rate depends on the income type and any treaty. You said no investments, so probably fine, but worth confirming nothing was paying into a U.S. account.

My company also withheld as if I were a full-year resident my first year. When I filed 1040-NR the IRS matched my W-2 to my return without issue — the withholding credit on line 25d covered the overwithholding and the refund processed normally. The matching process works the same regardless of which form you file.

Agreed, the W-2 matching is form-agnostic on the IRS side. The employer reports withholding; you claim the credit; the difference is your refund or balance due.

If your day count is genuinely close to the 183-day threshold rather than clearly under it, consider keeping a travel log with documentation for a few years. The IRS can challenge your residency determination, and your I-94 history (available on the CBP website) is the official record. Print it and keep it with your return.

Diego F.

Author

Mine is not close — I arrived late March so I have roughly 275 days this year at most, and since current-year days count in full that alone is well over 183, so I meet substantial presence. Good to keep the I-94 printout though.

Late arrival in the year is usually the simplest situation for the substantial presence question, but March or April isn't late: with 100% weight on current-year days you're counting from March or April, which passes 183 days by autumn. The years before only matter when it's borderline. For you it sounds clean: you meet substantial presence, so file a dual-status return (Form 1040 with a 1040-NR statement), claim withholding credit, done.

Depending on how complex this gets, it might be worth one hour with an enrolled agent who works nonresident returns. The dual-status scenario especially — if you decide the first-year election is worth it — has enough moving parts that having someone review the dual-status statement and the OI schedule before you send it makes sense. Not expensive and saves headaches.

Agreed on the EA recommendation for dual-status. For a plain 1040-NR with only W-2 wages and clear non-residency, most people can handle it, but dual-status is different.

To put a bow on the main question: H1B1, arrived in late March, every current-year day counts in full, so substantial presence is met and residency starts on the arrival date — that's a dual-status year: Form 1040 with a 1040-NR statement. Wages on the resident-period return. Withholding from W-2 box 2 on line 25d. First-year election doesn't apply, since it's only for people who don't meet substantial presence; verify that in the 1040-NR instructions and in Publication 519. Treaty check for Chile is worth a few minutes. State filing is separate.

Diego F.

Author

This is a clean summary of everything in this thread. I'm going with a dual-status return since I meet substantial presence, and I'll check the treaty question before filing. Thanks everyone.

Publication 519 is the main IRS resource for the resident vs. nonresident determination, the substantial presence test mechanics, the first-year choice conditions, and dual-status rules — all in one place. Worth reading the relevant sections before you finalize your position.