How to reduce Spanish tax on US investments without selling before moving

Moving to Spain in about seven months and trying to figure out how to reduce Spanish tax on US investments without selling before moving. I have a taxable brokerage account with a mix of ETFs and individual stocks, most of them sitting on big unrealized gains. Some I've held for years. Spain taxes worldwide income for tax residents, so once I'm there, dividends and eventual gains fall under its savings tax base. What I'm trying to understand is whether there's anything I can do now — on the US side — to lock in favorable treatment or restructure before I become a Spanish resident. I'm not trying to evade anything, just want to make sure I'm not walking into a tax trap I could have avoided. I've already looked at the US-Spain tax treaty but I'm not clear on what it actually covers for investment income.

35 comments

Have you established your departure date yet? That matters a lot because Spain uses the calendar year, so if you arrive before July 1 you're generally a Spanish resident for that full year. Have you gotten advice on the Spanish side of this — specifically the "exit tax" Spain imposes when you stop being a resident somewhere else?

Planning to arrive in September, so I'd be a resident starting 2026 tax year. I hadn't looked closely at Spain's exit rules — I was thinking more about what I do here before I go. But yeah, the Spanish exit tax angle is worth digging into.

The US-Spain treaty does cover dividends and capital gains but it doesn't eliminate Spanish tax on those once you're a resident there. What it mainly does is limit withholding at source and provide credits to avoid double taxation. So your US broker will still withhold on dividends (the treaty can reduce that rate) and Spain will give a credit — but you still owe Spanish tax to the extent it exceeds what the US took. The treaty doesn't let you keep US-only treatment after you move.

That's what I was afraid of. So the treaty basically just determines who gets to tax what, not whether you get taxed at all.

Exactly. Credits reduce the double-tax hit but don't eliminate the Spanish layer. That's why the timing and structure before you leave matters more than the treaty itself for your situation.

Before my own move abroad a couple years ago I uploaded my brokerage statements and the treaty summary to taxr.ai and asked it to map each account type against the treaty provisions and show me which gains would be fully taxable in the new country with no credit offset. It flagged things I hadn't noticed — like how dividends from certain fund structures were treated differently than I expected. Worth doing before you talk to a cross-border CPA so you walk in knowing your own numbers.

That's a good approach — going in already knowing which positions are most exposed so I'm not paying a CPA to explain the basics to me. Did it pull from the actual 1099-B format or did you have to reformat anything?

I just uploaded the PDFs as they came. It read the 1099-B and the annual summary together and cross-referenced the cost basis column. I still needed a CPA for the Spanish side but the US-side analysis was solid and saved a lot of time in that first meeting.

Are you planning to keep the brokerage account at a US broker after you move? Spain's Modelo 720 and the newer Modelo 721 (for crypto) require disclosure of foreign assets above certain thresholds. The compliance burden is real and some US brokers close accounts for EU residents. Worth calling your broker before you move, not after.

I hadn't thought about the broker closing the account — I'll call them. Modelo 720 I had heard of, Modelo 721 is new to me.

On the US side, one thing people consider is harvesting losses before departing to offset gains — that way you reduce the unrealized gain balance that Spain would eventually tax. The wash sale rules still apply though: if you sell at a loss and buy back substantially identical securities within 30 days before or after the sale, the loss is disallowed and gets added to the basis of the repurchased shares. See Publication 550 at irs.gov for the full wash sale rules.

So if I harvest a loss now I can't just immediately rebuy the same ETF or the loss gets wiped out. Got it. What about buying a similar but not identical ETF in the meantime?

Correct — buying a "substantially identical" security triggers the wash sale, but switching to a different ETF tracking a different index typically avoids it. The IRS looks at whether the securities are substantially identical, not just similar. That said, the line isn't always obvious for funds with heavy overlap, so it's worth documenting your reasoning.

When I was sorting out my pre-departure position I had Taxr read through my Schedule D and my year-to-date brokerage summary together to show me which lots had the highest embedded gains relative to how long I'd held them — so I could prioritize which positions to think about restructuring first. Really helped me have a smarter conversation with my international tax advisor. The short-term vs. long-term breakdown on Form 8949 matters a lot for this kind of planning.

The lot-by-lot breakdown is exactly what I need. My brokerage shows it but it's hard to filter by gain size and holding period at the same time. Good idea to get that organized before meeting anyone.

