Tax residency calculator for Spain (and 62 other countries)
Easy visual way to track whether you qualify as a tax resident based on the number of days spent in a country.
Just select days you were in the country on the calendar

Select days you were in 🇪🇸 Spain
Tax Residency Rules in Spain (in simple language)
You're a Spanish tax resident if you spend more than 183 days in Spain in a calendar year (occasional trips abroad still count toward Spain unless you can prove you're a resident elsewhere), or if the core of your economic activity is in Spain, or if your non-legally separated spouse and/or minor children usually live in Spain. If you move to a tax haven, Spain can still treat you as a tax resident for 4 more years.View Tax Law Source
