How to compute the gain on a property sale in Peru
Second-category Income Tax formula on capital gains when selling a property in Peru.
Selling a property in Peru means paying second-category Income Tax on the capital gain, with an effective rate of 5% on the profit. The key to not overpaying is correctly computing the updated cost basis and taking advantage of exemptions, mainly the casa habitación one.
Legal framework
The Income Tax Law (TUO approved by S.D. 179-2004-EF) and its regulation establish that gains on the sale of properties acquired from January 1, 2004 onwards are taxed as second-category income. The essential formula is:
Taxable gain = Sale price − Updated cost basis
The following is applied to that gain:
- 6.25% on net income (which equals 5% on gross income after the legal 20% deduction).
- In practice, 5% on the gain is paid as a final account payment.
Updated cost basis
The cost basis is composed of:
- Acquisition value per public deed.
- Embedded improvements documented with receipts and bancarized.
- Legitimate acquisition costs (notary, alcabala, commissions, SUNARP registry fees).
It is updated using SUNAT's Índice de Precios al por Mayor (IPM), from the month of acquisition or construction up to the month before the sale.
What's exempt
Casa habitación
If the property qualifies as casa habitación (owned for at least two years before the sale and not used for commercial purposes), the gain is exempt. If you have more than one property that qualifies, the exemption applies to the last one you acquired.
Properties acquired before January 1, 2004
Sales of properties acquired before that date are exempt, unless they involve habilitaciones, lots or construction for sale.
Donations and inherited properties (with conditions)
Transfer by inheritance generates no IR for the heir. When they later sell, they must use as cost basis the autoavalúo for the year in which the gratuitous transfer was generated, except for a more favorable rule.
Practical formula
Updated cost basis = Original cost × (IPM month before sale / IPM month of acquisition)
Taxable gain = Sale price − Updated cost − Updated improvements
IR to pay = Taxable gain × 5%
Step-by-step procedure
1. Gather documents
- Public deed of acquisition and of construction/improvements.
- Bank-channeled payment receipts.
- Historical HR and PU of the autoavalúo.
- IPM data for the relevant month (published by INEI/SUNAT).
2. Determine if exemption applies
If it's casa habitación, prepare evidence: utility receipts, DNI with the address, paid arbitrios.
3. Compute the updated cost basis
Using the IPM, bring the historical cost to soles of the month before sale. Add updated improvements.
4. Compute gain and account payment
Subtract the cost from the sale price. The gain is multiplied by 5%.
5. Pay before the deed
The notary requires the seller's IR payment certificate (PDT 1665 or virtual form) before raising the public deed. Without that payment, the operation isn't recorded at SUNARP.
6. Annual sworn declaration
The owner includes the operation in their annual sworn declaration of second-category income.
Example: apartment in Miraflores
- 2026 sale price: S/780,000.
- 2017 acquisition: S/420,000.
- IPM: update factor ≈ 1.42.
- Updated cost: S/596,400.
- Documented improvements (2019): S/35,000 → updated S/47,250.
- Total cost basis: S/643,650.
Taxable gain: 780,000 − 643,650 = S/136,350. IR to pay: S/6,818 (5%).
If the apartment qualified as casa habitación, that tax would be S/0.
Common errors
- Forgetting the IPM factor and using the nominal cost.
- Not keeping receipts for improvements (lost as a deduction).
- Failing to bank significant payments.
- Trying to apply the casa habitación exemption without meeting the two-year ownership requirement.
- Not checking whether the property was acquired before 2004 (would be exempt).
Differences vs. Alcabala and Predial
- Alcabala: paid by the buyer, not the seller. 3% on the value exceeding 10 UIT, taking the greater of price and adjusted autoavalúo.
- Impuesto Predial: annual, paid by the owner as of December 31 of each year. The municipality issues quarterly receipts or with discount for cash payment.
- Second-category IR: paid by the seller on the gain.
Cases where you should consult an accountant
- Properties built by the taxpayer themselves.
- Real estate developers selling for the first time (third-category income with IGV).
- Operations between related parties (relatives, related companies).
- Sales in installments or with dación en pago.
- Mixed-use properties (part residence, part office or commerce).
Want to know what your property is worth before selling it? Get a free Realio valuation in under a minute.