Does your situation involve any ISOs or RSUs? If you have unvested equity the sourcing rules for how Spain and the US split the compensation income get complicated fast — and that's separate from the investment account question entirely.

No equity comp, all brokerage. But flagging this for anyone else reading who does have RSUs — I imagine that's a whole other layer.

Worth knowing: for US federal purposes, if your capital losses in any year exceed your capital gains, you can only deduct a limited amount against other income — the rest carries forward. The Schedule D instructions and Topic 409 on irs.gov lay out exactly how the carryover worksheet works. If you're doing pre-departure harvesting, model out whether you'll actually use the losses before you leave, or if they carry forward into years where Spain also taxes you.

Good point. Losses that carry into a year I'm already a Spanish resident might not help as much because Spain doesn't care about my US carryforward.

Right. The carryover reduces your US taxable income, which could reduce the foreign tax credit calculation in Spain's favor — but it's indirect. A cross-border CPA can model the interaction; I'd just flag it as something to bring up explicitly.

Have you looked at whether any of your positions qualify for long-term capital gains treatment already? Holding period for US purposes starts the day after the trade date you bought and ends on the trade date you sell — that's the rule from Publication 550. If some lots are close to the one-year mark, waiting to clear them before you go could make a big difference on the US side.

A few lots are right around the 11-month mark. If I wait two more months before making any moves those flip to long-term — that's worth doing regardless of the Spain question.

What's your plan for the first year — will you file as a US resident for part of the year and Spanish resident for part? The dual-status return in the US is its own complexity and it affects which forms you file and how you treat the income earned in each period.

Agree that a cross-border CPA or international enrolled agent is probably the right call here, not just a regular tax preparer. The interaction between the US foreign tax credit rules and the Spanish savings tax base is not something most domestic preparers deal with regularly. Look for someone who works specifically with US expats in Spain.

Yeah I've started looking — there are a few firms that specialize in US-Spain specifically. Expensive but I think this is one situation where getting it wrong costs more than the advice.

Does your ETF situation include any that are structured as partnerships (like commodity ETPs)? Those issue K-1s instead of 1099-Bs and the character of income inside them can be different — ordinary income mixed with capital gain. That changes both the US reporting and potentially how Spain classifies the income.

I don't think so — mine are standard equity ETFs — but I'll double-check. The last thing I need is a K-1 showing up in February when I'm already in Spain.

Going back to the original structure question: Spain does have an exit tax ("impuesto de salida") that can apply when you leave Spain, not when you arrive. When you arrive, you're stepping into Spanish worldwide taxation. So the restructuring window is now — before you establish Spanish residency — not after.

This is the clearest framing I've seen. The window is between now and when I arrive, and once I'm there, Spain taxes everything going forward. So whatever I do, I do it in the next seven months.

Yes. And whatever you don't restructure before you arrive, Spain will tax on future gains and income. That's not necessarily a reason to sell everything — the question is whether the tax cost of selling now (at favorable US long-term rates) is less than the Spanish tax you'd pay later on the same gain plus any future appreciation.

Are there any accounts in your brokerage that are IRAs or Roth IRAs? The US-Spain treaty has specific provisions covering US retirement accounts and Spain's treatment of them has historically been a contentious area — distributions, rollovers, all of it. That's a separate analysis from the taxable brokerage.

Yes, I have a Roth. The treaty apparently has a provision for this but I've seen conflicting things online about whether Spain honors it in practice. Flagging that for my CPA conversation.

One thing that often gets missed: cost basis documentation. Make sure you have clear records of your acquisition dates and prices for every lot — especially older positions that may have transferred between brokers over the years. When you eventually sell as a Spanish resident, you'll need to report to both countries and the basis figures need to match. If your 1099-B shows basis as "not reported to IRS" (box E on Form 8949 for long-term lots, box B only for short-term), you'll want to reconstruct it now while you have access to old statements.

Ugh, I have a few old positions that transferred from a previous broker years ago. The current broker shows the basis but I should verify it's right. Good reminder to do that audit before I go.

Worth adding: when you do eventually sell assets as a Spanish resident, you'll report the sale on Form 8949 for the US return using the original cost basis and acquisition date — the move itself isn't a taxable event for US purposes. Spain will compute the gain from the value on the date you became resident (or possibly from original acquisition depending on how they treat it). Two different gain calculations from the same sale. That's why the basis documentation point above is so important.