A US citizen or green-card holder who sells a home abroad reports the transaction on Form 1040 the same year the local notary closes it. Citizenship-based taxation is the whole story: the sale is a US taxable event even if the owner has not set foot on American soil in a decade, has no US income, and pays capital gains tax in the country where the property sits. Three mechanical questions decide the actual bill — whether the Section 121 principal-residence exclusion applies, whether a foreign-currency mortgage produced a phantom gain under Section 988, and how the foreign capital gains tax lines up against the US foreign tax credit. Each one is answered independently, and getting the order right is where most self-prepared returns go wrong.
What follows is an informational overview of how those pieces interact for a US person selling a primary residence in Europe — Portugal and Spain are used as reference jurisdictions because they are two of the most common destinations for US expats and the mechanics differ meaningfully between them. It is not tax advice. Anyone about to close on a foreign sale should engage a US expat CPA and a local tax adviser before signing.
The default rule: the US taxes the gain, wherever the property sits
The US taxes citizens and lawful permanent residents on worldwide income, and that includes gains on the sale of real estate located anywhere on earth. The gain is computed in US dollars using the standard formula — amount realised minus adjusted basis — and it is characterised as a long-term capital gain if the property was held more than one year. Preferential long-term capital gains rates of 0%, 15%, or 20% apply based on taxable income, and a 3.8% Net Investment Income Tax (NIIT) is layered on top once modified adjusted gross income crosses the applicable threshold. As of 2026 the top federal capital gains rate on a foreign home sale for a US expat therefore lands at 23.8%, before any state tax and before crediting foreign tax paid.
State tax exposure depends on whether the seller has severed state residency. Nine states impose no personal income tax; several others have aggressive residency rules that follow expats abroad for years. TaxAtlas covers the mechanics of exiting a state's tax net in the state residency severance guide. For someone still technically domiciled in California or New York, a foreign home sale can generate a state tax bill on top of the federal one, and the foreign tax credit rarely helps at the state level.
Section 121: the $250k / $500k exclusion works abroad, with limits
The Section 121 principal-residence exclusion — up to $250,000 of gain for a single filer, $500,000 for a married couple filing jointly — is written in terms of "principal residence" and does not require that the home be located in the United States. A US expat who owned and used a home in Lisbon or Valencia as a primary residence for at least two of the five years before the sale can exclude gain under Section 121 the same way a homeowner in Ohio can. The IRS confirms this in the Section 121 regulations; property location is not a qualifying factor.
Three details trip people up:
- Ownership and use are separate tests. The owner must have held title for at least 24 months of the 60-month lookback, and used the property as a principal residence for at least 24 months of the same window. The months do not need to be consecutive or overlap.
- Only one exclusion every two years. If Section 121 was already claimed on a prior sale within the two years before the current closing, the exclusion is unavailable on this one.
- Non-qualified use reduces the exclusion. Any period after 2008 during which the property was not a principal residence — held as a rental, for example, or vacant while the owner lived elsewhere — is generally non-qualified use and shrinks the excludable share pro rata. Time abroad during which the foreign home was the principal residence is qualified use; time when the owner rented it out is not.
For gains above the $250k/$500k ceiling, the excess is fully taxable at long-term capital gains rates. Depreciation recaptured on periods the property was rented is taxed at up to 25% (unrecaptured Section 1250 gain) and is not eligible for the Section 121 exclusion regardless.
Section 988: the foreign-currency mortgage gain that surprises people
This is the item that most often produces an unexpected US tax bill on a foreign home sale, and it has nothing to do with the property. When a US person borrows in a foreign currency to buy a home — a euro mortgage from a Portuguese bank, for instance — the IRS treats the mortgage as a separate transaction from the property itself under Internal Revenue Code Section 988. Each principal payment, and the final payoff at closing, is a discharge of foreign-currency debt measured in dollars.
If the dollar has strengthened against the euro between origination and payoff, it now costs the borrower fewer dollars to extinguish the same euro debt. The IRS treats that dollar-value difference as ordinary income under Section 988 — a "foreign currency exchange gain" on debt — taxed at marginal rates up to 37%, not at preferential capital-gains rates. The gain is real income for US tax purposes even though the borrower never touched a single dollar of it; economically it is offset by a corresponding loss on the property in euro terms, but the two do not net for US purposes.
The asymmetry is the sting: a Section 988 loss on a personal-use mortgage is generally not deductible, because it is treated as a personal loss. Currency losses on debt used for investment or business purposes can be deductible, but a mortgage on a primary residence sits on the personal side of the ledger. The result is a heads-the-IRS-wins, tails-you-lose profile for US expats who bought foreign homes with local mortgages during weak-dollar periods and are selling now.
A worked sketch: a couple bought a Lisbon apartment in 2019 for €500,000 with a €400,000 mortgage when the euro was worth about $1.12. They sell in 2026 for €600,000 and pay off the €300,000 remaining balance when the euro is worth $1.05. The property gain in dollars is roughly $630,000 sale − $560,000 purchase basis = $70,000, long-term capital gain, potentially covered by the Section 121 exclusion. Separately, the €100,000 of principal they repaid over the life of the loan and the €300,000 final payoff each has its own Section 988 calculation, and the aggregate ordinary-income currency gain can easily reach five figures. That amount is taxed at the couple's marginal rate on top of the property gain.
The foreign tax credit and the sourcing trap
Portugal, Spain, and most other countries where US expats own homes will tax the seller locally. Portugal levies capital gains on real estate at 28% for non-residents (residents can elect to include half the gain in general progressive income, with reinvestment relief available where sale proceeds are reinvested in another EU/EEA primary residence within a specified window). Spain taxes savings income including real estate gains on a sliding scale — 19% up to €6,000, 21% to €50,000, 23% to €200,000, 27% to €300,000, and 30% above €300,000, based on the country data as of 2026.
The US foreign tax credit is intended to prevent double taxation on the same income, but it works through a sourcing rule that many US expats miss. Under Internal Revenue Code Section 865, gain on the sale of personal property is generally sourced to the seller's tax residence. Real property is a category-specific exception: gain on real estate is sourced to the country where the property is located, so a foreign home sale generates foreign-source gain that can absorb foreign tax paid to Portugal or Spain.
Two constraints matter:
- The credit is computed per basket. Real-property gains fall in the "passive category" for foreign tax credit purposes for most individuals. The credit in any given year is capped at the US tax on foreign-source income in that basket, so excess Portuguese or Spanish tax on the property gain cannot be used to offset US tax on unrelated categories of income (US-source dividends, US wage income earned through the FEIE cap, and so on).
- Section 988 currency gain is US-source ordinary income. That is the trap: the foreign country will not have taxed the mortgage payoff separately, so there is no foreign tax to credit against it. The Section 988 gain sits in the general basket as US-source income and generally cannot be sheltered by any foreign tax paid on the property gain itself. This is the mechanical reason mortgage-currency gains disproportionately hit the final US bill.
Ordering also matters in practice. The foreign tax must be "paid or accrued" to be creditable, and if Portugal or Spain assesses tax in a later year — for example, after the seller files a residency-year return that reconciles the withheld amount — the credit is claimed for the year the underlying US gain was reported, either by amending the earlier return or, if the taxpayer accrues, in the year the foreign liability was fixed. Coordination between the US and foreign filing calendars is a routine source of self-preparer error.
Portugal vs. Spain: side-by-side on a home sale
| Item | Portugal | Spain |
|---|---|---|
| Local CG rate on residential real estate (non-resident, 2026) | 28% flat on the full gain | 19–30% progressive savings-income scale (19% to €6k, 21% to €50k, 23% to €200k, 27% to €300k, 30% above) |
| Reinvestment relief for primary residence | Yes, if proceeds reinvested in another primary residence in EU/EEA within statutory window (as of 2026 — verify current window with local adviser) | Yes for tax residents reinvesting in a new primary residence in Spain/EU within two years; not available to non-residents in the same form |
| Withholding at sale by notary | Standard practice; final tax reconciled on the annual return | 3% of sale price withheld on account when the seller is a non-resident; balance settled on Form 210 |
| Special regime interaction | IFICI ("NHR 2.0") targets qualifying scientific/innovation employment income; it does not shelter real-estate capital gains as a general rule | Beckham Law taxes Spanish-source employment at flat 24% and generally leaves foreign-source income aside, but a Spanish home sale is Spanish-source and follows regular savings-income rules |
| Wealth tax on the property while held | None (no wealth tax) | Regional wealth tax may apply, with Madrid/Andalusia effectively bonificated to zero; solidarity tax on net wealth >€3M extended through 2026 |
The comparison highlights why country choice materially changes the final US bill even when the federal treatment looks identical. A Spanish home held in a region with real wealth-tax friction, sold at a large gain that lands in the 27–30% savings-income bracket, produces a higher creditable foreign tax and often absorbs the full US federal capital gains tax on the property gain — leaving Section 988 mortgage gain and NIIT as the residual US exposure. A Portuguese home sold under the reinvestment relief may generate very little foreign tax to credit, in which case the full US 15% or 20% federal rate plus 3.8% NIIT drives the bill, with no offset. Neither outcome is universally better; it depends on the numbers.
Reporting mechanics on the US return
A foreign home sale by a US person typically produces the following filings:
- Form 8949 and Schedule D — the property gain, with any Section 121 exclusion shown as an adjustment. Basis is reconstructed in US dollars using the exchange rate on the acquisition date and each capital improvement date; proceeds are converted at the closing-date rate.
- Form 1116 — the foreign tax credit, computed in the passive category for the property gain. If the seller has other passive-category foreign income (foreign dividends, interest), those interact with the credit limitation.
- Section 988 statement — the ordinary-income currency gain on mortgage principal payments and payoff, reported on Schedule 1 as "other income" with a supporting worksheet. There is no dedicated form.
- Form 8938 (FATCA) — foreign real estate held directly is not a specified foreign financial asset and is not reported on 8938 on its own. But a foreign bank account holding the sale proceeds is, and the reporting thresholds for expats (starting at $200,000 year-end / $300,000 any time during the year for single filers abroad, higher for joint) are easily crossed by a home sale.
- FinCEN Form 114 (FBAR) — filed separately from the return whenever the aggregate value of foreign financial accounts exceeds $10,000 at any point in the year. Sale proceeds sitting in a foreign account after closing will nearly always trigger it. The FBAR/FATCA reporting guide covers the mechanics.
If the property was held in a foreign entity — a Portuguese Sociedade or a Spanish Sociedad Limitada holding a primary residence, which is uncommon but not unheard of — GILTI, Subpart F, PFIC, and Form 5471 questions layer on top of everything above, and the analysis becomes materially more complex. TaxAtlas covers those regimes in GILTI for US expat business owners and PFIC rules for US expats.
Timing and planning windows
The Section 121 clock is often the highest-leverage variable. A US expat within a few months of the 24-month use test may materially benefit from delaying the sale to cross the threshold. Similarly, an expat who has been renting out a former foreign primary residence should be aware that the non-qualified-use fraction grows with each additional rented year, and that the five-year lookback for the use test rolls forward each month — at some point the exclusion evaporates entirely because the two-year use window falls outside the five-year lookback.
On the currency side, the Section 988 exposure can be reduced by prepaying the mortgage in an earlier tax year when the dollar is weaker, spreading the ordinary-income recognition across years and marginal-rate brackets. Whether that is worth doing depends on liquidity, other income in the year, and interest-rate arithmetic — it is a planning question rather than a compliance one.
Anyone contemplating exiting the US tax system entirely via expatriation should note that the sale of a foreign home before or after expatriation lands very differently. Pre-expatriation, the full US capital gains framework applies. Post-expatriation, only US-source income and certain deemed distributions remain in scope, but the mark-to-market exit tax under Section 877A may have already taxed the built-in gain on the property at expatriation. The renouncing US citizenship tax guide covers the exit-tax mechanics.
Where to go next
TaxAtlas tracks the US, Portugal, and Spain tax profiles in detail on the United States country page, Portugal country page, and Spain country page, and lets you line them up on the country comparison tool. For related mechanics that often run alongside a foreign home sale, see the capital gains timing when moving abroad analysis, the FEIE vs Foreign Tax Credit comparison, and the double taxation treaties guide. Decisions with real dollars attached should be run past a US expat CPA and a local adviser in the property jurisdiction.