Cédula de Habitabilidad and First Occupation Licence in Madrid: What They Are and Why You Need Them
Before you can move into a resale or newly built home in Madrid, Spanish law requires at least one habitability certificate from the town hall. This article explains, in plain English, what the Cédula de Habitabilidad and the Licencia de Primera Ocupación actually certify, when each applies, and how they fit into a purchase from abroad.
Who is behind this page. Sókerim is a Spanish real-estate agency (Lyrio Home Solutions, S.L.) with offices in the Madrid region and Alicante and a network of about 1,000 collaborating agencies across Spain. We help people who live abroad find, buy and manage property in Spain, in English, from the first search to the keys.
Two Certificates, One Purpose: Proving a Home Is Fit to Live In
If you are buying a home in Madrid from the United Kingdom, you will come across Spanish paperwork that has no exact equivalent back home. Two terms turn up again and again: the Cédula de Habitabilidad and the Licencia de Primera Ocupación. Both are issued by the town hall, both relate to whether a dwelling can legally be lived in, and both can affect how quickly you can move in, rent out the property, or connect utilities in your own name.
This guide sets out what each certificate actually proves, which one is likely to apply to a resale flat or a new-build home in Madrid, and where a buyer based abroad typically needs to ask for help. None of this replaces advice from a Spanish lawyer working on your behalf, but it should help you ask the right questions before you commit to a purchase.
Rules differ by region, so always confirm with a local lawyer or gestoría which certificate applies before signing anything in Madrid.
Buying in Madrid: what changes here
Madrid province is centred on the Spanish capital, an inland city with no coastline, drawing buyers focused on urban life, business connections or investment rather than beach lifestyle. Many buyers are professionals relocating for work, families using international schools, or investors targeting rental demand.
Madrid-Barajas is one of Spain's main international airports, offering extensive global connections. Property in the city centre is mostly apartments, while outer areas of the province offer houses and chalets, and demand stays fairly constant through the year rather than following a summer season.
Before deciding on a home in Madrid (province), it helps to see the place in numbers: population, asking prices, transport links and climate, each dated and sourced. Together they offer a realistic grounding for anyone weighing up Madrid (province) for a permanent home, a holiday base or a rental.
Residents and nationalities in Madrid (province)
According to the INE annual census, 7,113,886 people were registered as living in the whole of Madrid province on 1 January 2025. The count takes in every town and village across the province, not only its capital. The province of Madrid registers 1,181,319 residents of foreign nationality, about 17 out of every 100 people. That share is notable yet far from dominant, and it varies widely between towns within the province.
On 1 January 2025, the province of Madrid had just 10,938 British nationals on its register, a modest figure. Because registration only counts year-round residents, it leaves out second-home owners who spend part of the year in the province. The table below lists the largest foreign nationalities registered in Madrid (province) on 1 January 2025, among those INE publishes for every municipality.
| Nationality | 2025 | 2021 | Per 100 inhabitants |
|---|---|---|---|
| Colombia | 132,637 | 60,913 | 1.9 |
| Romania | 132,042 | 153,125 | 1.9 |
| Venezuela | 118,230 | 61,004 | 1.7 |
| Peru | 96,509 | 41,920 | 1.4 |
| Morocco | 73,616 | 77,850 | 1.0 |
| China | 64,734 | 58,414 | 0.9 |
| Ecuador | 36,046 | 33,613 | 0.5 |
| Ukraine | 26,557 | 22,430 | 0.4 |
| United Kingdom | 10,938 | 11,489 | 0.2 |
A further table sets out nationalities not broken down above, among them Germans, Italians, Dutch, Belgians and Scandinavians, registered throughout Madrid province. Unlike that earlier table, this one uses data from 1 January 2022, the latest edition with full nationality detail.
| Nationality | Registered residents |
|---|---|
| Italy | 43,464 |
| Portugal | 19,717 |
| Bulgaria | 18,293 |
| Poland | 13,045 |
| United States | 11,570 |
| Mexico | 8,567 |
| Germany | 8,252 |
| Chile | 5,144 |
Asking prices for homes in Madrid (province)
Of the 30,406 homes for sale across the province of Madrid in our price bank, the median works out at €3,930/m², with a median ticket of €354,000. That is higher than the €3,150/m² median across the 133 towns we track nationally. Prices vary considerably from one listing to the next, though the bulk of the market, its middle half, falls between €2,900 and €5,960 per square metre.
| Type of home | Median asking price per m² | Median asking price | Adverts |
|---|---|---|---|
| Flats and apartments | €4,060/m² | €350,000 | 28,078 |
| Houses and villas | €2,510/m² | €450,000 | 2,328 |
| All homes | €3,930/m² | €354,000 | 30,406 |
Taking €354,000 as the median asking price in Madrid (province), the resale transfer tax at 6 % amounts to about €21,200, and notary, land registry and gestoría costs add a further €4,200. The combined figure, close to €25,500, is what a buyer needs ready in savings, separate from any mortgage funds. The figures reflect asking prices in listings live on 2026-12-01, rather than prices actually paid. Final amounts are agreed through negotiation and vary with the state, location and orientation of each property.
To illustrate how varied property markets can be within a single province, this table compares the towns we monitor in Madrid by population, foreign residents per 100 inhabitants and median price per square metre.
| Place | Inhabitants | Foreign residents per 100 | Median asking price per m² |
|---|---|---|---|
| Madrid | 3,477,497 | 18.8 | €5,450/m² |
| Alcobendas | 123,222 | 17.3 | €4,170/m² |
| Las Rozas de Madrid | 99,579 | 9.3 | €4,110/m² |
| Pozuelo de Alarcón | 89,474 | 10.4 | €4,940/m² |
| Majadahonda | 73,662 | 11.9 | €4,800/m² |
| Boadilla del Monte | 66,319 | 9.0 | €3,930/m² |
Holiday lets and long-term rental in Madrid (province)
In 05/2026, INE's experimental estimate based on platform listings counted just 13,431 tourist homes in Madrid (province), with 51,387 bed places, roughly 2 per 1,000 residents. This low figure fits a market that is predominantly residential. According to the Ministry of Housing's reference system, the median rent for a flat in Madrid (province) under long-term contracts in 2024 was €800 a month, from 474,935 tax-declared rentals. It is a past figure for long-term lets, not a forecast or holiday-let income, and rents can rise or fall. Monthly rents for flats, drawn from the same official figures, cluster between €650 and €1,050 for the middle half of tenancies.
Getting to Madrid (province) and its climate
Madrid has a single commercial airport, Aeropuerto Adolfo Suárez Madrid-Barajas (MAD); depending on where exactly in the province your property is located, an airport in a neighbouring province may actually sit closer to your door. Because Madrid is where these climate figures were measured, other parts of the province, further inland, at higher altitude or on separate islands, can feel quite different. Winters are cold by Spanish standards: January averages 6.3 °C, with an overnight minimum around 2.7 °C, while August reaches a mean of 25.1 °C and a daily maximum near 31.3 °C. Heating and insulation become a real cost item rather than an afterthought. With about 421 mm of rain a year on roughly 59 days, rain is neither scarce nor abundant here. All figures are AEMET's official 1981-2010 normals for the Madrid, Retiro station, about 2 km away; expect small local variations, especially further inland or at higher elevation.
| Month | Mean °C | Avg. max °C | Avg. min °C | Rain (mm) |
|---|---|---|---|---|
| January | 6.3 | 9.8 | 2.7 | 33 |
| February | 7.9 | 12.0 | 3.7 | 34 |
| March | 11.2 | 16.3 | 6.2 | 25 |
| April | 12.9 | 18.2 | 7.7 | 45 |
| May | 16.7 | 22.2 | 11.3 | 50 |
| June | 22.2 | 28.2 | 16.1 | 21 |
| July | 25.6 | 32.1 | 19.0 | 12 |
| August | 25.1 | 31.3 | 18.8 | 10 |
| September | 20.9 | 26.4 | 15.4 | 22 |
| October | 15.1 | 19.4 | 10.7 | 60 |
| November | 9.9 | 13.5 | 6.3 | 58 |
| December | 6.9 | 10.0 | 3.6 | 51 |
75,999 home sales were registered in the province of Madrid in the twelve months to 09/2026, according to INE. A market of this size usually means more comparable sales and a wider choice of homes for buyers. Bear in mind that these numbers reflect the province of Madrid overall; they shift a great deal between towns and between individual properties. Let us know what you have in mind so we can look at your case.
Sources and dates of the figures: INE, Censo anual de población (2025-01-01); INE, Estadística del Padrón continuo (1 de enero de 2022), provincias (2022-01-01); our group's own price bank, asking prices in active adverts (2026-12-01); Ministerio de Vivienda y Agenda Urbana, SERPAVI (2024); INE, Medición del número de viviendas turísticas (05/2026); INE, Estadística de Transmisiones de Derechos de la Propiedad (09/2026); OpenStreetMap contributors (ODbL); rutas OSRM (2026-10-05); AEMET, valores climatológicos normales (1981-2010).
Purchase costs in Madrid
The transfer tax on a resale home is set by each Spanish region. In Madrid the general rate is 6 %, and on top of it come notary, land registry and gestoría (roughly one more percent). On a new build you pay 10 % VAT plus stamp duty instead of the transfer tax. This money is not lent by the bank.
| Item | On a price of 250 000 € | Set by |
|---|---|---|
| Transfer tax (6 %) | 15 000 € | The region |
| Notary, registry, gestoría | 3 000 € | Official fees |
| Approximate total | 18 000 € | About 7,2 % of the price |
What the Cédula de Habitabilidad Proves
The Cédula de Habitabilidad is a certificate issued by the town hall, or in some regions by the regional housing department, confirming that a dwelling meets the minimum conditions needed to be lived in: adequate ventilation and natural light, working sanitation, and a kitchen and bathroom that function properly. It says nothing about the quality of a renovation or its finishes, only that the basic conditions for occupation are met.
Not every autonomous community uses this document in the same way. In some areas it is a routine step before utility companies will connect water and electricity to a resale home; in others, including the Madrid region, town halls have largely replaced it with different paperwork tied to the First Occupation Licence described below. Your lawyer or gestoría will confirm exactly which document Madrid asks for before you commit to a purchase.
Ask early: requesting the right certificate can take several weeks, and utility companies in Madrid will not open a new contract without it.
The First Occupation Licence and New-Build Purchases
The Licencia de Primera Ocupación, or First Occupation Licence, is issued by the town hall once a newly built property, or one that has undergone major works, has been inspected and matches the approved building project. For new builds, the notary and the bank financing the purchase usually want to see this licence, or at least proof that it has been formally requested, before completion takes place.
If you are buying a property that our own renovation team has refurbished as part of a managed investment, the works are designed so that this paperwork can be obtained through the normal municipal process; we coordinate with the town hall and your lawyer throughout, but we cannot promise a date, since municipal timetables vary and sit outside our control.
NIE
Your Spanish tax number
You will need an NIE to be named on any licence application, sign the deed, and register utility contracts in your own name.
22 %
Typical renovation share
Across the 19 homes our group has bought, renovated and resold since 2022, the median renovation budget has represented 22% of the purchase price; works of this scale usually call for these licences to be checked or renewed.
90/180
Visits from the UK
As a UK citizen you can visit Spain for up to 90 days in any 180-day period without a visa, which is normally enough time for viewings, signing and dealing with paperwork.
10 %
New-build VAT
New-build homes carry 10% VAT plus stamp duty rather than transfer tax, and the First Occupation Licence is typically requested as part of the same paperwork trail.
How These Certificates Fit Into a Purchase From the UK
When you buy from the United Kingdom, these certificates usually surface at two points: before you sign the deed, when your lawyer checks that the property is registered correctly and all paperwork is in order, and again if you ever apply for a mortgage, since Spanish lenders such as those arranged through our partner Colibrí Finances want reassurance that the home is legally habitable before they commit any funds.
None of this paperwork replaces independent legal advice. A lawyer working on your behalf, separate from the seller's team, should review these certificates alongside the Land Registry extract, confirm there are no outstanding debts attached to the property, and explain in plain terms how any missing document might affect your timeline, since municipal processes in Spain can move slowly and are not something any agency, including ours, can speed up by itself.
| Document | Approx. time to obtain (weeks) | Who issues it |
|---|---|---|
| Cédula de Habitabilidad | 4 | Town hall or regional housing body |
| First Occupation Licence | 8 | Local town hall (Ayuntamiento) |
| Updated certificate after major works | 6 | Town hall |
- Ask your lawyer which certificate Madrid requires before you reserve the property.
- Keep a copy of the certificate with your deed; you will need it again when you sell.
- If you plan tourist rentals, check separately whether a rental licence applies, since it is a different document.
- If buying for renovation, confirm with your contractor that the finished works match the plans the town hall approved.
- Request these documents in writing and keep proof of the request, since town halls can take several weeks to reply.
- Keep digital and paper copies of every certificate; you may need them again if you later remortgage or add the property to a rental platform.
If you live in the United Kingdom
Spain is a relatively short flight away from most UK airports, making regular visits to a Spanish property straightforward for owners based in Britain. Many British buyers are drawn to Spain for its climate, coastal lifestyle and established expatriate communities. One practical point to bear in mind is that Spanish inheritance law differs from UK rules, so it is worth taking specific advice on how it may affect the property and one's estate. Currency movements between sterling and the euro can also affect the overall cost of purchase and ongoing expenses.
What a Spanish bank will usually ask you for
- Proof of income: recent P60 and payslips
- Last filed UK tax return (Self Assessment)
- Bank statements from the last three to six months
- Evidence of existing loans or mortgage commitments
- Valid passport or UK national identity document
Tax at home and in Spain
Spain and the United Kingdom have a double taxation agreement in place, and a local tax adviser should confirm how rental income or gains from Spanish property must be declared and reported to HMRC.
Staying in Spain
As the United Kingdom is no longer an EU member state, British citizens may stay in Spain for up to 90 days in any 180-day period without a visa, and must apply for a visa or residence permit for longer stays.
Since the United Kingdom uses the pound sterling (GBP) rather than the euro, buyers should factor in exchange-rate movements and currency conversion costs when paying for a property or transferring funds to Spain.
Frequently asked questions
Do I need the Cédula de Habitabilidad to get a mortgage in Madrid?
Most Spanish lenders, including those arranged through our partner Colibrí Finances, ask for proof that a home meets basic habitability standards before releasing funds. Whether that means the Cédula de Habitabilidad or another document from the town hall depends on Madrid; your lawyer should confirm the exact requirement before you sign any mortgage offer, since rules vary by region and by lender.
What happens if a resale home in Madrid does not have a valid certificate?
An expired or missing certificate does not automatically stop a sale, but it can delay connecting utilities in your name and may need to be renewed before you move in. Your lawyer can request it on your behalf during due diligence, and sellers often cover the cost of renewal since it is a standard part of preparing a property for sale.
Is the First Occupation Licence the same as a habitability certificate?
No. The First Occupation Licence confirms that a newly built or substantially renovated property matches the approved building project; the Cédula de Habitabilidad, where it applies, confirms ongoing habitability conditions for any dwelling, new or old. In many areas the two documents work together, and a lawyer familiar with Madrid can explain which one is relevant to your purchase.
Can Sókerim help me get these certificates as a buyer based in the UK?
We coordinate with your lawyer and the town hall throughout a purchase handled in English, and our own renovation team works with these requirements in mind on managed investment projects. We do not issue certificates ourselves, since that is a municipal process, but we make sure the right applications are filed and followed up on your behalf.
Will Brexit affect how long it takes to sort out this paperwork?
Brexit has not changed the municipal process for these certificates, but it does mean that as a UK citizen you are limited to 90 days in any 180-day period in Spain without a visa, so it is worth planning viewings, signing and any follow-up paperwork around that limit rather than assuming open-ended time in the country.