Cuánto dura
ES

Methodology

How we calculate how long a car lasts

We use the same method demographers use to calculate a country's life expectancy: a period life table. Here we explain each step, the decisions we have taken and what these data cannot tell us.

Current period: November 2025 to October 2026 · reference fleet: April 2026 · current fleet: September 2026

1. The data

Everything comes from the public microdata of the Dirección General de Tráfico (DGT), Spain's traffic authority:

Each file is read in streaming mode, without decompressing it, and we store only aggregates. We check the reading against a reference figure: in September 2026 there are 46,126 de-registrations of passenger cars with a median age of 22.3 years (the reference figure we were given was 46,125; the difference is one record).

What counts as a car's ‘death’:

2. The period life table

For each group (all cars, one model, one fuel type…) and each age x in completed years:

m(x) = D(x) / P(x) q(x) = m(x) / (1 + m(x)/2) S(0) = 1, S(x+1) = S(x) · (1 − q(x))

From S we obtain the median life (the age at which S crosses 50 %, interpolating between years) and the percentage still registered at 10, 15, 20 and 25 years. The median for all passenger cars is currently 27.9 years.

Period is not generation. The curve describes how cars of each age are de-registered today. The 20-year part comes from cars registered 20 years ago, and the 5-year part from recent cars. It is the same as a country's life expectancy: it does not predict the future of anyone in particular; it summarises current conditions.

One consequence: the median age of the cars de-registered this year (23.7 years) is not the median life (27.9). The first depends on how many cars of each age there are; the second corrects for that.

3. Uncertainty and minimum thresholds for publication

4. The de-registration index

Comparing medians only works for models that already have many years behind them. For all the others we calculate a standardised index, like the standardised mortality ratio used by epidemiologists:

index = 100 · Σ D(x) / Σ P(x) · m_Spain(x)

It is the ratio between the model's observed de-registrations and those it would have if each of its cars were de-registered at the average rate for passenger cars of its age. 100 is the average; 80 means 20 % fewer de-registrations. The confidence interval uses Byar's approximation to the Poisson distribution. The same index is used for provinces, generations, engines and power bands.

5. Standardising brands and models

The model field in the DGT data is free text: ‘IBIZA 1.9 TDI 5P.’, ‘C220CDI’, ‘R. MEGANE’, ‘NUEVO C3 AIRCROSS PURE’. The same car is written in dozens of ways. We apply the same function to de-registrations and to the fleet, using catalogue tables that can be reviewed in the repository (pipeline/catalog):

  1. Cleaning: upper case, no accents, and any punctuation mark becomes a space.
  2. Brand equivalences: MERCEDES and MERCEDES BENZ are Mercedes-Benz; MINI cars registered as BMW are counted as MINI.
  3. Brand rules, applied in order: the first match gives the model and its segment. Variants without filler words (such as ‘NUEVO’, meaning ‘new’, or ‘N.’ and ‘R.’) are also tried, and variants with letters and digits separated (‘C220’ becomes ‘C 220’).
  4. Anything not in the catalogue is grouped by its first word, so that the long tail is treated the same in both sources, but only catalogue models have a page.

What we group and what we do not.

Models masked in the fleet

To protect privacy, the DGT replaces with ‘¡’ any model value that appears five times or fewer. Because the model is free text, this affects 27 % of passenger cars in the fleet. We do not discard them, because the denominator would be too small and models would appear to last less. Each masked car is allocated among the models of its own brand that resemble it, in proportion to the unmasked cars in its cell: first by type-approval type, year, fuel type, engine capacity and power; if there are not at least 10 donors, by year, engine and weight; and so on up to the brand. De-registrations are not masked. Each model's page shows what share of its fleet has been allocated in this way.

6. Breakdowns

7. What these data do not say

8. Updates and validation

Every month an automatic process downloads the new de-registrations and fleet files, recalculates everything and validates it before publishing: it compares the total number of de-registrations, the national median life and that of the main models with the previous version. If something changes abnormally, it does not publish and alerts someone to review it by hand. The code is on GitHub, with reading tests on real lines and formula tests on synthetic data with known results.