Home / Journal / Car model guides

Car model guides

BMW 540d (G30) engine: which one, problems and replacement

Which engine is in the BMW 540d G30? B57D30T and B57D30B: specs, known problems, swaps and replacement prices from 753,00 €.

BMW G07 X7 xDrive40d B57D30B Engine 2016, 195,200 km — photo 1

The BMW 540d in the seventh 5 Series generation (G30, built 2016–2023) was built with 2 different engines over its life: the B57D30T (320 hp, 2016–2020) and the B57D30B (340 hp, 2017–2026).

This guide tells you which engine your 540d has, what goes wrong with it, what a replacement costs from our stock and what else to plan for when you fit one.

  • Generation: seventh 5 Series, 2016–2023
  • Body styles: G30 (saloon)
  • Engines: B57D30T, B57D30B
  • Output: 320 hp and 340 hp
  • Replacement engines in stock: 258 from 753,00 €
BMW G05 X5 xDrive40d B57D30B Engine 2016, 41,300 km — photo 1
BMW G05 X5 xDrive40d B57D30B Engine 2016, 41,300 km — 5.803,00 €

Which engine is in your 540d?

Engines fitted to the BMW 540d (G30)
Engine codeBuiltPowerTorqueType
B57D30T2016–2020320 hp680 Nm3.0 L diesel inline-6, twin-turbo
B57D30B2017–2026340 hp700 Nm3.0 L diesel inline-6, turbocharged

B57D30T in the 540d

The B57D30T was used in the G30 540d, built 2016–2020. It is a 3.0 L twin-turbo diesel inline-6 with 320 hp and 680 Nm. Compared with the B57D30B (340 hp), it is the mildest.

Reading the code: B marks a B-series code, BMW's modular engine family introduced from 2013 with 500 cc per cylinder; 57 is the family number; D stands for diesel, longitudinal installation for rear-drive and xDrive cars; 30 is the capacity in decilitres, so 3.0 litres; T identifies the version or output stage.

B57D30B in the 540d

The B57D30B was used in the G30 540d, built 2017–2026. It is a 3.0 L turbocharged diesel inline-6 with 340 hp and 700 Nm. Compared with the B57D30T (320 hp), it is the strongest.

Reading the code: B marks a B-series code, BMW's modular engine family introduced from 2013 with 500 cc per cylinder; 57 is the family number; D stands for diesel, longitudinal installation for rear-drive and xDrive cars; 30 is the capacity in decilitres, so 3.0 litres; B identifies the version or output stage.

BMW G07 X7 xDrive40d B57D30B Engine 2017, 120,700 km — photo 1
BMW G07 X7 xDrive40d B57D30B Engine 2017, 120,700 km — 5.124,00 €

540d engines by model year

Which engine the BMW 540d used each year
Model yearEngine
2016B57D30T (320 hp)
2017B57D30T (320 hp), B57D30B (340 hp)
2018B57D30T (320 hp), B57D30B (340 hp)
2019B57D30T (320 hp), B57D30B (340 hp)
2020B57D30T (320 hp), B57D30B (340 hp)
2021B57D30B (340 hp)
2022B57D30B (340 hp)
2023B57D30B (340 hp)

The engine changed 2 times during the G30 run, in 2017 and 2021. Changes usually come with BMW's mid-life update (LCI) or a new emissions standard, so a car registered early in a year can still have the older engine. The VIN settles it.

Other cars with the same engine as the 540d

A replacement engine does not have to come from another 540d. These models left the factory with the same engine code, so a unit from any of them is a candidate donor once the sump, mounts and ancillaries are matched to your car.

B57D30T: BMW G11 740d, BMW G05 X5 40d.

B57D30B: BMW G05 X5 40d, BMW G11 740d.

How to confirm your engine code

Because the 540d used more than one engine, the badge alone does not tell you which one your car has. The build date is the first clue; the VIN is the proof. Send us the last seven characters of the VIN and we read the engine code from BMW's records, or look for the code stamped on the block. How to find your BMW engine code.

Known 540d engine problems

The B57D30T and B57D30B in the 540d share the known weak points of the B57 family. Full B57 guide.

Known faultWhat to check
EGR coolerCheck the recall status.
Diesel particulate filterRead the soot load.
Turbo actuatorsCheck for boost faults.

