French tax residency: the 183-day rule and foyer
In France, you are tax resident if you meet any of the following: (1) your foyer (habitual home) is in France, (2) France is your main place of stay (présence en France), or (3) you carry on a professional activity in France (unless it is ancillary), or (4) your centre of economic interests is in France. In practice, more than 183 days in France in the year makes you resident. If your spouse and children live in France (foyer), you are generally considered French tax resident even if you spend most of the year abroad. So leaving French residency usually means moving your foyer and main stay out of France and not spending 183+ days there.
Spanish tax residency rules
In Spain, you are tax resident if you spend more than 183 days in the calendar year in Spanish territory (any fraction of a day counts), or if your centre of economic interests is in Spain. If your spouse or minor children usually live in Spain, the Spanish tax authority can treat you as resident even below 183 days (centre of vital interests). Spanish residents are taxed on worldwide income (up to 47% for personal income tax). Corporate tax is 25%. Capital gains on savings are taxed at 19–28% depending on the bracket.
France vs Spain: what to consider when moving
Many French citizens move to Barcelona, Valencia, or Madrid for lifestyle or lower cost of living. Tax-wise, Spain’s top income tax rate (47%) is close to France’s (45%); both tax worldwide income for residents. To be Spanish tax resident and not French, you need to break French residency: your foyer and main place of stay should be in Spain (or elsewhere), and you should not spend 183+ days in France. Spain and France have a double tax treaty, so you will not be taxed twice on the same income, but you must be clear about where you are resident. Keep evidence of where you live and where your family and economic interests are.