---
title: "183-day residency calculator: Spain, UAE, Portugal | Borja Burguillos"
description: "Add your trips and count the days that decide tax residency in Spain, the UAE, Portugal and the US, with each country’s day test and the days you have left."
url: "https://borbur.net/tools/tax-residency-day-counter/"
language: "en"
author: "Borja Burguillos"
date_modified: "2026-11-15T13:30:00+04:00"
alternate_es: "https://borbur.net/es/herramientas/contador-dias-residencia-fiscal/"
---

Free tool · Moving abroad

# Tax residency day counter: have you passed 183 days?

By [Borja Burguillos](https://borbur.net/about/) · Updated 15 November 2026

## In short

Add the dates you spent in Spain, the UAE, Portugal or the United States and the counter applies each country’s day test. Spain treats you as resident if you spend more than 183 days there in a calendar year. The UAE counts 183 days in any 12 months, or 90 days if you also hold UAE residence and have a home or job there. Portugal counts more than 183 nights in any 12 months that start or end in the year. The United States uses a weighted three-year test. Days are not the only rule: Spain, the UAE and Portugal can also make you resident through your home, family or economic interests, whatever the count.

*Interactive calculator: open the page in a browser to use it.*

## Key facts

- **Spain:** More than 183 days in the calendar year; any day of presence counts in full
- **UAE:** 183 days in any 12 months, or 90 days with UAE residence plus a home or job there; part days count
- **Portugal:** More than 183 days in any 12 months starting or ending in the year; only days that include a night count
- **United States:** 31 days in the year and 183 weighted days over three years (this year, a third of last year, a sixth of the year before)
- **Other ways to be resident:** Spain: centre of economic interests or family; UAE: usual home and centre of interests; Portugal: a home kept as habitual residence
- **Two countries at once:** The tax treaty between them decides which one wins

## How it works

### 1. Add your trips

Choose the country and the dates you arrived and left. Add as many trips as you need, up to 40, including the two previous years if the United States matters to you.

### 2. Each country’s rule

Spain counts days in the calendar year; the UAE and Portugal look at any 12-month period; the United States weights three years.

### 3. Read the result

You see the days each country counts, whether its day test is met and, for Spain, how many days you have left this year.

## The rules it follows

Spain (article 9 of the income tax law): you are resident if you spend more than 183 days in Spain in a calendar year. Following the Central Economic-Administrative Court, a day of certified presence counts in full with no minimum hours, days between two certified stays can be presumed, and sporadic absences are added unless you prove tax residence elsewhere. The counter counts every day of each trip you enter, including the days you arrive and leave.

UAE (Cabinet Decision 85 of 2022 and Ministerial Decision 27 of 2023): resident if present for 183 days or more in a consecutive 12-month period, or 90 days or more if you are a UAE national, hold UAE residence or are a GCC national and also have a permanent place of residence or a job or business in the UAE. Any part of a day counts. The counter shows the busiest 12-month period that starts or ends in the year you choose.

Portugal (article 16 of the IRS code): resident if present for more than 183 days, consecutive or not, in any 12-month period starting or ending in the year, where a day counts only if it includes a night in Portugal. United States: the substantial presence test needs 31 days in the year and 183 days counting all of this year, a third of last year and a sixth of the year before; any part of a day counts. Exceptions such as transit, commuters from Canada or Mexico and exempt visa holders are not applied.

Moving between Spain and the UAE? Go deeper: [Beckham Law calculator](https://borbur.net/tools/beckham-law-calculator/) · [Take-home pay by country](https://borbur.net/tools/take-home-pay-by-country/) · [How pay works in the UAE](https://borbur.net/topics/uae-pay/)

## Go deeper in the book

Go deeper in the book

### [Why Bitcoin Had to Exist](https://borbur.net/books/why-bitcoin-had-to-exist/)

The story of broken money

[Buy in English](https://www.amazon.com/dp/B0GMX929H3) · [Buy in Spanish](https://www.amazon.es/dp/B0GNNYG5DD)

[About the book](https://borbur.net/books/why-bitcoin-had-to-exist/)

## Questions

How many days can I spend in Spain without becoming tax resident?

Up to 183 days in a calendar year by the day test. Spain can still treat you as resident if your main economic interests are in Spain or your spouse and minor children live there.

Do the days I arrive and leave count?

In Spain, the UAE and the United States, yes: any part of a day counts. In Portugal only days that include a night there count, so the day you leave does not.

Is the Spanish 183-day count per calendar year or any 12 months?

Per calendar year, from 1 January to 31 December. The UAE and Portugal look at any 12-month period instead.

How many days do I need in the UAE for a tax residency certificate?

183 days in a consecutive 12-month period, or 90 days if you hold UAE residence and have a permanent home or a job or business in the UAE. You can also qualify through your usual home and centre of interests.

What if two countries both say I am resident?

The tax treaty between them decides, usually by where you have a permanent home, then where your personal and economic ties are closest. Spain and the UAE have a tax treaty.

Does the counter store my trips?

No. Everything runs in your browser. The dates only appear in the page address if you copy the link to share your result.

## Sources

1. [Agencia Tributaria, Manual práctico IRPF 2025: residencia habitual en territorio español (art. 9 Ley 35/2006)](https://sede.agenciatributaria.gob.es/Sede/en_gb/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c02-irpf-cuestiones-generales/sujecion-irpf-aspectos-personales/residencia-habitual-territorio-espanol.html)
2. [Agencia Tributaria, TEAC defines how days of stay in Spain are counted (June 2023)](https://sede.agenciatributaria.gob.es/Sede/en_gb/informacion-institucional/puede-interesar/sobre-agencia-tributaria/2023/junio/9/teac-define-concepto-dias-permanencia-espana.html)
3. [EY, UAE issues additional guidance on determination of tax residency for individuals (Cabinet Decision 85 of 2022, Ministerial Decision 27 of 2023)](https://www.ey.com/en_gl/technical/tax-alerts/uae-issues-additional-guidance-on-determination-of-tax-residency)
4. [Portal das Finanças, Código do IRS, artigo 16.º (Residência)](https://info.portaldasfinancas.gov.pt/pt/informacao_fiscal/codigos_tributarios/cirs_rep/Pages/irs16.aspx)
5. [IRS, Substantial presence test](https://www.irs.gov/individuals/international-taxpayers/substantial-presence-test)
6. [IRS, Topic 851: Resident and nonresident aliens](https://www.irs.gov/taxtopics/tc851)

Updated: 15 November 2026

## More books

[Book**Why Bitcoin Had to Exist**The story of broken money](https://borbur.net/books/why-bitcoin-had-to-exist/) · [Book**Stablecoins for a Better World**Financial inclusion and social good](https://borbur.net/books/stablecoins-for-a-better-world/) · [Book**Beyond the Game**Web3 and the future of sports](https://borbur.net/books/beyond-the-game/) · [Coming soon**España, caballo ganador**Change the incentives and you change the country](https://borbur.net/books/espana-caballo-ganador/)

## [Borja Burguillos](https://borbur.net/about/)

Borja writes for people who want to understand money and incentives without the jargon. Born in Madrid and based in Dubai since 2012, he has advised companies on people and pay, built tech startups, and co-chairs the People & Organisation Committee at the Middle East Stablecoin Association.

WorldatWork Total Rewards and CAIA certified, CFA Investment Foundations, executive programmes at Wharton and IE Business School.

[X @Borbur](https://x.com/Borbur) · [LinkedIn](https://www.linkedin.com/in/borjaburguillos) · [Telegram](https://t.me/borbur) · [YouTube](https://www.youtube.com/@BorjaBurguillos)

---
Source: https://borbur.net/tools/tax-residency-day-counter/ · By Borja Burguillos (borbur.net). Index of all pages: https://borbur.net/llms.txt
