BMW 5er-Reihe G30/G31/F90 540i, 340 PS, 8-speed automatic, all-wheel drive (2017–2020)

Power
340 PS (250 kW)
Engine codes
B47D20B, B58B30C
Gearbox
8-speed automatic
Production years
2017–2020
Running cost per month
€672
Fuel
Petrol (98)
Median price
€29,988
Reliability
3/5
DIY
2/5

Research for this car

Known issues for this car

IssueAffectsTypical kmRepair costSource
530e high-voltage battery recall530e built 20 January to 18 September 2020Not statedNo confirmed priceGeneration guide
Diesel OBD software fault (recall)Four-cylinder diesel (520d, 525d), built 2016 to 2022Not statedNo confirmed priceGeneration guide
Oil lossEngine not named; firmenauto says it shows on the newest carsNot statedNo confirmed priceGeneration guide
iDrive, phone link and assistant faultsAll G30 and G31Not statedNo confirmed priceGeneration guide
Active bonnet faultsAll 5 SeriesNot statedNo confirmed priceGeneration guide
Panoramic roof and interior creaksCars with panoramic roofNot statedNo confirmed priceGeneration guide
EGR cooler leaks and recallB47D20A, B47D20B, B47C20B; recalled builds 2014-2020Not statedNo confirmed price; about one working dayEngine guide
Turbocharger damageAll B47 enginesOver 200,000 kmNot statedEngine guide
EGR valve cloggingAll B47 enginesNot statedNot statedEngine guide
Injector wearAll B47 engines150,000-200,000 kmNo confirmed priceEngine guide
DPF wearAll B47 enginesAbout 250,000 km (service life)Not statedEngine guide
Harsh, delayed or jerky shiftsAll 8HP cars, worst with old fluid60,000 to 120,000 km350 to 650 USD fluid service (US, 2026)Gearbox guide
Valve body and solenoid faultsAll 8HP cars100,000 to 200,000 km without fluid changes1,800 to 2,800 USD mechatronic exchange (US, 2026)Gearbox guide
Clutch packs and bushings wearAll 8HP cars, worst on first-generation 8HP45 and 8HP70Not statedNo confirmed priceGearbox guide
Torque converter shudderAll 8HP cars180,000 to 300,000 kmNo confirmed priceGearbox guide
Connector sleeve leakAll 8HP carsAbout 129,000 to 209,000 km700 to 1,500 USD sleeve seal repair (US, 2026)Gearbox guide
Oil pan, filter and cooler-line leaksAll 8HP carsFrom 150,000 kmNo confirmed price; the pan comes with the oil serviceGearbox guide

Before you buy this car

From the generation guide

  1. 530e battery recall. If the car is a 530e built from 20 January to 18 September 2020, ask the dealer for proof that the battery recall was done. Bad result: no record of the battery work. The battery can short circuit and catch fire.
  2. OBD software recall (diesel). Check the VIN for the OBD software recall covering cars built from 18 August 2016 to 28 February 2022. The workshop update is free and takes about an hour. Bad result: no update on record.
  3. Oil level. Check the oil on the dipstick when the engine is cold, and again after a drive. Ask for the record of oil top-ups. Bad result: oil added between services. No scanner is needed.
  4. iDrive and assistants. On a test drive, pair a phone, use the navigation and try the parking assist. A scanner reads stored faults. Bad result: screen dropouts, a phone that will not connect, or false tyre pressure warnings.
  5. Active bonnet. Drive for a while on a motorway. Bad result: a bonnet that trembles, or a bonnet warning on the dashboard.
  6. Panoramic roof and rear seat. Open and close the roof in cold weather and listen for creaks. Sit in the rear and check the seatbelt buckles and seat folding for rattles. Bad result: creaks, a roof that jams, or rattles on a cold start.
  7. Starter recall. Mostly facelift cars. For a car built from July 2020, check the VIN for KBA reference 16790R. Bad result: an open campaign. The fix is a starter replacement.

From the engine guide

  1. EGR recall (VIN check). Check the VIN for open BMW campaigns. Ask for proof that the EGR cooler was checked or replaced. Bad: an open EGR campaign, or no proof on a car built 2014-2020.
  2. Turbocharger (test drive). Ask where the car was driven. Turbo damage is reported mostly on cars used in low outside temperatures, where moisture in the clean-air pipe can freeze. Ask for turbo invoices. Bad: a turbo job with no paperwork. No scanner needed.
  3. Injectors (records). Ask for injector service records on any car above 150,000 km. Bad: no record at that mileage. No scanner needed.
  4. DPF (scanner). On any car above 250,000 km, check for DPF cleaning or replacement records. Bad: no records. A scanner shows stored DPF fault codes.
  5. EGR valve (records). Ask whether the EGR valve was cleaned or replaced. Bad: a car used mostly in heavy traffic with no record. No scanner needed.

