The Non-resident Income Tax is applied to non-resident natural persons in Spain if they own, lease or transfer Real Estate. Whenever you are required to pay taxes both in Spain and your country of residence, check the bilateral tax agreement list to avoid paying taxes twice.
Depending on how your property in Spain is used, you will be required to pay your Non-resident Income Tax in one way or another:
Taxation on non-residents using their property as a second home for recreational purposes and for a period shorter than 183 days in the calendar year.
When a property is uninhabited and unrented for longer periods of time, the Spanish Tax Agency taxes homeowners on said property. The tax rate applied on non-residents residing in another European country, Norway or Iceland is 19%, while 24% is taxed upon residents in other countries. You are required to file your taxes using Form 210 during the calendar year following the financial year.

Taxation on non-residents who rent their property:
You have to file your taxes every three months, using Form 210. This means that in April, July, October and January you will be granted up to 20 days to file your taxes of the previous quarter. Depending on your country of residence, you may be able to deduct expenses, which could mean a significant reduction of your property taxation in Spain. The tax rate applied is between 19% and 24%.
Taxation on non-residents for a property sale:
Non-residents who decide to sell their property in Spain are required to pay taxes at the rate of 19%. They have three months to do so