EGR cooler. BMW recalled some cars to replace the EGR cooler.

Diesel particulate filter. The DPF clogs on short-trip cars.

Turbo actuators. Turbo actuators stick on multi-turbo versions.

Symptoms to watch for on the 540d

Rattle for a few seconds after a cold start. The classic sign of a weak timing chain tensioner or stretched chain. It must be checked quickly: a chain that jumps a tooth can bend valves.

Rattle or whine from the gearbox end. On engines with the timing chain at the rear, a rattle or whine from the back of the engine is the warning sign of chain stretch or guide wear.

Whistle, loss of boost or limp mode. A split charge pipe, a sticking wastegate or worn turbo bearings. Check the pipes first, then the turbo shaft for play.

Black smoke under acceleration. Too much fuel for the air available: boost leaks, a sticking EGR valve, a dirty air mass meter or a leaking injector.

Hard starting when cold. Glow plugs or the glow plug control unit. On older diesels, also check the injection pump and fuel lines for air leaks.

Particulate filter warning. Short trips stop the DPF from regenerating. A long motorway run often clears it; a filter that keeps blocking may be covering an injector, EGR or turbo problem.

Looking after the 540d engine

  • Oil: 0W-30 or 5W-30 BMW Longlife-04, about 6.5 litres.
  • Service interval: Oil every 15,000 km or yearly.
  • Timing drive: Timing chain at the rear (gearbox end).
  • Workshop notes: Check the version (B57D30A, B, C or S) before ordering.

Buying a used engine for the 540d: checklist

  1. Ask how the donor car was damaged. Most good used engines come from cars with body damage. A front-end impact can crack sensors, the timing cover or the sump; a rear or side impact usually leaves the engine untouched. The yard records the damage on each unit.
  2. Confirm the exact engine code. Read the code stamped on the block and compare it with the code for your car. Send us the last seven characters of the VIN and we confirm the match before anything is paid.
  3. Compression or leak-down figures. Even compression across all cylinders tells you more than mileage. Ask for the figures, not just a pass or fail, and compare the highest and lowest readings: a spread above 10 to 15 percent deserves a question.
  4. Why your old engine failed. Before fitting a replacement, find out why the original failed. An overheating radiator, a blocked intercooler or a failed turbo can destroy a second engine if they are not fixed.
  5. List of what is fitted. Engines are sold with different ancillaries: some have the turbo, injectors, manifolds, alternator and starter, others are long blocks. Agree the list in writing so you know which parts must come from your old engine.
  6. Turbocharger shaft play and oil. Rotate the compressor wheel by hand. A small amount of side play is normal; in-and-out play or wheel contact with the housing is not. Oil pooled in the intake or intercooler pipes points to worn seals.
  7. Injector correction values. On a diesel that can be run before removal, the injector correction values show whether one injector is delivering more or less fuel than the others. Large deviations mean an injector is on its way out.
  8. Particulate filter and EGR history. Short-trip diesels clog their DPF and EGR systems. The engine may be fine, but ask whether the donor car had DPF warnings, and plan to clean or check your own filter before fitting.
  9. Timing chain noise. Listen for a rattle at the front of the engine for the first seconds after a cold start. On an engine that cannot be run, look at the chain guides through the oil filler or with the valve cover off.
  10. Gearbox-end timing chain. On this engine the timing chain sits at the gearbox end, so replacing it normally means removing the engine. If the chain has not been replaced, the time to do it is before the engine goes into your car.

BMW 540d replacement engine cost

Across 258 540d engine units in our stock today, prices start at 753,00 € and reach 7.569,00 €. The median — the price in the middle of the range — is 5.426,00 €.

Prices depend on the exact version, the donor's mileage, how complete the engine is and the demand for that code. Higher-output versions, low mileage and dressed engines with turbo, injectors and ancillaries cost more; long blocks and higher mileage cost less.

540d engine prices by model year

Model yearsUnitsFromMedianTo
2010–201432.435,00 €2.945,00 €4.826,00 €
2015–20191282.786,00 €5.497,00 €6.694,00 €
2020–2024117753,00 €5.435,00 €6.729,00 €

Engines from 2010–2014 have a median of 2.945,00 €, while units from 2020–2024 sit at 5.435,00 €. Newer engines usually cost more because they come from younger donor cars with lower mileage and later updates.

