Worked example: sale for €300,000
Purchase price €200,000, eligible purchase costs €20,000, improvements €10,000 and selling costs €10,000 produce a €60,000 gain before exemptions.
| Seller route | Taxable gain | Estimated tax | Withholding / settlement |
|---|---|---|---|
| Spanish resident, no other savings income | €60,000 | €12,680 | No 3% non-resident withholding |
| Non-resident individual | €60,000 | €11,400 | €9,000 withheld; €2,400 estimated balance |
| Resident over 65, qualifying habitual residence | €0 | €0 | Full gain screened as exempt |
| Resident, qualifying full reinvestment | €0 | €0 | Subject to all habitual-residence conditions |
Step 1: calculate the gain
The transfer value generally starts with the sale price and subtracts eligible expenses and taxes paid by the seller. The acquisition value generally includes the purchase price, acquisition taxes and costs, and qualifying investments or improvements. Where depreciation was tax-deductible —notably for rented property— the acquisition value must reflect the deducted or minimum depreciation required by the rules.
Spanish tax residents
A resident individual normally includes the taxable gain in the savings base. The current combined scale is 19% on the first €6,000, 21% from €6,000 to €50,000, 23% from €50,000 to €200,000, 27% from €200,000 to €300,000 and 30% above €300,000. Other savings income and gains use the same base, so the calculator asks for them and estimates the incremental tax attributable to this sale.
Main-home exemption for residents
A gain on a qualifying habitual residence can be fully or partially exempt when the amount obtained is reinvested in another habitual residence within the statutory two-year window, which can include qualifying purchases in the two years before the sale. Partial reinvestment gives a proportional exemption. The calculator uses sale price less entered outstanding acquisition-mortgage principal as an indicative reinvestment denominator; the legal transfer value and every condition must be checked.
A resident aged 65 or older can generally exempt the gain on a qualifying habitual residence without reinvestment. For this purpose, the property may still qualify if it was the habitual residence at any point during the two years before sale. Split ownership, reserved usufruct and dependency cases require a closer legal review.
Non-resident sellers: 19% tax and 3% withholding
A non-resident individual generally pays 19% on the taxable gain from a Spanish property sale. Separately, the purchaser must withhold 3% of the agreed consideration and pay it using Form 211. The seller credits that withholding against the final Form 210 liability. If 3% exceeds the final tax, a refund may be claimed; if it is lower, the seller pays the balance.
Qualifying EU/EEA residents may have a reinvestment route for a former habitual residence in Spain, but that relief and its refund procedure are not applied by this simplified calculator. A double-tax treaty can also affect how the seller’s country of residence gives credit for Spanish tax.
Municipal plusvalía is separate
Capital gains tax is not the same as the local tax on the increase in urban land value. Municipal plusvalía depends on the cadastral land value, holding period and municipal rules. The multilingual property-sale calculator includes an indicative comparison of the local objective and actual-gain methods.
Common questions
Is the buyer's 3% withholding an extra tax?
No. It is a payment on account of the non-resident seller’s final liability. The actual gain is calculated separately and the withholding is credited against the result.
Can I subtract renovation costs?
Qualifying investments and improvements may increase acquisition value, but routine maintenance and repairs are not automatically capital improvements. Keep invoices, payment evidence and a clear description of the work.
Does the mortgage balance reduce the capital gain?
Not directly. The gain compares transfer and acquisition values. Outstanding acquisition debt is relevant to the amount obtained for the habitual-residence reinvestment test, not as a general deduction from the gain.
Do I pay tax if I sell at a loss?
The calculator produces no capital-gains tax when the adjusted result is zero or negative. Filing, loss-compensation, withholding refunds and municipal obligations may still apply.