In order to answer this question we are going to use the 90-day rule. This rule simply states that you can live in Spain without residency for a maximum of 90 days. After those 3 months, you need to either obtain a residence permit, or leave the country.