540d engine prices by mileage

Donor mileageUnitsFromMedian
under 50,000 km304.679,00 €5.664,00 €
50,000 to 100,000 km624.465,00 €5.612,00 €
100,000 to 150,000 km662.786,00 €5.606,00 €
over 150,000 km762.945,00 €5.194,00 €

Mileage matters less than history on a well-maintained BMW engine, but it is a useful guide. A low-mileage unit from a younger car gives you more life for a modest premium.

3 of these come from G30 donor cars, priced from 2.894,00 € to 7.542,00 €. An engine from the same body is the most direct swap because the sump, mounts and ancillaries already match.

On top of the engine, budget for the workshop's labour and the parts that are best replaced while the engine is out: engine mounts, the rear main seal, cooling parts, a clutch or converter seal, fluids and filters.

Replacement engines in stock for the 540d

These 540d units are in our Hamburg yard right now. Each listing shows real photographs of the engine you receive, its mileage and what is fitted.

BMW G05 X5 xDrive40d B57D30B Engine 2022, 141,800 km — 6.601,00 €, reduced from 7.350,00 €. It comes from a 2022 donor car with 141,800 km, and 23 units are available. Ask the desk for compression figures or extra photographs before you order.

BMW G05 X5 xDrive40d B57D30B Engine 2020, 90,500 km — 6.505,00 €, reduced from 7.450,00 €. It comes from a 2020 donor car with 90,500 km, and 21 units are available. We can confirm fitment against your VIN the same day.

BMW G07 X7 xDrive40d B57D30B Engine 2021, 90,400 km — 4.919,00 €, reduced from 5.950,00 €. It comes from a 2021 donor car with 90,400 km, and 26 units are available. Ask the desk for compression figures or extra photographs before you order.

BMW G07 X7 xDrive40d B57D30B Engine 2016, 148,200 km — 6.597,00 €, reduced from 8.050,00 €. It comes from a 2016 donor car with 148,200 km, and 9 units are available. Ask the desk for compression figures or extra photographs before you order.

BMW G05 X5 xDrive40d B57D30B Engine 2016, 119,000 km — 5.204,00 €, reduced from 6.600,00 €. It comes from a 2016 donor car with 119,000 km, and 25 units are available. We can confirm fitment against your VIN the same day.

BMW G05 X5 xDrive40d B57D30B Engine 2019, 97,400 km — 5.622,00 €, reduced from 7.050,00 €. It comes from a 2019 donor car with 97,400 km, and 20 units are available. We can confirm fitment against your VIN the same day.

BMW G05 X5 xDrive40d B57D30B Engine 2016, 72,000 km — 6.639,00 €, reduced from 7.300,00 €. It comes from a 2016 donor car with 72,000 km, and 26 units are available. The listing shows every side of the engine and the fitted parts.

BMW G05 X5 xDrive40d B57D30B Engine 2018, 178,100 km — 6.005,00 €, reduced from 7.300,00 €. It comes from a 2018 donor car with 178,100 km, and 16 units are available. The listing shows every side of the engine and the fitted parts.

BMW G07 X7 xDrive40d B57D30B Engine 2017, 186,600 km — 5.236,00 €, reduced from 6.600,00 €. It comes from a 2017 donor car with 186,600 km, and 23 units are available. Ask the desk for compression figures or extra photographs before you order.

BMW G05 X5 xDrive40d B57D30B Engine 2022, 24,300 km — 6.026,00 €, reduced from 6.950,00 €. It comes from a 2022 donor car with 24,300 km, and 27 units are available. The listing shows every side of the engine and the fitted parts.

BMW G05 X5 xDrive40d B57D30B Engine 2017, 53,500 km — 6.072,00 €, reduced from 7.050,00 €. It comes from a 2017 donor car with 53,500 km, and 28 units are available. The listing shows every side of the engine and the fitted parts.

BMW G07 X7 xDrive40d B57D30B Engine 2021, 108,300 km — 5.466,00 €, reduced from 6.750,00 €. It comes from a 2021 donor car with 108,300 km, and 30 units are available. Ask the desk for compression figures or extra photographs before you order.

Will it fit my 540d?

Will the B57D30T fit my BMW G30 540d?

