CiviqPass

When does the residence clock start? Student stays and absences, from the official texts

27 quotes from the Código Civil, the Reglamento, the Ministry of Justice and 7 court rulings, each with its source.

Date helper

Type the dates you know. The helper adds the period you pick to each date and measures the absences you list. It does not say a date is safe and it does not choose which date starts the count (section 2). Nothing you type is stored or sent.

Your first residence authorization

Fill in the dates you have and leave the others empty.

Absences from Spain (optional)

The helper counts both the first and the last day of an absence as days away.

Three points matter about the residence for Spanish nationality: when the count starts, whether time on a student authorization counts, and how long you can be away. This page quotes what the Código Civil, the Reglamento and court rulings say about each one, and marks where we found no text that decides. The date helper adds years to the dates you type. It stores and sends nothing.

Last checked: 20 October 2026. Check the official page: mjusticia.gob.es, nacionalidad por residencia.

CiviqPass is an independent service.

In short

What the texts say, in three lines

  • The count ends at the application: the Código Civil asks for residence that is legal, continuous and immediately before it.
  • The rulings we read do not count time under a student authorization (estancia por estudios) as legal residence.
  • No text we found sets a number of days or months of absence for nationality. The figures of six months at a time and ten months in five years appear in the Reglamento's articles on long-term residence.

Each line is quoted below with its source. A ruling decides one file, and the ones we cite are examples we found, not a survey of all case law.

1. What the Código Civil asks

On the residence, article 22.3 of the Código Civil says:

Código Civil, art. 22.3Official wordingEn todos los casos, la residencia habrá de ser legal, continuada e inmediatamente anterior a la petición.

The Ministry of Justice says the same on its procedure page.

mjusticia.gob.es, Nacionalidad española por residencia, página del trámiteOfficial wordingde forma legal, continuada e inmediatamente anterior a la petición, así como el cumplimiento de los requisitos de buena conducta cívica e integración.

Three requirements carry the rule: legal, continuous, immediately before the application. Article 22 does not mention studies, absences or a start date, and neither does the Ministry's page. What follows on those three points comes from other texts, and each line says which.

2. When does the clock start?

Two questions sit inside this one: on which day the count ends, and on which day it begins.

The count ends at the application. In 2015 the Supreme Court held, in the case before it, that the conditions for legal residence are assessed at the time of the petition, and that the time before the application is the one that matters for the requirement.

Tribunal Supremo, sentencia de 10 feb 2015 (ECLI:ES:TS:2015:368), recurso 3025/2012Official wordinglas condiciones, en relación con la residencia legal que impone el mencionado artículo 22 del Código Civil , han apreciarse conforme a lo que resulte al momento de la petición
Tribunal Supremo, sentencia de 10 feb 2015 (ECLI:ES:TS:2015:368), recurso 3025/2012Official wordingno ofrecen duda de cuando ha de apreciarse esa exigencia de la residencia, que no es el otro que el anterior a la solicitud

In 2016 the Audiencia Nacional counted a ten-year period to the date of the petition and not to the date the petition was ratified.

Audiencia Nacional, sentencia de 29 sep 2016 (ECLI:ES:AN:2016:3674), recurso 1224/2015Official wordinghay que estar para el cómputo del citado plazo de residencia legal y continuada de diez años a la fecha o momento de la petición y no al de la ratificación de la citada solicitud
In the 2015 case the Supreme Court resolved a choice between two dates in favour of the first, the day the applicant appeared and said they wanted to apply.
Tribunal Supremo, sentencia de 10 feb 2015 (ECLI:ES:TS:2015:368), recurso 3025/2012Official wordingcuya disyuntiva ha de resolverse en favor del primero de los susodichos hitos temporales pues ya entonces (el 18-10-2007) el interesado compareció expresando su voluntad de solicitar la nacionalidad

Where the count begins is a different question. Article 47.4 of the Reglamento lists the situations of residence, and one of them is holding a residence visa or a residence authorization during its validity.

Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 47.4Official wordingSe encontrarán en situación de residencia quienes se encuentren en España en alguno de los siguientes supuestos:
Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 47.4.bOfficial wordingLa persona titular de un visado de residencia o de una autorización de residencia, durante su periodo de vigencia.
In 2025 the Audiencia Nacional wrote that legal residence is acquired by obtaining the residence permit that fits the person's situation.
Audiencia Nacional, sentencia de 7 oct 2025 (ECLI:ES:AN:2025:4254), recurso 2514/2021Official wordingla residencia legal a la que se refiere el artículo 22 CC se adquiere por la obtención del permiso de residencia que corresponda a la situación personal del extranjero interesado

No rule we found says which date starts the count. The day you applied for the permit, the day it was granted and the day the card was issued can all differ. In the Audiencia Nacional ruling of 29 September 2016, the applicant did not dispute that the period ran from the day the first residence authorization was applied for, and the court did not rule on that point.

Audiencia Nacional, sentencia de 29 sep 2016 (ECLI:ES:AN:2016:3674), recurso 1224/2015Official wordingLa parte actora no cuestiona que el plazo de residencia legal exigible sea de 10 años
Audiencia Nacional, sentencia de 29 sep 2016 (ECLI:ES:AN:2016:3674), recurso 1224/2015Official wordingni tampoco que el citado plazo deba computarse (dies a quo) desde el 4 de mayo de 2004, que es cuando se solicitó la primera autorización de residencia
The date helper at the top of this page shows the result for each date you type, so you can see how far apart they fall.

3. Which stays count?

