By Victor Gersten, EA, CFP®, MS, MPAS™

One of the questions I hear most on intro calls is some version of this: “We are going to sell the house anyway. Does it matter whether we sell it before we move to Spain or after?”

It matters a great deal. For many American couples the house is the single largest gain they will ever realize, and the same sale can be close to tax-free in the United States and fully taxable in Spain. The difference usually comes down to one date: the day the sale closes, and which calendar year that falls in.

This article walks through how Spain decides you are a tax resident, how Spain calculates the gain on a U.S. home, why the U.S. home sale exclusion does not protect you there, and what can still help if the sale lands after you have become a Spanish tax resident.

Why the Timing Matters So Much

In the United States, Section 121 lets you exclude up to $250,000 of gain on the sale of your main home, or $500,000 for a married couple filing jointly, if you owned and lived in the home for at least two of the five years before the sale. For a lot of households that wipes out the U.S. tax entirely.

Spain has no equivalent of that exclusion. Once you are a Spanish tax resident, Spain taxes your worldwide income, and a gain on the sale of a home in Ohio or California is a capital gain in the Spanish savings base. Since 2025 that base is taxed at these rates:

Gain in the savings base (per person) Rate
First €6,000 19%
€6,000 to €50,000 21%
€50,000 to €200,000 23%
€200,000 to €300,000 27%
Over €300,000 30%

The treaty does not fix this for you. Under Article 13, the United States keeps the right to tax gains on U.S. real estate, and under Article 24 Spain gives a credit for the U.S. income tax actually paid on that gain. If Section 121 brought your U.S. tax to zero, there is nothing to credit, and Spain taxes the full gain at its own rates. The treaty mechanics are covered in more detail in The US Spain Tax Treaty Explained.

When Spain Considers You a Tax Resident

Spanish tax residency is decided under Article 9 of the IRPF law, and it works by calendar year. You are a Spanish tax resident for a year if any one of these is true:

  • You spend more than 183 days in Spain during the calendar year. Sporadic absences count as days in Spain unless you can prove tax residency in another country.
  • Spain is the main center or base of your economic activities or interests.
  • Your spouse (not legally separated) and minor children habitually live in Spain. This creates a presumption of residency that you can rebut.

Two features of this test surprise people. First, Spain does not have a split year for individuals. If you are resident for a year, you are resident for the whole year, and a sale that closed in February is inside that year even if you arrived in September.

Second, the 183-day count is not the only way in. A couple who arrives in August, enrolls children in school, buys an apartment and moves their investments may still be treated as resident that year under the economic interests test, even though the day count is short. For most retirees who arrive in the second half of the year without Spanish employment, the arrival year is usually not a Spanish tax year, but that is a conclusion to reach deliberately, not assume.

The Date That Counts Is the Closing Date

For Spanish purposes, the gain arises when the sale is completed, meaning when the property is actually transferred. Listing the house, accepting an offer or signing a purchase agreement in one year does not lock the sale into that year if the closing slips into the next one.

This is the most common way the problem happens. A household lists the house in October, expects to close before the holidays, and the buyer’s financing or inspections push the closing into January. If January falls in their first Spanish tax year, the whole gain is now Spanish taxable income.

How Spain Calculates the Gain on a U.S. Home

Spain calculates the gain in euros, not dollars. The general approach is:

  • Acquisition value: what you paid, plus purchase costs and the cost of improvements, converted to euros at the exchange rate when each amount was paid.
  • Transfer value: the sale price, minus selling costs, converted to euros at the exchange rate on the date of sale.
  • Gain: the difference between the two, in euros.

Two consequences follow. Because the conversion happens at two different dates, the euro gain can be larger or smaller than the dollar gain, depending on how the dollar moved while you owned the home. And because improvements raise your acquisition value, documentation matters. I have seen households digging for renovation receipts days before a Spanish filing deadline. It is much easier to gather them before the move.

Sell Before or After: A Side by Side View

Sale closes in your last U.S.-only tax year Sale closes after you are a Spanish tax resident
U.S. federal tax Section 121 exclusion available if you qualify Section 121 exclusion still available if you qualify
State tax Depends on the state Some states still tax the sale of property located there
Spanish tax None, because you are not yet resident Full gain in the savings base, 19% to 30%, less any credit for U.S. tax actually paid
Spanish exemptions Not needed Reinvestment and over-65 exemptions may apply if the home still counts as your main home
Practical risk Moving logistics, temporary housing, timing the visa A late closing, exchange-rate effects, missing improvement records