For the BMW G30 540d, the B57D30T is the factory engine and the one to order. The seventh 5 Series was built 2016–2023, and the B57D30T was produced 2016–2020, so check that your car's build date falls inside that window. Confirm the drive type (rear-drive or xDrive), the gearbox (manual or automatic) and the emissions standard, because these can change the sump, the flywheel and the software. Send us the VIN and we check all of it for you.

How much is a replacement engine for a BMW G30 540d?

We have 1 B57D30T engine from G30 donor cars, priced from 7.542,00 €. Delivery to your door is included, and the engine carries a 12-month warranty when fitted by a qualified workshop. Add fitting labour and the parts you replace at the same time — seals, cooling parts and mounts — to estimate the total.

Engine swaps and upgrades for the 540d

These engines were fitted to other versions of the G30 at the factory, which makes them the most practical upgrades: the body was designed around them and many parts are shared.

EngineFactory modelPowerGain
B58B30TUG30 540i374 hp+34 hp
B57D30SG30 M550d400 hp+60 hp
N63B44T3G30 550i462 hp+122 hp

Can I fit the B58B30TU in my 540d?

It is a full conversion: the B58B30TU runs on petrol and the B57D30B on diesel, so the fuel system, wiring, engine control unit, instrument coding and usually the gearbox change too. The gain is 34 hp and 0 Nm. In Germany and most of Europe an engine swap must be inspected and registered.

Can I fit the B57D30S in my 540d?

Yes, it is one of the more common upgrades. Both are diesel inline-6 engines, so the mounting points are similar, but the B57D30S needs its own wiring and engine control unit, the matching gearbox or clutch, and often a different sump, cooling and exhaust. The gain is 60 hp and 60 Nm. In Germany and most of Europe an engine swap must be inspected and registered.

Can I fit the N63B44T3 in my 540d?

It is a full conversion: the N63B44T3 runs on petrol and the B57D30B on diesel, so the fuel system, wiring, engine control unit, instrument coding and usually the gearbox change too. The gain is 122 hp and 0 Nm. In Germany and most of Europe an engine swap must be inspected and registered.

Fitting a replacement engine in the 540d

  1. Inspect or replace the timing chain parts. Look at the guides and tensioner. On high-mileage engines, replacing them now costs far less than doing it later.
  2. Replace the rear timing chain if in doubt. On engines with the chain at the gearbox end, chain work needs the engine out. If the history is unknown, replace the chain, guides and tensioner before fitting.
  3. Prepare the turbo. Fit new oil feed and return seals, clean the intercooler and pipes of any oil or debris from the old engine, and prime the turbo with oil before starting.
  4. Code the injectors and bleed the fuel. Enter the injector correction codes into the ECU, check the glow plugs and bleed the fuel system so the engine does not crank dry.
  5. Check the particulate filter. If the old engine failed with oil or coolant entering the exhaust, the DPF may be contaminated. Check its back-pressure before relying on it.
  6. Fill with the right oil and prime it. Fill with new oil of the correct specification and a new filter. Crank with the fuel and ignition disabled until oil pressure builds.
  7. Coding and adaptations. On modern BMWs, the engine ECU must be matched to the car's immobiliser (CAS, FEM or BDC). Reset adaptations, register the battery and clear faults with diagnostic software.
  8. First start and leak check. Start the engine, let it idle and watch oil pressure, temperature and fault codes. Check for leaks and bleed the cooling system.
  9. First 1,000 km. Drive gently for the first few hundred kilometres, vary the engine speed and avoid full load. Change the oil and filter after about 1,000 km to remove any assembly debris.

The full fitting and first-start procedure.

540d engine questions

Will the B57D30B engine fit my BMW G30 540d?

Yes, if your BMW G30 540d was built with the B57D30B. BMW used this 3.0 liter (2,993 cc) diesel engine with 250 kW (340 HP) in the G30 540d from about 2016 to 2024.

In our records the B57D30B is the engine for the G30 540d, which makes the match simple. Still, check the code on your old engine or send us your VIN.

Also tell us if your G30 has a manual or an automatic gearbox. The flywheel or the flex plate and some sensors depend on it.

Not sure? Send us your VIN and your gearbox code. We match the engine family, the year window and the parts on the engine before anything is reserved, and the check is free.

