An American couple buys an apartment in Málaga. Part of the price comes from the sale of something in the United States; the rest comes from a Spanish mortgage, because the rate was reasonable and because keeping the US portfolio invested made more sense than liquidating it. Five years later they pay the loan off early, or they sell and the loan is retired at the notary, or they refinance to a better rate.
In their own minds nothing has happened except a mortgage ending. They never bought a currency, never speculated, never held a position. They borrowed the money of the country they live in and paid it back in the same money.
The Internal Revenue Code does not see it that way, and the gap is not a loophole or an aggressive reading. It is the ordinary operation of three rules that were each written for a sensible reason and that, stacked together, produce a result most people find surprising: the loan is a transaction of its own, it is measured in dollars, and the outcome is asymmetric in the government's favour. This page explains where that comes from, how large it can be, and the mirror-image trap waiting on the Spanish side of the same balance sheet.
On this page
Why the IRS still does the maths in dollars Your mortgage is not part of your house The asymmetry: gain yes, loss no The subsection that spares you also takes something away A worked example on the Costa del Sol The mirror image: in Spain, your dollars are the foreign currency "But I never made any money" What actually changes the exposure Frequently asked questions
"Clients ask us to get the visa right and to get the purchase right. Those are two files. The mortgage sits quietly between them, and it is the one document that is still speaking to a tax authority on the other side of the Atlantic long after the keys are handed over."
— Lola Jurado · Immigration lawyer, Ilustre Colegio de Abogados de Málaga (nº 10907)
Why the IRS still does the maths in dollars
Section 985(a) of the Internal Revenue Code requires that all income tax determinations be made in the taxpayer's functional currency. For an individual, section 985(b)(1)(A) fixes that currency as the US dollar. Not the currency you earn in, not the currency of the country you have lived in for a decade, not the currency your entire life is denominated in. The dollar.
There is one door out of that rule, and it is closed to a home. A taxpayer can have a qualified business unit with a non-dollar functional currency, but section 989(a) defines a QBU as a "separate and clearly identified unit of trade or business of a taxpayer which maintains separate books and records". Regulation 1.989(a)-1(c) confirms that an activity generating no expenses deductible under section 162 or section 212 does not qualify. A house you live in is not a trade or business. It keeps no books. It cannot be a QBU.
That argument has been run, properly briefed, and lost. In Quijano v. United States, 93 F.3d 26 (1st Cir. 1996), an American couple who had bought a London house entirely with a sterling mortgage argued that they had purchased "for a pound-denominated value" while "living and working in a pound-denominated economy", and that the pound should therefore be treated as their functional currency. The First Circuit called this, however fair and reasonable it might sound, "an untenable attempt to convert their 'functional currency' from the U.S. dollar to the pound sterling", and affirmed against them.
Your mortgage is not part of your house
The second rule is the one clients find hardest to accept, because commercially the mortgage and the house are obviously one deal. You would not have the loan without the house.
Tax law disagrees. Revenue Ruling 90-79 states the principle directly: the borrowing and repayment of the mortgage loan is a separate transaction from the purchase and sale of the personal residence. The ruling builds on Willard Helburn, Inc. v. Commissioner, 214 F.2d 815 (1st Cir. 1954), where a taxpayer who had financed a purchase in sterling and later settled the debt with cheaper pounds was held to have realised a taxable gain by settling the loan with less costly pounds than the pounds originally borrowed. The house and the borrowing are counted on two different sheets of paper.
Meanwhile the house itself is translated under Revenue Ruling 54-105: cost is expressed in dollars at the exchange rate prevailing on the date of purchase, and sale price at the rate prevailing on the date of sale. Your basis is frozen at the old rate. Your proceeds are counted at the new one.
The taxpayers in Quijano tried the one integration route the Code does offer. Section 988(d) allows a section 988 transaction that is part of a 988 hedging transaction to be integrated with the underlying transaction and treated as a single transaction. They argued their mortgage was exactly that: borrowing taken on to manage currency risk on property they held. The court did not need to decide whether the economics fit, because the door was already locked for a different reason, which is the subject of the next two sections.
The asymmetry: gain yes, loss no
Put the two halves together and the shape appears.
If the dollar strengthens against the euro between the day you borrow and the day you repay, the euros you hand back are worth fewer dollars than the euros you received. Measured in your functional currency you extinguished a liability for less than you took it on. That is Willard Helburn: a taxable gain, ordinary income, on a loan you never thought of as an investment.
If the dollar weakens, the euros you hand back cost more dollars than the euros you received. You have a real economic loss. Section 165(a) allows a deduction for losses sustained during the year — but section 165(c) limits an individual's loss deductions to losses incurred in a trade or business, losses incurred in a transaction entered into for profit, and casualty losses. A mortgage on the home you live in is none of the three. Revenue Ruling 90-79 says so on its own facts and disallows the loss.
The Quijano family lived the consequence in the sharpest possible form. They had a roughly $100,000 currency loss on the sterling mortgage and a large dollar gain on the house, arising from the very same exchange-rate movement over the very same years on the very same asset. They asked to net one against the other. The First Circuit refused: "The nonintegrated tax treatment Congress accords the acquisition, sale, and financing of appellants' residence simply renders nondeductible the foreign exchange loss on their foreign-currency denominated mortgage loan."
The subsection that spares you also takes something away
Reading section 988 for the first time, a US retiree usually reaches subsection (e) with relief. Section 988(e)(1) says the preceding provisions of the section "shall not apply to any section 988 transaction entered into by an individual which is a personal transaction". A home mortgage looks personal. So section 988 is switched off. Good news?
Only half. Being outside section 988 does not mean being outside tax. It means falling back to what Revenue Ruling 90-79 calls "the law predating section 988" — which is Willard Helburn, which taxes the gain, and section 165(c), which kills the loss. The exemption removes the modern statute, not the liability that the old cases already created.
Congress said this out loud. The conference report to the Tax Reform Act of 1986, quoted by the First Circuit in Quijano, records that the section 988 rules "would be inapplicable to foreign currency gain or loss recognized by a U.S. individual residing outside of the United States upon repayment of a foreign currency denominated mortgage on the individual's principal residence. The principles of current law would continue to apply to such transaction." The American living abroad with a foreign-currency mortgage on their home was not an oversight. He was described, by name, in the legislative history, and left where he was.
Now notice what else subsection (e)(1) removes, because this is the part almost nobody reads to the end. It disapplies the preceding provisions of this section — all of them. That includes section 988(a)(3), the sourcing rule, and section 988(a)(3)(B)(i)(I), which sources a person's currency gain by reference to "the country in which such individual's tax home (as defined in section 911(d)(3)) is located". For a retiree whose tax home is Spain, that rule would have pointed the gain away from the United States — and foreign-source ordinary income is the only kind that can absorb a foreign tax credit. The subsection that saves you from section 988's ordinary-income machinery is the same subsection that takes away section 988's foreign-source rule. It is not a relief provision. It is a switch, and it turns off the whole apparatus, useful parts included.
Where that leaves sourcing for a personal mortgage gain is not settled by any rule written for this situation, and we will not pretend otherwise: we have found no ruling or decision addressing how a Spain-resident US citizen should source the gain on retiring a euro mortgage once section 988(e)(1) has removed the statute's own answer. That is a live question for your US tax adviser, and it matters, because it decides whether the gain can be paired with Spanish tax you have already paid elsewhere. What is not in doubt is the other half: Spain will not tax this gain at all, so there is no Spanish tax on this item to credit against it. Whatever the US charges here, it charges alone.
One narrower point for completeness. Section 988(e)(2) does contain a genuine break, and it is tiny: where an individual disposes of non-functional currency in a personal transaction, gain from exchange-rate movement is not recognised — unless the gain otherwise recognised on the transaction exceeds $200. Read the sentence carefully, because it is a cliff and not an allowance. Cross $200 and the exclusion does not apply to the excess; it does not apply at all. And it speaks to disposing of the currency, which is a different computation from the gain on the debt itself.
A worked example on the Costa del Sol
Rates below are illustrative round numbers chosen to show the mechanism, not a forecast and not today's market. Suppose our couple buys for €800,000, funding €500,000 with a Spanish mortgage, at a time when €1 costs $1.10. Years later they repay the €500,000 principal when €1 costs $1.00.
| The loan, measured in dollars | Euros | Rate | US dollars |
|---|---|---|---|
| Amount borrowed (liability taken on) | €500,000 | 1.10 | $550,000 |
| Amount repaid (liability extinguished) | €500,000 | 1.00 | $500,000 |
| Currency gain on repayment | €0 | $50,000 |
In euros the couple borrowed €500,000 and repaid €500,000. Their Spanish bank statement shows a mortgage opened and a mortgage closed. Their Spanish tax return shows nothing, because for a Spanish resident there is no currency element in a euro loan repaid in euros — no alteración en la composición del patrimonio, nothing to declare. Their US return shows $50,000 of income, taxed at ordinary rates, in a year when no cash arrived.
Reverse the rates and reverse nothing else: borrow at 1.00 and repay at 1.10 and there is a $50,000 economic loss, and section 165(c) makes it invisible. That is the whole of the asymmetry, in one table, on the same house.
Two practical amplifiers deserve a mention. First, this is not only about paying a loan off at the end. Each repayment of principal is a repayment; a refinance retires the old debt and creates a new one; and in Quijano the mortgage was increased twice, at two different exchange rates, so the loan carried several booking rates at once. Second, the gain lands in the year the debt is retired, which for most people is the year they sell — the same year they are already dealing with Spanish capital gains tax on the sale and plusvalía municipal. It is the worst possible year for an extra, uncredited, unexpected slice of ordinary US income.
The mirror image: in Spain, your dollars are the foreign currency
Everything above happens because Spain's money is foreign to your tax return. Now turn the telescope around, because the same logic runs in the other direction and catches the other side of your balance sheet.
Once you are a Spanish tax resident, Spain computes your income in euros, and the currency that is foreign here is the dollar. Spanish practice, following the doctrine of the Dirección General de Tributos, treats an exchange of currencies by an individual outside an economic activity as giving rise to a capital gain or loss — a ganancia o pérdida patrimonial — which goes into the savings base. The dollars sitting in your US account have a euro acquisition value fixed at the official European Central Bank rate on the day you acquired them. Convert them years later at a better rate and Spain sees a gain, however ordinary the transfer felt.
The United States, of course, sees nothing at all in that transaction, because you disposed of your own functional currency. There is no US gain, and therefore no US tax for the Spanish tax to be credited against on that item. For the practical transfer side, and the evidence to keep when converting old dollar balances, see our companion section on the Spanish tax issue when moving dollars to euros.
This is not a reason for despair, and it is emphatically not a reason to start moving money around before someone competent has modelled it. It is a reason to know that a person straddling two currencies is not simply exposed to the exchange rate in the way described in our note on USD/EUR currency risk for retirees, where the rate decides how comfortably dollar income clears a euro threshold. That is the visible risk, and it is real. This is the invisible one: the rate can also create taxable events in both countries out of transactions you never thought of as transactions. Both belong in the same conversation, alongside what the US-Spain treaty does and does not do for a US citizen — whose savings clause, as ever, preserves the US right to tax its own citizens broadly as if the treaty were not there.
"But I never made any money"
Almost every client says a version of this, and it is a serious objection, not a complaint. If you borrow €500,000 and repay €500,000, in what sense have you had an accession to wealth?
It has been argued at that level, and it lost. The Quijano appellants raised the Sixteenth Amendment squarely, relying on Eisner v. Macomber and the definition of income in Commissioner v. Glenshaw Glass Co. — "instances of undeniable accessions to wealth, clearly realized, and over which the taxpayers have complete dominion". The court's answer was that to purchase property with a foreign currency necessarily places the individual US taxpayer "in a position to gain or lose from a change in the exchange rate", and that a resulting gain in dollars, the functional currency of the individual US taxpayer, "plainly qualifies as realized income, fully taxable under the Constitution".
The honest summary for a client is this. The constitutional argument is closed. The economic complaint is legitimate and permanent. The only thing left that anyone can actually control is the facts you create before the loan exists.
What actually changes the exposure
We are your immigration lawyers, not your US tax preparer, and the filing position on any of this belongs to a US adviser who signs the return. What we can do is make sure the mortgage is a decision instead of a default, because by the time you are at the notary the facts are already fixed. The questions worth asking early:
- Does the borrowing need to be in euros at all? The currency of the debt is what creates the exposure. Financing from dollar-denominated sources removes the section 165(c) problem entirely and replaces it with different questions. Neither answer is automatically right; the point is that this is a choice made once, at the beginning, and never again.
- What rate are you booking at, and do you have the evidence? Your dollar cost is set on the day you become the obligor. Years later someone must prove that rate, alongside the purchase-date rate for basis under Rev. Rul. 54-105, and — where the loan was drawn down, increased or refinanced — the rate for each tranche. Keep the deed, the drawdown records and the rate evidence with your tax papers, not in a drawer with the utility bills.
- When is the debt retired, and can that be a different year from the sale? Repayment is the event. If retirement of the loan and the sale of the house are both squeezed into one calendar year alongside your Spanish gain, that is a stacking decision worth looking at deliberately, in both countries, before it happens.
- Does the whole picture belong in one place? The mortgage sits with the visa, the purchase, the first Spanish tax year and the reporting layer — Modelo 720, wealth tax, and how your retirement income is taxed in Spain. A mortgage decision made in isolation from the residence calendar is the one that produces the surprise.
If you are still at the stage of deciding whether to buy at all, read this next to property and the non-lucrative visa, which explains why the purchase and the non-lucrative visa are two separate files that people constantly merge — and, if a US house is being sold to fund the Spanish one, our note on selling your US home after becoming a Spanish resident, where the timing question is the whole game. The same lesson — that the dollar follows the citizen rather than the address — turns up again in Spain's over-65 life annuity exemption, where a US excise tax reaches a Spanish insurance contract for no reason other than whose life it measures.
Frequently asked questions
Do I really owe US tax for repaying a euro mortgage in euros?
If the dollar has strengthened against the euro between the day you took on the loan and the day you repay it, the position under pre-section-988 law is that you have realised a gain, because in your functional currency you extinguished the liability for less than you took it on. Revenue Ruling 90-79 confirms that the mortgage is a separate transaction from the residence and that repayment is a closed, taxable transaction. Section 988 does not rescue you, because section 988(e)(1) switches the section off for personal transactions and leaves the older law in place. The computation and the filing position belong with your US tax adviser.
Can I offset the currency loss on my mortgage against the gain on my Spanish house?
That is precisely what the taxpayers attempted in Quijano v. United States, and the First Circuit refused. The borrowing and repayment are a separate transaction from the purchase and sale, so the two are not netted, and section 165(c) limits an individual's deductible losses to trade or business losses, losses in a transaction entered into for profit, and casualty losses. A mortgage on your own home is none of those, so the loss is simply non-deductible.
Does Spain tax this currency gain too?
No. For a Spanish tax resident there is no currency element in borrowing euros and repaying euros, because Spain computes in euros. The practical consequence is worse rather than better: because Spain does not tax this item, there is no Spanish tax on it to credit against the US charge, so the US tax stands alone.
Is there a small-amount exemption that covers me?
Section 988(e)(2) excludes gain from exchange-rate movement when an individual disposes of non-functional currency in a personal transaction, but only up to $200, and it is a cliff rather than an allowance: if the gain otherwise recognised on the transaction exceeds $200, the exclusion does not apply at all. It also addresses disposing of currency, which is a different computation from the gain on the debt. On a mortgage-sized number it is not a shelter.
Does it help that Spain is now my tax home?
Not in the way people expect. Section 988(a)(3)(B)(i)(I) does source currency gain by reference to the country of the individual's tax home, which for a Spain-resident retiree would point away from the United States. But section 988(e)(1) disapplies the preceding provisions of the section for personal transactions, and that includes the sourcing rule. The same subsection that spares you the statute's ordinary-income machinery removes its foreign-source rule. How to source the gain in that situation is a question for your US adviser.
What about the dollars in my US bank account?
That is the mirror image. Once you are a Spanish tax resident, the dollar is the foreign currency, and Spanish doctrine treats an exchange of currencies by an individual outside an economic activity as a capital gain or loss going into the savings base, measured against a euro acquisition value at the official rate on the day you acquired the currency. The United States sees nothing there, because you are disposing of your own functional currency.
Should I avoid a Spanish mortgage because of this?
No, and that is not the conclusion we draw. A euro mortgage can be the right answer for rate, cash flow, keeping a US portfolio invested, or estate reasons, and the currency exposure may move in your favour. The point is that the currency of the borrowing is a decision made once, at the beginning, with US tax consequences that outlive the loan. It deserves an hour of attention before signing, not a discovery years later.
Sources reviewed July 2026: 26 U.S.C. sections 165(a) and 165(c), 985(a) and 985(b)(1)(A), 988 (in particular subsections (a)(1), (a)(3), (c)(1)(B)(i), (d) and (e)) and 989(a), as published by the US Code; Revenue Ruling 90-79 and Revenue Ruling 54-105; Quijano v. United States, 93 F.3d 26 (1st Cir. 1996), including its quotation of H.R. Conf. Rep. No. 841, 99th Cong., 2d Sess. (Tax Reform Act of 1986), and Willard Helburn, Inc. v. Commissioner, 214 F.2d 815 (1st Cir. 1954); Commissioner v. Glenshaw Glass Co., 348 U.S. 426 (1955); Spanish IRPF (Ley 35/2006) rules on ganancias y pérdidas patrimoniales and the savings base, AEAT Manual práctico de Renta guidance on capital gains and on translating amounts originally expressed in a currency other than the euro at the official European Central Bank rate, and Dirección General de Tributos doctrine treating currency exchange outside an economic activity as a capital gain or loss. General information only, not legal, tax or investment advice, and not a US tax opinion. Exchange rates used in the example are illustrative. Your position depends on the exact loan terms, drawdown dates, rates, residence years and filing history, and must be confirmed with a Spanish asesor fiscal and a US tax adviser before you act.