Free calculator
Spain 183-day rule
Add your stays in Spain. See your days in each calendar year, and how close you are to more than 183.
What the rule says
Spain treats you as tax resident for a calendar year if you spend more than 183 days in Spain in that year. So 183 days is still under the line; the 184th day crosses it.
Days are not the only test. You can also be resident if Spain is the main base of your business or economic interests, and Spain presumes you are resident if your spouse (not legally separated) and dependent children live there. Short trips away ("sporadic absences") can still count as days in Spain unless you can show you are tax resident in another country.
The Agencia Tributaria publishes the rules. A Spanish tax adviser can tell you how they apply to you.
Second homes and the 90/180 rule
If you hold a UK or other non-EU passport, the Schengen 90/180 rule usually limits you to 90 days in any 180 well before you reach 183 days in Spain. Count both at once with Schengen and 183 days together.