A Hypothetical Example

Hypothetical illustration with round numbers. Not a client example.

A married couple bought their home for $500,000 when one euro cost $1.25, which is €400,000. They sell it for $920,000 when one euro costs $1.15, which is €800,000. To keep it simple, ignore purchase costs, selling costs and improvements.

U.S. side: the dollar gain is $420,000, which is under the $500,000 joint exclusion. Federal tax is zero.

If the sale closes before they are Spanish tax residents: no Spanish tax.

If the sale closes in their first Spanish tax year: the euro gain is €400,000. Spain taxes each spouse individually on their half, so each reports €200,000. At the rates above, that is about €44,900 each, or roughly €90,000 for the couple, with no U.S. tax to credit against it.

Same house, same buyer, same price. The only change is which side of January 1 the closing fell on.

If the Sale Happens After You Are Resident

Selling after the move is sometimes the right call: you may want to see Spain before you commit, the market may be soft, or you may need the house while the visa is processed. If that is the plan, these are the tools worth knowing about.

The reinvestment exemption

Spain exempts the gain on the sale of your main home (vivienda habitual) to the extent you reinvest the proceeds in a new main home within two years. Spanish binding rulings have accepted that the new home you buy can be outside Spain. In binding ruling V1449-17 (June 7, 2017), the Dirección General de Tributos concluded that a Spanish resident who sold her main home in Spain could apply the exemption to proceeds reinvested in a new main home in the United States, because the rules do not require the new home to be in Spain, provided the other conditions were met. In an April 2026 ruling (V0930-26) the Dirección General de Tributos analyzed a home abroad sold by a Spanish resident under the same rules, and the problem was timing, not location.

The timing rule is strict. For this exemption, a home still counts as your main home only if it was your main home at the date of sale or at some point in the two years before the sale. In that ruling the person had moved out more than two years earlier, so the exemption was denied. Spain also generally requires that you lived in the home continuously for at least three years for it to count as a main home in the first place.

The over-65 exemption

A Spanish resident over 65 who sells their main home is exempt on the gain, with no reinvestment required. The same main home definition and the same two-year window apply. The law does not limit this to homes in Spain, but this is a point to confirm with a Spanish tax adviser before you rely on it.

The Beckham regime

If you qualify for the special impatriate regime, Spain generally taxes only Spanish-source income, plus employment income. A gain on a home in the United States is not Spanish-source. For people moving for work this can change the timing question completely. See The Beckham Law in 2026.

Credit for U.S. tax actually paid

If part of the gain is taxable in the United States, for example because it exceeds the Section 121 limit or the home was not your main home, Spain credits the U.S. federal income tax on that gain, up to the Spanish tax on the same income. Whether Spain will also credit state income tax is not something I would count on.

If You Keep the House for a While

Keeping the house empty after the move has its own Spanish costs. A Spanish resident who owns a property that is not rented out generally reports imputed income on it each year, and the property counts toward the Spanish wealth tax and the Modelo 720 real estate category if it is above the reporting threshold. Renting it out raises a different set of questions, including how Spain treats depreciation, which deserve their own article. For the reporting side, see Modelo 720: What Americans in Spain Actually Have to Declare.

Do Not Forget the U.S. Side

  • Section 121 has a clock. You need two years of use in the five years before the sale. If you move out and rent elsewhere, you have roughly three years before the exclusion is lost.
  • States may still tax. Some states tax the sale of real property located in the state even after you have left. If you are leaving a state like California, also see Leaving California for Spain: Breaking State Residency.
  • Converting the proceeds. Selling the house usually means moving a large sum from dollars to euros. Decide how and when you will convert before the money lands, rather than after.

A Practical Timing Checklist

  • Decide which calendar year will be your first Spanish tax year, using the residency tests above, not only the day count.
  • Work backwards from that date and give yourself a cushion for a delayed closing.
  • Gather the purchase closing statement, improvement receipts and the dates you paid them.
  • Check whether your U.S. sale qualifies for Section 121 and whether your state will tax it.
  • If selling after the move, confirm whether the reinvestment or over-65 exemption can apply before you sign anything.

Frequently Asked Questions

Does Spain recognize the U.S. $250,000 or $500,000 home sale exclusion?

