Capital Gains Tax in Costa Rica: What Foreign Investors Need to Know Before Selling
The capital gains tax in Costa Rica catches many foreign investors off guard — not because the rate is unreasonable, but because they learn about it too late. Selling real estate, transferring company shares, liquidating an investment, or restructuring a corporate group can all trigger a taxable event. Since the 2019 fiscal reform, Costa Rica taxes these gains as a matter of course, not exception. For anyone holding assets here, the time to understand this tax is before the transaction closes, not after.
- The general capital gains tax rate is 15% on the net gain (Art. 31 ter, Law 7092).
- Assets acquired before July 1, 2019 qualify for a one-time transitional rate of 2.25% on the total sale price — but only on the first sale after that date.
- Nonresident sellers face a 2.5% withholding on the gross sale price, with the buyer acting as withholding agent.
- Costa Rica taxes on a territorial basis: only gains from Costa Rican–source assets are subject to tax.
- Crypto gains have no specific tax ruling yet — the general habitualidad principle applies, and the treatment depends on the facts of each case.
Practice Area: Corporate & Tax Law
- What counts as a capital gain in Costa Rica?
- Tax rates: 15%, 2.25% and the nonresident withholding
- Real estate sales: what sellers and buyers need to know
- Shares, corporate reorganizations and M&A
- Crypto gains: what the law says (and what it doesn’t)
- The territoriality principle: what’s taxed and what isn’t
- Why tax planning matters before the sale, not after
- Frequently asked questions
What counts as a capital gain in Costa Rica?
Article 27 ter of the Income Tax Law (Law 7092) defines a capital gain as any increase in the value of a taxpayer’s assets that results from selling, transferring, or otherwise disposing of them. In plain terms: if you sell an asset for more than your adjusted cost basis, the difference is a taxable capital gain.
This applies to real estate, shares, ownership interests in companies, securities, contractual rights, and — as discussed below — potentially to crypto assets. The cost basis includes the original purchase price, plus documented improvements, minus any accumulated tax depreciation where applicable. If the result is negative, it is a capital loss that can, within certain limits, be carried forward to offset future gains in the same category.
An important distinction: if the seller engages in the activity on a habitual, public and frequent basis — the legal concept of habitualidad — the transaction may be reclassified from the capital gains regime to the business profits regime, which has different rates and rules. This matters most for developers, frequent property flippers, and professional traders.
Tax rates: 15%, 2.25% and the nonresident withholding
| Scenario | Rate | Tax base |
|---|---|---|
| General capital gains tax | 15% | Net gain (sale price minus cost basis) |
| Transitional rate (pre-July 2019 assets, first sale only) | 2.25% | Total sale price (not the gain) |
| Nonresident real estate withholding | 2.5% | Gross sale price (buyer withholds) |
The 15% rate (Art. 31 ter, Law 7092) applies to the net gain — what you actually made on the transaction after subtracting your cost basis. This is the standard rate for any capital asset sold in Costa Rica.
The 2.25% transitional rate (Art. 31 quater) is a one-time option available only for assets acquired before July 1, 2019 — the date the capital gains tax took effect under the 2019 tax reform (Law 9635). It applies to the total sale price, not just the gain, which can make it significantly more favorable for long-held properties with large built-up appreciation. Once the asset changes hands, though, any future buyer who resells will pay the standard 15%.
The 2.5% nonresident withholding (DGT Resolution MH-DGT-RES-0051-2025, effective October 2025) kicks in when the seller is not a Costa Rican tax resident. The buyer is legally required to withhold 2.5% of the gross sale price and remit it to the tax authority (Hacienda) via the TRIBU-CR platform within 15 calendar days after the month of the transaction. This withholding works as a prepayment — the nonresident seller can file a return to claim a refund if the actual tax bill is lower.
Real estate sales: what sellers and buyers need to know
Real estate transactions are the most common trigger for capital gains tax in Costa Rica, and also the area where the most mistakes happen. When a property changes hands, the notary public executing the deed has a direct role in the tax mechanics: the notary must verify the tax treatment of the transaction and, in the case of nonresident sellers, ensure the withholding is properly applied.
A few points that foreign property owners often overlook:
- Primary residence exemption: The sale of a taxpayer’s primary residence (vivienda habitual) is exempt from capital gains tax under certain conditions defined in the law. However, proving habitual residence as a foreigner involves specific documentation that should be prepared in advance.
- The 2.25% option requires a choice: If the property was acquired before July 2019, the seller must elect the transitional rate before the transaction closes. This is not automatic — it requires a deliberate decision and proper documentation in the deed.
- Holding structure matters: Whether the property is held directly or through a Costa Rican corporation (S.A. or S.R.L.) affects the tax analysis. In some cases, selling the shares of the holding company instead of the property itself may produce a different tax result — but this requires careful analysis of the specific facts.
Shares, corporate reorganizations and M&A
The capital gains regime applies to shares and ownership interests in any type of entity — including S.A. shares, S.R.L. membership quotas, and partnership interests. A straightforward share sale in a Costa Rican company, a merger, a spin-off, or a contribution of assets to a new entity can all trigger a taxable event.
There is a narrow exemption worth noting: gains on the sale of shares by a corporation engaged in a business activity are exempt to the extent that the gain corresponds to undistributed retained earnings that were already subject to the corporate income tax. In practice, this exemption is narrow and fact-dependent, and should not be assumed without professional review.
For M&A transactions, the capital gains analysis is often one piece of a larger puzzle that includes transfer pricing, withholding tax on cross-border payments, and the structuring of the acquisition itself. This is an area where legal and tax advice need to work in tandem from the start.
Crypto gains: what the law says (and what it doesn’t)
As of September 2026, there is no specific ruling from Costa Rica’s tax administration (the DGT) on how capital gains tax applies to cryptocurrency transactions. The general framework exists: if selling a crypto asset produces a gain and the transaction involves a Costa Rican–source asset, it falls within the standard capital gains rules. But what counts as “Costa Rican source” when we’re talking about crypto is far from clear, and the DGT has not weighed in on that question.
There is also the habitualidad question: a person who trades crypto occasionally may be in a different tax position than someone who does it as a regular business. In the latter case, the gains could be reclassified under the business profits regime — which carries its own rates and compliance obligations.
With Law 10961 bringing VASPs under AML regulation effective September 2026, and CONASSIF’s implementing regulations still pending, the tax treatment of crypto assets is an area that will almost certainly evolve. Before reporting a crypto transaction, it’s worth confirming the current position with our team.
The territoriality principle: what’s taxed and what isn’t
Costa Rica taxes income and capital gains on a territorial basis (Art. 1, Law 7092): only gains derived from assets located in, or connected to, Costa Rican territory are subject to tax. This is a key distinction from countries that tax worldwide income.
For a foreign investor, this means that gains on the sale of a Costa Rican property or a Costa Rican company are taxable — but gains on assets held outside Costa Rica (foreign stocks, overseas real estate, international investment portfolios) are generally not, even if the investor is physically present in Costa Rica at the time of the transaction. The practical boundary is not always obvious, particularly when Costa Rican entities hold assets abroad or when the corporate chain spans multiple jurisdictions.
Why tax planning matters before the sale, not after
The most common mistake we see is an investor who structures the deal, signs the purchase agreement, and only then asks about the tax hit. By that point, the tax treatment is largely locked in. Choosing between the 15% rate and the 2.25% option, deciding whether to sell shares or assets, documenting your cost basis, sorting out the withholding mechanics if you’re a nonresident — all of that needs to happen before closing, not after.
AG Legal’s tax and corporate team advises foreign investors, holding companies and corporate groups on the tax structuring of asset dispositions in Costa Rica — from the initial analysis through the filing of the corresponding return. If you’re planning a sale, a restructuring, or an exit, the earlier the tax conversation happens, the more options are available.
Frequently Asked Questions
- What is the capital gains tax rate in Costa Rica?
- The general rate is 15% on the net gain (sale price minus cost basis), as established by Article 31 ter of Law 7092. A transitional rate of 2.25% on the total sale price is available for assets acquired before July 1, 2019, applicable only on the first sale after that date.
- Do nonresidents pay capital gains tax in Costa Rica?
- Yes. Nonresident sellers of Costa Rican real estate are subject to a 2.5% withholding on the gross sale price, with the buyer acting as the withholding agent. The withholding functions as a prepayment — the actual tax liability may be lower depending on the adjusted cost basis.
- Is the sale of a primary residence exempt from capital gains tax?
- The law provides an exemption for the sale of a taxpayer’s habitual residence under certain conditions. For foreign residents, proving habitual residence requires specific documentation that should be prepared in advance of the sale.
- Are crypto gains taxable in Costa Rica?
- There is no specific DGT ruling on the capital gains treatment of crypto transactions. The general framework applies: if the gain involves a Costa Rican–source asset, it falls within the capital gains rules. The distinction between occasional and habitual trading also affects the applicable regime. This area is expected to evolve as crypto regulation takes effect under Law 10961.
- Can I sell the shares of my Costa Rican holding company instead of the property itself?
- In some cases, yes — and the tax result may differ. However, this depends on the specific facts, the corporate structure, and the buyer’s willingness to acquire shares rather than the underlying asset. Professional analysis is required before committing to either path.
- Does Costa Rica tax capital gains on foreign assets?
- Generally, no. Costa Rica applies the territoriality principle: only gains from assets located in or connected to Costa Rica are subject to capital gains tax. Gains on foreign stocks, overseas real estate, or international investment portfolios are generally outside the scope of Costa Rican taxation.
Planning a sale, restructuring, or exit in Costa Rica?
AG Legal’s tax and corporate team advises foreign investors and holding companies on capital gains structuring — before the transaction closes.
CONTACT AG LEGALRecommended reading
- Crypto Regulation in Costa Rica 2026: Law 10961 VASP — Full Guide
- Money Laundering in Costa Rica: Crypto and Real Estate
- Buying Property in Costa Rica: Legal Guide
This article is for informational purposes only and does not constitute legal or tax advice for any specific case. Tax rates, thresholds and interpretive rulings may change; always consult with a tax professional before making decisions based on this content. Rates and withholding rules described here reflect the law as of September 2026.