See all B57 Engines · Search B57D30B in the shop

BMW G05 X5 xDrive40d B57D30B Engine 2018, 153,800 km — photo 1
BMW G05 X5 xDrive40d B57D30B Engine 2018, 153,800 km — 5.556,00 €

How much is a replacement B57D30B engine for a BMW G30 540d?

A used B57D30B for the BMW G30 540d costs from about 4.350 € to 6.700 € in our yard. The price depends on the year, the mileage and the parts that come with the engine.

Shipping is a flat 249 € per order. It is added once at checkout and printed on the invoice, so there is no extra fee later. Inside the EU there is no import duty. Outside the EU, the receiver pays local duty and VAT.

A replacement engine is often much cheaper than rebuilding a damaged one, and much faster. The B57D30B you buy is photographed and checked in Hamburg before it is listed.

Eligible engines come with a 12 months warranty from the delivery date. It covers internal mechanical failure under normal use and correct fitting by a qualified mechanic or workshop. Not sure? Send us your VIN and your gearbox code. We match the engine family, the year window and the parts on the engine before anything is reserved, and the check is free.

See all B57 Engines · Search B57D30B in the shop

Can you check if a B57D30B fits my car with my VIN?

Yes, and it is free. Send the 17-character VIN of your car and, if you have it, the gearbox code. We check the engine family, the build year window and the parts your car needs.

For the B57D30B, we confirm that your car was built with this code or with a version that can take it. BMW used it in the BMW G30 540d, BMW G05 X5 xDrive40d, BMW G11 740d, BMW G07 X7 xDrive40d and BMW G15 840d.

We only reserve an engine once the match is confirmed, so you never pay for the wrong unit. You can reach the Hamburg desk by email at autowerkeengines@gmail.com, or by phone and WhatsApp on +49 15510 030835, Monday to Friday, 9:00 to 16:00 CET.

You can also use the VIN check on our site. It reads the year, the make, the model and the engine from the public vehicle register.

See all B57 Engines · Search B57D30B in the shop

How much is a replacement B57D30B engine for a BMW G07 X7 xDrive40d?

A used B57D30B for the BMW G07 X7 xDrive40d costs from about 4.350 € to 6.700 € in our yard. The price depends on the year, the mileage and the parts that come with the engine.

Shipping is a flat 249 € per order. It is added once at checkout and printed on the invoice, so there is no extra fee later. Inside the EU there is no import duty. Outside the EU, the receiver pays local duty and VAT.

A replacement engine is often much cheaper than rebuilding a damaged one, and much faster. The B57D30B you buy is photographed and checked in Hamburg before it is listed.

Eligible engines come with a 12 months warranty from the delivery date. It covers internal mechanical failure under normal use and correct fitting by a qualified mechanic or workshop. Not sure? Send us your VIN and your gearbox code. We match the engine family, the year window and the parts on the engine before anything is reserved, and the check is free.

See all B57 Engines · Search B57D30B in the shop

How long does delivery of a B57D30B engine take?

Orders confirmed before 14:00 CET on a working day leave Hamburg the same day. Later and weekend orders leave the next working day. Delivery to the Netherlands, Belgium, Germany, France, Luxembourg and Denmark takes 1 to 3 working days.

Spain, Italy, Portugal, Poland, Czechia, Austria, Ireland, the Nordics and the Baltics take 2 to 5 working days. Greek and Spanish islands, Malta, Cyprus and remote areas take 4 to 8 working days. The UK and other countries outside the EU are quoted one by one.

Shipping is a flat 249 € per order. It is added once at checkout and printed on the invoice, so there is no extra fee later. Every engine is drained, sealed at each opening, strapped to a heat-treated pallet and shrink-wrapped, then photographed before it leaves the yard.

You get a tracking number when the pallet is collected. Check the wrapping before you sign, and note any damage on the paperwork.

See all B57 Engines · Search B57D30B in the shop

What is the difference between the B57D30B and other B57 engines?

The B57D30B makes 250 kW (340 HP) and 700 Nm. The other B57 engines are: B57D30A with 195 kW (265 HP) and 620 Nm (2015 to 2024).

Engines in one family share a basic block, but the turbo, the injection, the sensors and the engine computer can differ. A higher power version often has different pistons, a bigger turbo or a different fuel system.