No. The exclusion reduces U.S. tax only. Once you are a Spanish tax resident, Spain taxes the gain under its own rules, and if no U.S. tax was paid there is nothing for Spain to credit.

If I sell my U.S. home before moving to Spain, does Spain tax the gain?

Not if the sale closes in a year when you are not a Spanish tax resident. Spain only taxes non-residents on Spanish-source income, and a gain on a U.S. home is not Spanish-source.

Which date matters, the contract or the closing?

The completion of the sale, meaning the transfer of the property. A contract signed in December that closes in January is generally a January sale.

Can I avoid Spanish tax by reinvesting in a home in Spain?

Possibly. The reinvestment exemption can apply if you reinvest in a new main home within two years, but only if the home you sold was still your main home at some point in the two years before the sale.

How is the exchange rate handled?

Spain calculates the gain in euros, converting the purchase price at the rate when you bought and the sale price at the rate when you sold. Currency movements can increase or reduce the taxable gain.

I am over 65. Is my home sale exempt in Spain?

It can be, if the home qualifies as your main home under Spanish rules at the sale or within the two years before it. Confirm this with a Spanish tax adviser for your own facts.

Ready to Talk Through Your Situation?

If you are planning a move and the house is still on your list, a short call is an easy way to check your timing before you list it.

If your move is still ahead of you, see our pre-move planning overview.

Book your free 20-minute intro call

Related reading: Five Financial Mistakes Americans Make Before Moving to Spain

Important disclosures

This article is general educational information published by Cross Border Wealth Advisors, a company of Gersten Financial Planning Inc. an investment adviser registered with the State of California (CRD 309890). Nothing in it is investment advice, tax advice, legal advice, or immigration advice, and nothing in it is an offer or solicitation to buy or sell any security.

Tax treaty interpretation depends entirely on your own facts, and treaty positions can require specific disclosure on a U.S. return. Several points in this article are expressly identified as unsettled or as open technical questions. Figures, rates and filing dates are stated as of the publication date shown above and may have changed since. Before acting on anything described here, consult a qualified professional about your own situation. Where this article says a point is unsettled or unconfirmed, that statement is deliberate and should be treated as a reason to seek advice rather than as a conclusion.

Cross Border Wealth Advisors is a fee-only firm and acts as a fiduciary to its advisory clients. The firm does not sell products and does not receive commissions. Registration with any state securities authority does not imply a certain level of skill or training.

No portion of this article should be read as a promise, guarantee or prediction of any particular tax, investment or planning outcome. Any calculation shown is a hypothetical illustration using round numbers for the purpose of demonstrating a mechanic. It is not a representation of any client’s experience, is not a projection of results, and does not reflect the performance of any actual account.

Web links to third-party sources are provided for the reader’s convenience. Cross Border Wealth Advisors does not control, adopt or endorse the content of linked sites.

Additional information about the firm, including its Form ADV Part 2A brochure and Part 2B brochure supplement, is available at adviserinfo.sec.gov and on request at info@cbwealthadvisors.com.

About the Author

Victor Gersten, EA, CFP®, MS, MPAS™, is a fee-only fiduciary specializing in financial planning for Americans living in or moving to Spain. Victor founded Cross Border Wealth Advisors to serve Americans relocating to Spain, combining an Enrolled Agent’s tax expertise with comprehensive financial planning.

Works Cited

  1. Ley 35/2006, del Impuesto sobre la Renta de las Personas Físicas, articles 9, 33.4, 38, 66, 76 and 85 (BOE)
  2. Real Decreto 439/2007, Reglamento del IRPF, article 41 bis (BOE)
  3. Ley 7/2024, de 20 de diciembre, savings base scale from 2025 (BOE)
  4. Dirección General de Tributos, consulta vinculante V0930-26 (27 April 2026)
  5. Dirección General de Tributos, consulta vinculante V1449-17 (7 June 2017)
  6. Convention between the United States of America and the Kingdom of Spain for the Avoidance of Double Taxation, Articles 13 and 24, as amended by the 2013 Protocol (IRS and U.S. Department of the Treasury)
  7. IRS, Topic No. 701, Sale of Your Home, and Publication 523
  8. Agencia Tributaria, Manual práctico de Renta, ganancias patrimoniales and imputación de rentas inmobiliarias

Also useful: For the full list of what to review before your first resident year, read Before You Become a Spanish Tax Resident.