Before you buy, it is important to bear in mind that any purchase agreement you make will involve taxes, so it is a good idea to find out ahead of time how much you will have to pay. The price appearing in the purchase agreement will be the base on which taxes are calculated, although if the price is lower than the property’s real value, the tax authorities will make out a complementary assessment to cover the difference.
The taxes you have to pay will depend on whether you are buying a new home straight from the promoter or a second-hand home.
Buying a new home:
As a buyer, you must pay value added tax (VAT) to the seller, and if the home is in the Canary Islands, you must pay the indirect tax for the Canary Islands. This tax you pay to the seller, together with the price of the home.
As the buyer, you also have to pay stamp duty to your autonomous community (region), which is between 0.3 (only for special legally protected cases) and 2% of the selling price appearing in the deed. To pay this tax, you have to fill out an official self-assessment form and deposit the tax into the Exchequer’s account at a participating financial institution.
Buying a second-hand home:
When you are buying a second-hand home from its owner, you do not pay value added tax (VAT), but you do pay transfer tax to the autonomous community where the home is located; just fill out the official self-assessment form and deposit the tax into the Exchequer’s account at a participating financial institution. Amount: This will be a percentage of the price, set by the autonomous community, and will range between 6 and 7%.
The mortgage loan deed.
Will be subject to stamp duties, which will range between 0.5 and 1% (depending on the autonomous community in question) of the total amount of the mortgage liability, that is, not the sum actually loaned to you, but the sum secured for the return of the principal, interest and foreclosure costs.
Deeds of novation, subrogation and cancellation of mortgage loans are exempt from taxes.
Lastly, bear in mind that if you buy low-income housing (viviendas de protección oficial, or VPO), the tax rates will generally be lower.
Source. How to buy a home in Spain