High Grade Real Estate
Back to Blog

The Capital gains tax in Costa Rica

September 24, 2025
The Capital gains tax in Costa Rica

The Capital Gains Tax in Costa Rica

Costa Rica's capital gains framework is one of the most consequential tax considerations for foreign property buyers, and it is also one of the most consistently misunderstood. The general rules are simpler than U.S. capital gains tax, but the exceptions, the non-resident withholding mechanism, and the one-time election available for older properties all create planning opportunities that buyers either capture or miss depending on the quality of advice they receive at the right time.

This article walks through what the Costa Rican capital gains tax actually is, who pays it, when, at what rate, and what specific elections and exemptions affect the calculation in 2026.

The headline rate: 15%, with one important alternative

Costa Rica taxes capital gains on real estate at 15% of the profit at the federal level. This was established under Income Tax Law (Law 7092) and remains the standard rate as of 2026. The 15% applies to the gain (sale price minus adjusted basis), not the gross sale proceeds — meaning improvements you have made to the property, certain transaction costs, and the original purchase price all reduce the taxable gain.

Per PwC's Costa Rica tax summary, there is a critical alternative election available for assets acquired before July 1, 2019. Sellers of pre-July-2019 assets may opt for a 2.25% tax rate on the sale price (not the gain) for the first sale of the asset under Law 9635. For sellers with significant appreciation since pre-2019 acquisition, this election can produce dramatic tax savings versus the standard 15%-of-gain calculation. The decision is one-time and irrevocable.

Worked example: a property bought in 2017 for $250,000 and sold in 2026 for $450,000. The gain is $200,000.

  • Standard calculation: 15% × $200,000 = $30,000 tax
  • Pre-2019 election: 2.25% × $450,000 = $10,125 tax

The election saves nearly $20,000 in this scenario. The election is only available for the first sale of the asset under Law 9635, which means a seller who already exercised the election on a different property must use the 15% calculation on this one. The decision is best made with current legal advice rather than as a default.

Non-resident withholding: a separate mechanism

For non-resident sellers, Costa Rica imposes a 2.5% withholding on the sale price at closing. The buyer is responsible for collecting this and remitting it to the tax authority. This is in addition to (not in lieu of) the seller's underlying capital gains liability — though the withheld amount can be credited toward final tax due.

Practical translation: if you are buying property from a non-resident seller, your attorney must ensure the 2.5% is properly withheld from the seller's proceeds at closing and remitted to the tax authority. Buyers who fail to do this can face personal liability for the unpaid tax. It is one of the specific items that distinguishes a competent attorney from a cheap one.

For non-resident sellers, the typical math: $450,000 sale price × 2.5% = $11,250 withheld at closing. The seller files a Costa Rican return showing the actual gain calculation; the withheld amount is credited; if the actual liability is higher, the seller pays the difference; if lower, they request a refund.

Primary residence exemption

If the property being sold was the seller's primary residence and they have lived in it for at least two years, capital gains tax may be exempt entirely. This mirrors similar provisions in U.S. and Canadian tax law and recognizes that selling a primary home is not an investment realization in the same sense as selling an investment property.

The two-year requirement is straightforward but specific:

  • Continuous primary residency, documented through utility bills, residency status, or other proof of habitual occupation.
  • Two years immediately preceding the sale, not an aggregate two years over a longer period.
  • One exemption per sale; cannot be combined with the 2.25% election.

For owner-occupier expats who are exiting Costa Rica, structuring around the two-year residency clock can save 15% of the gain in tax. The clock starts when you actually live in the property full-time, not when you closed on it. Snowbird or part-time residency typically does not qualify.

What counts as basis for the gain calculation

The taxable gain is sale price minus adjusted basis. Adjusted basis includes:

  • Original purchase price (documented in the recorded deed).
  • Closing costs and transfer tax paid at acquisition.
  • Capital improvements with documentation (new construction, additions, major renovations).
  • Selling costs (real estate commission, attorney fees, transfer tax paid by seller).

What does not count: routine maintenance, repairs, painting, landscaping. These are operating expenses, not capital improvements.

