If you buy in Spain or Portugal without taking residency, this one rule governs your calendar.
How the counting works
Non-EU visitors can spend 90 days within any rolling 180-day window in the whole Schengen area combined. It is not “90 days per country” and not “90 days per calendar half”: every day you stand anywhere in Schengen counts against the same rolling window.
What it allows
The classic pattern: three months in your Spanish or Portuguese home, three months out, repeated. Done carefully that is half the year in the sun with no visa at all, which is exactly how many owners use it.
Where people get caught
Counting Schengen countries separately (a Paris weekend eats Spanish days), assuming the clock resets on a border run, and overstaying “just a week”, which can bring entry bans. Airlines and border systems now check automatically with the EES system logging entries and exits.
When to stop counting days
Wanting more than half the year is the signal to get residency: Spain’s non-lucrative or digital nomad visas, Portugal’s D7 or D8. Then the 90/180 maths disappears, and tax residency maths begins.