Hardly anyone has a perfect working life. There's a gap year, a couple of years raising kids, a spell of unemployment that dragged on, or some cash-in-hand work "until something better came along". Each of those holes is a contribution gap (laguna de cotización), and when you retire someone will have to decide what to do with them.
The good news: Spain's system doesn't count them as zero. The less good news: it doesn't count them as if you'd been working either.
First: two different things people mix up
Your pension depends on two numbers:
- The regulatory base (base reguladora), an average of what you contributed in the last years of your working life. This is where gaps hurt, because they drag the average down. I explained it in more detail in what is the pension regulatory base.
- The percentage, which depends on your total years of contributions. With 15 years you get 50% of the regulatory base; for 100% you need 36 years and 6 months in 2026 (37 years from 2027).
A gap inside the calculation period lowers your regulatory base. Any gap, wherever it is, costs you years towards the percentage.
How gaps are filled
If you were an employee and there are months without contributions in the period used to calculate your regulatory base, Social Security "fills" them using the minimum contribution base:
- The first 48 months of gaps at 100% of the minimum base.
- The rest at 50%.
Since 1 January 2026, for women (and for men in some childcare-related cases) the rule is more generous while the gender gap in pensions stays above 5%: months 49 to 60 also at 100%, and months 61 to 84 at 80%. From month 85, it's back to 50%.
Important: self-employed workers don't get gap filling. If you contributed as self-employed and stopped, those months count as zero in your regulatory base. It's one of the least known differences and one of the most costly.
An example with numbers
Picture a female employee with 70 months of gaps within her calculation period and a minimum base of about €1,400.
- Under the old rule: 48 months × €1,400 + 22 months × €700 = €82,600.
- Under the 2026 rule: 60 months × €1,400 + 10 months × €1,120 = €95,200.
That's €12,600 more in the sum. Divided by the 350 used in the 25-year calculation, about €36 more a month of regulatory base, paid 14 times a year for life. Not life-changing, but not pocket change either.
The calculation period is changing too
From 2026 a second way of calculating the regulatory base is being phased in: using the last 29 years and dropping the 24 worst months, instead of the last 25 years with nothing dropped. During the transition, Social Security automatically applies whichever works out better for you. If your worst months are gaps (a long spell of unemployment late in your career, say), dropping them can make a real difference.
Gaps that count even though you weren't working
Some periods count as contributed even without a job:
- Contributory unemployment benefit: while you receive it, the public employment service contributes for you.
- The unemployment subsidy for over-52s, which contributes towards retirement.
- Childcare leave of absence (excedencia): the first three years count as contributed.
- Childbirth credit days: 112 days per child for those who don't have them covered by working.
Plugging gaps yourself
If you know you'll have a long period without contributions (moving abroad, caring for a relative, unemployment running out at 55), there's the special agreement with Social Security (convenio especial): you pay the contributions yourself to keep adding up. It isn't cheap, so do the maths: how much do you pay and how much does your pension rise? The retirement pension calculator helps estimate it, and the retirement viability calculator shows whether that plus your savings adds up.
My practical tip: download your employment history report (informe de vida laboral) once a year from the Social Security website. It takes two minutes and it's the easiest way to spot gaps you didn't know you had, like an employer that didn't register you for your first few months. Catch that in time and you can claim it.