Spanish immigration rules separate a stay from residence. The Reglamento lists the situations a foreigner can be in.

Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 47.1Official wordingLas personas extranjeras podrán encontrarse en España en las situaciones de estancia de corta duración, de estancia de larga duración, de residencia o de tránsito aeroportuario.

The Reglamento lists a student authorization as a long-stay situation, separate from residence.

Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 47.3Official wordingSe encontrará en situación de estancia de larga duración la persona titular de un visado o de una autorización de estancia por estudios, movilidad de alumnos, servicios de voluntariado o actividades formativas, durante su periodo de vigencia.
Temporary residence is defined on its own.
Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 60.1Official wordingSe halla en la situación de residencia temporal la persona extranjera que se encuentre autorizada a permanecer en España por un periodo superior a noventa días naturales e inferior a cinco años

In the rulings we read, courts refused to count time under a student authorization for nationality. Three of them, from 2009 to 2025:

Time under a student authorization was not counted in these rulings. Each one decides the file in front of it. Article 22 does not mention studies and the Ministry's page does not either.

Another permit does count student time, in part. For long-term residence (residencia de larga duración-UE) the Reglamento counts stays for studies at 50% of their total length.

Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 176.a (residencia de larga duración-UE)Official wordingSe computarán, a los efectos previstos en los párrafos anteriores, los periodos de permanencia en situación de estancia por estudios, movilidad de alumnos, servicios de voluntariado o actividades formativas, en el 50 % de la duración total de los mismos
The sentence goes on with a condition: read it in full on the BOE page. In 2025 the Audiencia Nacional said this count serves the long-term permit and has no projection on other rights.
Audiencia Nacional, sentencia de 7 oct 2025 (ECLI:ES:AN:2025:4254), recurso 2514/2021Official wordingEste cómputo es apto para obtener la residencia de larga duración, sin proyección en otros derechos
We found no text that applies it to nationality.

4. Absences

For nationality, no text we found gives a number of days or months. Article 22 asks for continuous residence and says nothing more about leaving Spain. The courts decide file by file.

In 2010 the Supreme Court tied continuity to where a person has their home and their ties.

Tribunal Supremo, sentencia de 9 jun 2010 (ECLI:ES:TS:2010:3220), recurso 3622/2006Official wordingla efectividad y continuidad de la residencia deriva de la fijación del domicilio en España y la vinculación al territorio en cuanto al medio de vida
It added that having to stay abroad for work or study does not undo that, as long as the tie to the territory is not broken.
Tribunal Supremo, sentencia de 9 jun 2010 (ECLI:ES:TS:2010:3220), recurso 3622/2006Official wordingno se desvirtúa por el hecho de que, sin desvincularse tal relación con el territorio, haya de permanecer en el extranjero por razones de trabajo o estudios

In May 2026 the Audiencia Nacional wrote that, in principle, leaving Spain does not automatically interrupt continuous residence, provided the absences are not prolonged, repeated or incompatible with effective residence.

Audiencia Nacional, sentencia de 19 may 2026 (ECLI:ES:AN:2026:1970), recurso 1647/2022Official wordingEn principio las salidas de España no interrumpen automáticamente la residencia continuada, siempre que no sean prolongadas, reiteradas o incompatibles con la residencia efectiva
It also says it is necessary to assess whether the absences are justified.
Audiencia Nacional, sentencia de 19 may 2026 (ECLI:ES:AN:2026:1970), recurso 1647/2022Official wordingTambién es necesario valorar en su caso de ausencias si están se encuentran justificadas

You have to prove that you meet the residence requirement.

Orden JUS/1625/2016, art. 7.2Official wordingcorresponde al interesado probar el cumplimiento de los requisitos de residencia, buena conducta e integración en la sociedad española

Six months at a time and ten months in total over five years appear in the Reglamento, in the articles on long-term residence.

Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 176.a (residencia de larga duración-UE)Official wordingLa continuidad no quedará afectada por ausencias del territorio español de hasta seis meses continuados, siempre que la suma de éstas no supere el total de diez meses dentro del periodo de permanencia de cinco años exigible
Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 183.2 (residencia de larga duración nacional)Official wordingno quedará afectada por ausencias del territorio español de hasta seis meses continuados, siempre que la suma de éstas no supere el total de diez meses dentro de los cinco años referidos en el apartado 1
For absences for work reasons, article 176 says continuity is not affected by absences of up to six months at a time, provided the total does not exceed eighteen months.
Real Decreto 1155/2024 (Reglamento de la Ley Orgánica 4/2000), art. 176.a (residencia de larga duración-UE)Official wordingEn caso de ausencias por motivos laborales, la continuidad de la residencia no quedará afectada por ausencias del territorio español de hasta seis meses continuados, siempre que la suma de éstas no supere el total de dieciocho meses

Those figures are written for other permits. No text we found applies them to nationality, and the rulings above give no threshold. The helper compares your absences with them for reference only.

5. Open points: where we found no text

On these points, ask the Ministry of Justice about your file, or a licensed lawyer. How we looked: we read the Código Civil, the Reglamento, the Ministry's procedure page and seven rulings published on the official CENDOJ site. The rulings are examples we found, not a survey of all case law.

The nationality file, step by step

How many years, which exams?

How much does it cost? Fees, exams and a total for your route

Filing online: the second surname field, Cl@ve and the 16 steps of the Ministry's form

Explanation written with AI from the official source cited on this page.

CiviqPass is an independent service. Built from the texts linked beside each line; rules change, so confirm on the official page.