Projects Econometrics · Market

Does it pay to import a BMW from Germany?

Every used BMW listed in Germany and Spain, a model that predicts its price with a median error of 6.4%, and the full cost of importing each car.

Role
Author
Year
2026
Tools
Python · Scraping · scikit-learn · NumPy · Econometría · Canvas
Status
Finished · study with my own data

Read the full study (PDF, in Spanish)

DemoReal data · calculator and market in your browser

How to use it

Four tabs, with the study’s models running in your browser:

  • Calculator: choose series, engine, year, mileage and trim to see the price in each country, the breakdown of importing and the margin. Below, the car’s depreciation curve in both markets.
  • Market: 7,000 real listings, mileage against price, with each country’s trend line calculated from all listings: Germany in black, Spain in red. Choose a series (in brackets, how many listings it has) and hover over a point to see the car.
  • Key findings: six findings in charts: when importing pays by price, which series holds its value best, fuel in each country, how the two markets differ, German supply by series and what equipment is worth.
  • Where it pays: the segments (series, engine and age) with the highest and lowest margin, with their price in Spain, in Germany and in Germany with import costs, and how many cars back them in each country.

In Spain a used BMW is listed between 9% and 26% higher than the same car in Germany. But once transport, the roadworthiness inspection and registration tax are added, bringing it over costs almost the same on average as buying it here. This study does the maths car by car, with the whole market of both countries.

70,596
BMWs listed in Germany and Spain
6.4%
Median error when predicting the price of cars the model never saw
+9 to +26%
Price in Spain versus Germany, depending on the series
50%
Cars for sale in Spain that would be cheaper to import
§ 01

The project

The question is simple and very common: if used cars are cheaper in Germany, does it pay to buy there and register here? Answering it properly means comparing the same car in both countries, covering the whole market and adding up every real cost.

  • The whole market, not a sample. I downloaded every used BMW listed on AutoScout24 in Germany and Spain. The portal shows at most 200 pages per search, so the program splits the market by year of registration and, when needed, by price, until each block fits entirely.
  • Certified coverage. Each block stores a receipt with the number of pages the portal declares and the file’s fingerprint; empty blocks are checked twice. Result: 57,968 listings in Germany and 16,289 in Spain, with no gaps.
  • The same portal in both countries, with the same listing fields, so the comparison is fair.
  • A ten-page working paper with the data, the method, the tables by series and the limitations, linked above.
§ 02

The method

  1. Cleaning. Only used or nearly new cars, no damaged ones, with plausible price, mileage and age. 70,596 remain: 54,808 German and 15,788 Spanish, across 37 series and 225 engines.
  2. Hedonic model by series. For each series with enough data in both countries, a log regression with HC3 robust errors: age, mileage (with a squared term), power, fuel, gearbox, body and trim, and the Spanish premium, which can change with the car’s age.
  3. Predictive model. A gradient boosting model covering every series and engine. It is validated by groups: near-identical cars are never in training and test at the same time, so the model is never tested on listings it has already seen.
  4. The cost of importing, car by car. For each BMW for sale in Spain: its expected price here, minus the same car in Germany, minus €900 for transport, €650 for inspection, type approval and paperwork, and the registration tax according to its CO₂.
§ 03

Results

  • The model is accurate: median error of 6.4% (€2,475 on average) on cars it never saw, 84% less than predicting with the market median.
  • Spain is more expensive in every combustion series: from +8.6% for the 6 Series to +22.1% for the 1 Series and +25.5% for the Z4; +19.9% for the 3 Series. It is measured at each series’ typical age in Spain. The electric iX1 is the exception: it costs the same in both countries.
  • What each BMW for sale in Spain costs on average: €29,314 here, €26,067 for the same car in Germany and €29,308 brought from Germany (with €900 transport, €650 inspection and paperwork and €1,691 of tax on average).
  • That’s why importing doesn’t always pay. The median margin is +€15 and it pays off for 50% of cars: the decision depends on the specific car.
  • Where it does pay: 2 Series cars aged 3 to 6 (a median margin of €3,700 to €5,000 for the 220i and 220d), petrol 3 and 4 Series, and recent X2 and X4. The X5, M3 and M4, by contrast, are the worst candidates: the emissions-based tax wipes out the difference.
  • How a BMW depreciates: going from 80,000 to 90,000 km takes off between 2.2% and 4%, depending on the series; one more year of age, between 3% and 8%. The M cars (M2, M3, M4) barely lose value over time, while the electric iX1 loses 13%.

Tax assumptions. Spanish listings don’t publish CO₂, so the median for the same engine in German listings is used. The tax base is approximated with the expected price in Spain; the tax authority actually uses its own value tables. Cars under 6 months or 6,000 km are left out: they count as new and pay VAT in Spain. These are prudent estimates, not a tax assessment.

§ 04

More findings

  • Importing pays mostly for cheap cars. BMWs under €10,000 are listed 47.9% higher in Spain than in Germany, and bringing one over pays off in 67% of cases despite fixed costs. Between €20,000 and €30,000 it pays only in 38%, and above €80,000 registration tax (median €12,471) eats the difference.
  • Electric cars are valued lower in Spain. For the same car, an electric one is worth 16% less than an equivalent petrol car in Spain; in Germany, practically the same. That’s why importing an electric car pays in only 16% of cases, even though it is tax-exempt.
  • The M cars hold their value best. After five years, the M2 keeps 79.3% of its first-year value and the M3, 74.3%; the X2 and the electric iX1 stay around 55%.
  • Equipment matters: an automatic gearbox adds 10.5% to the price and the M Sport package 8.8%; the Touring is listed 10.6% below the saloon. Buying from a private seller isn’t cheaper.
  • Two different markets. Germany has 10.4 listings of the 5 Series for every one in Spain, and more supply in every series. The Spanish stock for sale is older (median age 5.5 years versus 4.6) and more diesel (57% versus 47%).
  • Negotiating matters as much as the country: two near-identical cars can differ by around ±9.8% in price in Spain, the same order as the average advantage of importing.
§ 05

What I take away

A price difference isn’t an opportunity until you subtract everything it costs to take advantage of it. The key wasn’t the algorithm: it was making sure the data were complete and that the calculation included every real cost, taxes too, before giving an answer.