What Makes a BMW Cheap to Own?
The used car market is full of traps — low sticker prices that hide high running costs, and high-mileage cars priced as if brand new. This project uses T-SQL in Microsoft SQL Server to cut through the noise across 10,781 BMW listings, answering seven core questions about pricing, tax, depreciation, mileage, transmission, engine size, and fuel efficiency.
The central question: which BMW models offer the best value — not just at purchase, but over years of ownership?
Anomalies & Outliers
Before any analysis, the data was interrogated for anomalies — cars priced inconsistently with their age and mileage. Two queries surface the outliers:
A. Older Cars Priced Unusually High
SELECT TOP 20 model, [year], price FROM Bmw ORDER BY price DESC
B. Low Mileage Cars Priced Unusually Low
SELECT TOP 20 model, [year], price, mileage FROM Bmw ORDER BY mileage ASC
Low-mileage cars priced at the bottom of the market are candidates for further investigation — potential data errors, fleet vehicles, or genuine bargains worth isolating.
Cheapest Models to Own
Road tax is a recurring annual cost. Combined with purchase price, it gives a clearer picture of long-term ownership expense than price alone.
Average Tax by Model
SELECT model, AVG(tax) Tax FROM Bmw GROUP BY model ORDER BY Tax ASC
| Model | Avg Annual Tax | Verdict |
|---|---|---|
| i3 | £38 | Cheapest to tax — electric advantage |
| i8 | £80 | Hybrid efficiency reflected in tax |
| 1 Series | £109 | Lowest among petrol/diesel models |
| M3 | £326 | Performance tax premium |
| M6 | £508 | Most expensive to tax annually |
10-Year Ownership Cost
By multiplying annual tax by 10 and adding purchase price, a true long-term cost emerges:
SELECT TOP 20 model, [year], tax, price, (price + (tax * 10)) [Total Cost] FROM Bmw GROUP BY model, [year], tax, price ORDER BY [Total Cost]
Transmission Trends Over Time
Which transmission type dominates each year — and is that shifting over time? A subquery with RANK() isolates the most common transmission per year without guessing alphabetically.
SELECT [year], transmission AS [Highest Transmission], [Transmission Count] FROM ( SELECT [year], transmission, COUNT(transmission) [Transmission Count], RANK() OVER(PARTITION BY [year] ORDER BY COUNT(transmission) DESC) AS [Rank] FROM Bmw GROUP BY [year], transmission ) AS [Transmission Figures] WHERE [Rank] = 1 ORDER BY [year]
The same RANK logic is applied by model (section 4B) to find each model's most common transmission type — giving a cleaner answer than MAX(transmission), which returns the alphabetically last value rather than the most frequent.
Which Models Hold Their Value?
Depreciation is calculated by comparing the highest and lowest average prices per model across years — a subquery pattern that produces a single depreciation figure per model:
SELECT model, MIN(Avg_Price) AS Lowest_Price, MAX(Avg_Price) AS Highest_Price, MIN(Avg_Price) - MAX(Avg_Price) AS Total_Depreciation FROM ( SELECT model, [year], AVG(price) AS Avg_Price FROM Bmw GROUP BY model, [year] ) AS yearly_prices GROUP BY model ORDER BY Total_Depreciation ASC
Fastest Depreciating
2 Series loses the most value across its price range — followed by M4 (£73K) and 3 Series (£71K).
Best Value Retention
Z3 and i3 hold value best — depreciating only £11K across their full range on the used market.
Electric Advantage
i3 has the lowest annual tax at just £38 — and among the lowest depreciation. Best long-term value case.
Diesel vs Petrol vs Electric
Fuel type drives both running costs and resale value. The data shows a clear efficiency and tax hierarchy:
| Fuel Type | Avg Annual Tax | Avg MPG | Takeaway |
|---|---|---|---|
| Electric | £45 | 470.8 | Lowest tax, highest efficiency |
| Hybrid | £82 | 156.9 | Strong efficiency, moderate tax |
| Diesel | £120 | 57.8 | Best everyday fuel economy |
| Petrol | £161 | 42.9 | Higher tax, lower efficiency |
Diesel pays 25% less tax than petrol on average — a significant saving over multiple years. Electric and Hybrid models cut that further but come at a higher purchase price.
What the Data Reveals
Cheapest to Own Long-Term
The i3 wins on every ownership cost metric: lowest annual tax (£38), lowest depreciation, and highest fuel efficiency.
Diesel Beats Petrol on Cost
Diesel averages £41 less per year in road tax than petrol, and 15 more miles per gallon — a meaningful saving over 5–10 years.
M-Series: Buy for Fun, Not Value
M3 and M6 carry the highest tax burden and depreciate significantly. Best for performance buyers, not value-conscious ones.
Automatic Dominates
Automatic transmission is the most common type across nearly every model year — a trend that strengthens noticeably post-2010.
Project Files
View the full SQL script and raw dataset below. Upload your GitHub link once the repo is live.