The discipline for owners is to keep documentation of capital improvements throughout the holding period. A 10-year-old receipt for a $40,000 pool addition saves $6,000 in tax at sale (15% × $40,000) — but only if the documentation exists. Most foreign owners underestimate this and lose deductions they could have claimed.

Timing the sale around the calendar

Costa Rica's tax year mirrors the calendar year. Sales occurring in different years interact differently with the seller's other taxable activity, and the timing of when capital gains are recognized can be planned.

For sellers who have other Costa Rican income (rental income, business income), grouping a property sale into a year with offsetting expenses can reduce overall tax burden. For sellers whose only Costa Rican taxable activity is the property sale, timing matters less but the year of sale still affects U.S. or Canadian foreign-tax-credit timing.

The 2.5% non-resident withholding happens at the closing date regardless of seller preference. Final tax filing happens by March 15 of the following year for individuals or December 15 for fiscal-year entities. Cross-border tax planning typically benefits from consultation 6–12 months ahead of an intended sale.

How this interacts with U.S. and Canadian tax obligations

U.S. citizens and green card holders are taxed worldwide on capital gains. Costa Rican tax paid is generally creditable against U.S. tax liability through the foreign tax credit, with limitations. The U.S. capital gains rates (0%, 15%, or 20% depending on income, plus 3.8% Net Investment Income Tax for higher earners) often exceed Costa Rica's 15% rate, meaning the Costa Rican tax fully credits and the buyer owes the difference to the IRS.

Canadian residents face a similar dynamic. Capital gains are 50% taxable at marginal rates (effective rate roughly 25% for most retirees). Costa Rican tax paid generally credits against Canadian liability through the Canadian foreign tax credit.

For both U.S. and Canadian sellers, the 2.25% pre-2019 election produces a U.S./Canadian foreign-tax-credit that is lower than the 15%-of-gain alternative would produce. This is rarely a problem because the U.S. and Canadian capital gains tax owed is also smaller in absolute terms, but cross-border tax modeling matters.

Scenario Costa Rica tax U.S. tax (top capital gains) Net effective rate
Resident, 2-year primary residence exemption 0% 15% 15% (no foreign tax to credit)
Resident, no exemption 15% of gain 15% (offset by foreign tax credit) ~15%
Non-resident, no special election 2.5% withheld + 15% of gain (less withholding credit) 15% (offset by FTC) ~15%
Pre-2019 asset, 2.25% election 2.25% of sale price 15% of gain ~15–18% (smaller foreign tax credit)

The 2.25% election under Law 9635 is the most consequential single tax decision for sellers of pre-July-2019 Costa Rican real estate. It cannot be undone, it can only be used once across all assets, and the optimal use case is a property with substantial appreciation from a pre-2019 basis. Sellers who do not actively make this election sometimes lose tens of thousands in unnecessary tax.

What buyers should care about during purchase

For a buyer, the seller's capital gains situation matters primarily because of the 2.5% non-resident withholding mechanism. Your attorney must:

  1. Verify the seller's residency status before closing.
  2. If non-resident, calculate and withhold 2.5% from the seller's proceeds at closing.
  3. Remit the withheld amount to the Dirección General de Tributación.
  4. Document the remittance for the seller's eventual tax filing.

Buyers should also document their basis carefully — the recorded purchase price will be the starting point for their own future capital gains calculation when they eventually sell. Some buyers in 2026 are deliberately making capital improvements with proper documentation in anticipation of structuring an eventual sale advantageously.

Common mistakes

  1. Not exercising the 2.25% election when it would save money. Sellers exit without realizing the option exists. Their attorney did not raise it because the option requires proactive election, not automatic application.
  2. Buyers failing to withhold 2.5% from non-resident sellers. The buyer becomes liable for the unpaid tax. This is the most common attorney-malpractice scenario in Costa Rican closings.
  3. Not documenting capital improvements for basis. Owners who renovate but lose receipts cannot deduct the renovation cost from their eventual gain calculation.
  4. Confusing primary-residence exemption requirements. Snowbirds assuming part-time residency qualifies. It does not. The two-year continuous full-time occupation is specific.
  5. Forgetting U.S. or Canadian reporting obligations. Costa Rican capital gains are taxable in both countries for U.S./Canadian sellers, with foreign tax credit available but only if properly claimed.

Sources