If you have been living in Spain for six months (183 days) or more of the calendar year (not necessarily consecutively) or you have your main ‘vital’ interests in Spain (for example, your family or business is in Spain), then you are classed as a Spanish resident for tax purposes.
As a Spanish resident, you will need to submit a Spanish tax return and pay Spanish income tax, at progressive scale rates, on your worldwide income if:
your annual income from employment is over EUR 22,000;
you are self-employed or run your own business;
you receive rental income of over EUR 1,000 a year;
you have capital gains and savings income of more than EUR 1,600 a year
it is your first year declaring tax residency in Spain.