The best time to plan for capital gains tax in Mexico is the day you buy, not the day you sell. Foreign owners who ignore this routinely hand back 20% to 35% of their gain to the Mexican treasury on exit — money that, with the right structure and documentation, could have been legally reduced or eliminated. Here is how the tax actually works and where the levers are.
What tax you are actually paying
Capital gains on Mexican real estate are taxed under ISR (Impuesto Sobre la Renta), the federal income tax. There is no separate “capital gains tax” statute; the gain from a property sale is simply income, and the notary handling the sale is legally required to calculate and withhold the tax before releasing funds to the seller.
For individuals, two methods can apply:
- A flat withholding of ~25% on the gross sale price, or
- A progressive rate on the net gain, which can climb to a marginal 35%.
The notary generally applies whichever the law requires for your situation; a good notary and tax advisor will run both to confirm the lower legal outcome.
How the taxable gain is calculated
The gain is not simply “sale price minus what you paid.” Mexican law lets you adjust your cost basis for inflation and deduct specific documented items:
- The inflation-adjusted acquisition cost (your original price indexed by the official inflation factor over your holding period).
- Notary and acquisition costs you paid when buying (ISAI, notary fees).
- Capital improvements — but only if backed by proper facturas (official CFDI tax invoices).
- Real estate commission on the sale.
This is the single most important sentence in this article: improvements and costs only reduce your tax if you have the official factura. Cash paid to a contractor with no invoice is invisible to the tax authority and buys you nothing at sale.
The primary-residence exemption
This is the big one for foreign residents. If the property is your primary residence (casa habitación), Mexican law provides an exemption of up to roughly 700,000 UDIs — approximately $4.5 to $5 million MXN (around $250,000 to $270,000 USD at current rates). Gain above that ceiling is taxed normally.
To claim it you generally must prove residence, and the conditions have tightened:
- You must demonstrate the home was your residence, typically via utility bills, bank statements, or voter/immigration documents in your name at that address.
- The exemption can generally be used only once every three years.
- Non-residents for tax purposes and pure investment properties do not qualify.
Many foreigners assume they automatically qualify because they “live there part of the year.” They often do not. Qualifying usually requires being a Mexican tax resident with an RFC (tax ID) and documentation, which takes deliberate planning.
Residency status changes everything
Your Mexican tax residency — not your immigration visa alone — drives the outcome. A tax resident can access the primary-residence exemption and progressive-rate calculations. A non-resident is more likely to face flat-rate withholding with fewer deductions. Establishing the right status before you sell, ideally when you buy, is where the real savings live.
A worked example
You bought for $300,000 USD and sell six years later for $450,000 USD, a $150,000 nominal gain.
- Without planning (investment property, non-resident, poor documentation): flat withholding near $112,500 USD (25% of gross), or roughly $40,000-52,000 on the net gain at progressive rates — and no exemption.
- With planning (tax resident, primary residence, indexed basis, all improvements invoiced): the inflation adjustment shrinks the taxable gain, and the primary-residence exemption can eliminate the tax entirely if the remaining gain sits under the UDI ceiling.
Same property. The difference between the two outcomes is documentation and status, not luck.
Common traps
- Under-declaring the purchase price to save on acquisition tax when you buy. It feels clever, then it inflates your taxable gain years later and can cost you far more.
- Losing your facturas for renovations. No invoice, no deduction.
- Selling in a year you already used the exemption within the three-year window.
- Assuming your home-country tax treaty erases the Mexican tax. The US-Mexico treaty relieves double taxation via foreign tax credits, but Mexico taxes the gain first; you still file and pay there.
How we help
Capital gains planning is a buy-day decision, and that is exactly where our Cross-Border Tax Desk starts. We model your projected exit tax before you ever make an offer, set you up to preserve every legal deduction — declaring full purchase price, capturing facturas, structuring for the primary-residence exemption where it fits your life — and introduce you to verified Mexican notaries and cross-border tax advisors who coordinate the Mexican withholding with your home-country filing so you are never taxed twice. We represent the buyer and, later, the seller — never a listing. The goal is simple: keep the gain you earned.