From the gearbox guide

  1. Read the gearbox fault memory with a BMW-capable scanner. Bad result: pressure or solenoid codes such as 4F84, 4F87, P189C or P0748, or a past limp mode.
  2. Ask for fluid and filter invoices. Bad result: no fluid change by 80,000 to 120,000 km, or a change without an adaptation reset.
  3. Drive the car from cold and select Drive and Reverse. Bad result: a hard 1-2 shift, or a delay of 1-3 seconds before the gear engages.
  4. Drive 15 minutes in town, then under load. Bad result: jerky 2-3 shifts, flaring, slipping or a burnt smell.
  5. Hold a steady light throttle at low speed. Bad result: a shudder or vibration, which points to the torque converter lock-up clutch.
  6. Look under the car on a lift. Bad result: oil at the wiring connector on the case, on the plastic pan or on the cooler lines.

Running costs

Operational€265
Workshop€185
Fixed costs (tax, insurance)€222
Total per month€672
New-car depreciation (not included)€154

ADAC figures for 15,000 km a year over 60 months

Market

Listings on mobile.de in this generation with this fuel, gearbox and power.

Find offers on mobile.de

Listings
162
25th percentile
€25,990
Median price
€29,988
75th percentile
€33,999
Median mileage
125,000 km
Median first registration
2018
Dealer share
59.9%

Check a listing

Prices by first registration

First registrationListingsMedian priceMedian mileage
20211––
20208€37,10097,565 km
201938€33,79096,930 km
201862€29,840125,000 km
201753€26,500158,800 km

Medians only for years with at least 5 listings. Many cars are first registered after production ends, so years can run past the build years.

Price history

MonthListingsMedian priceMiddle halfMedian mileage
Nov 2026162€29,988€25,990 – €33,999125,000 km
Oct 2026162€29,988€25,990 – €33,999125,000 km

Median asking price at the last snapshot of each month.

ADAC versions

All 24 ADAC versions
VersionPowerBodyDoorsProduction yearsRunning cost per month
540i xDrive Steptronic340 PSSaloon42017–2018€615
540i Sport Line xDrive Steptronic340 PSSaloon42017–2018€637
540i Luxury Line xDrive Steptronic340 PSSaloon42017–2018€637
540i M Sportpaket xDrive Steptronic340 PSSaloon42017–2018€676
540i xDrive Steptronic340 PSSaloon42018–2019€677
540i Sport Line xDrive Steptronic340 PSSaloon42018–2019€706
540i Luxury Line xDrive Steptronic340 PSSaloon42018–2019€706
540i M Sportpaket xDrive Steptronic340 PSSaloon42018–2019€743
540i xDrive Steptronic340 PSSaloon42019–2020€655
540i Sport Line xDrive Steptronic340 PSSaloon42019–2020€677
540i Luxury Line xDrive Steptronic340 PSSaloon42019–2020€677
540i M Sportpaket xDrive Steptronic340 PSSaloon42019–2020€707
540i Touring xDrive Steptronic340 PSEstate52017–2018€608
540i Touring Sport Line xDrive Steptronic340 PSEstate52017–2018€630
540i Touring Luxury Line xDrive Steptronic340 PSEstate52017–2018€630
540i Touring M Sportpaket xDrive Steptronic340 PSEstate52017–2018€667
540i Touring xDrive Steptronic340 PSEstate52018–2019€671
540i Touring Sport Line xDrive Steptronic340 PSEstate52018–2019€702
540i Touring Luxury Line xDrive Steptronic340 PSEstate52018–2019€703
540i Touring M Sportpaket xDrive Steptronic340 PSEstate52018–2019€736
540i Touring xDrive Steptronic340 PSEstate52019–2020€648
540i Touring Sport Line xDrive Steptronic340 PSEstate52019–2020€670
540i Touring Luxury Line xDrive Steptronic340 PSEstate52019–2020€670
540i Touring M Sportpaket xDrive Steptronic340 PSEstate52019–2020€700