This is why we ask for the exact code. Fitting a different version can work, but the wiring, the software and sometimes the gearbox must be changed to match.

Not sure? Send us your VIN and your gearbox code. We match the engine family, the year window and the parts on the engine before anything is reserved, and the check is free.

See all B57 Engines · Search B57D30B in the shop

Will the B57D30B engine fit my BMW G30 540d?

Yes, if your BMW G30 540d was built with the B57D30B. BMW used this 3.0 liter (2,993 cc) diesel engine with 250 kW (340 HP) in the G30 540d from about 2016 to 2024.

In our records the B57D30B is the engine for the G30 540d, which makes the match simple. Still, check the code on your old engine or send us your VIN.

Also tell us if your G30 has a manual or an automatic gearbox. The flywheel or the flex plate and some sensors depend on it.

Not sure? Send us your VIN and your gearbox code. We match the engine family, the year window and the parts on the engine before anything is reserved, and the check is free.

See all B57 Engines · Search B57D30B in the shop

BMW G05 X5 xDrive40d B57D30B Engine 2021, 72,400 km — photo 1
BMW G05 X5 xDrive40d B57D30B Engine 2021, 72,400 km — 4.526,00 €

Is the BMW B57D30B a diesel or petrol engine?

The B57D30B is a diesel engine. It is a 3.0 liter (2,993 cc) inline 6, DOHC, 24 valve unit with twin turbochargers, and it was built to the Euro 6 emission standard.

The emission standard matters for registration and for low-emission zones in many cities. When you replace an engine with the same code, the car keeps the same paperwork and the same emission class.

Diesel versions need the matching exhaust treatment parts on the car to stay legal and to keep the engine computer happy. Reuse the parts from your car if they are in good condition.

If you are not sure which version you need, send us your VIN. We tell you the right code for free.

See all B57 Engines · Search B57D30B in the shop

How much is a replacement B57D30B engine for a BMW G30 540d?

A used B57D30B for the BMW G30 540d costs from about 4.350 € to 6.700 € in our yard. The price depends on the year, the mileage and the parts that come with the engine.

Shipping is a flat 249 € per order. It is added once at checkout and printed on the invoice, so there is no extra fee later. Inside the EU there is no import duty. Outside the EU, the receiver pays local duty and VAT.

A replacement engine is often much cheaper than rebuilding a damaged one, and much faster. The B57D30B you buy is photographed and checked in Hamburg before it is listed.

Eligible engines come with a 12 months warranty from the delivery date. It covers internal mechanical failure under normal use and correct fitting by a qualified mechanic or workshop. Not sure? Send us your VIN and your gearbox code. We match the engine family, the year window and the parts on the engine before anything is reserved, and the check is free.

See all B57 Engines · Search B57D30B in the shop

Will the B57D30B engine fit my BMW G05 X5 xDrive40d?

Yes, if your BMW G05 X5 xDrive40d was built with the B57D30B. BMW used this 3.0 liter (2,993 cc) diesel engine with 250 kW (340 HP) in the G05 X5 xDrive40d from about 2016 to 2024.

In our records the B57D30B is the engine for the G05 X5 xDrive40d, which makes the match simple. Still, check the code on your old engine or send us your VIN.

Your car has all-wheel drive or is an X model, so the sump, the oil pickup and some brackets can differ from the rear-drive cars. Tell us the full model so we send the right set-up.

Not sure? Send us your VIN and your gearbox code. We match the engine family, the year window and the parts on the engine before anything is reserved, and the check is free.

See all B57 Engines · Search B57D30B in the shop

Delivery, warranty and payment

Every 540d engine we sell is drained, sealed at each opening, strapped to a heat-treated pallet and shrink-wrapped before it leaves Hamburg. You receive photographs of the packed engine and a tracking number.

Door-to-door delivery is included to the address you give at checkout. Typical delivery takes three to five working days within Germany and neighbouring countries and five to ten working days to the rest of Europe and the UK.

A 12-month warranty covers eligible internal failure when the engine is fitted by a qualified workshop with new fluids and filters. You can pay by card, bank transfer or crypto and receive the invoice by email straight away.

All G30 engines · B57 engine guide · BMW 540d engines for sale · Send us your VIN