What a B58 swap actually costs in an E39 — the 2026 breakdown
The E39 occupies a special place in this conversation: it's the chassis BMW people love most and the one with the least honest B58-swap cost data. Forum threads quote everything from $5,000 to $40,000, most are missing half the build, and almost none reconcile a single invoice. This dispatch does it line by line — E39-specific where the 5-Series changes the math, honest where it doesn't.
Where the money goes
It is not "engine + transmission + go." A realistic E39 cost sheet has eight line items, and the one that sinks budgets is almost never the engine:
- Donor engine and accessories — the long block plus everything bolted to it
- Transmission — a ZF 8HP matched to the donor engine (the 8HP70 question matters more for the E39)
- Wiring, DME and integration — the E39's defining cost section
- Cooling system — split-circuit reroute sized for a working sedan
- Fuel system — pump, lines, pressure management for direct injection supply
- Exhaust — downpipe fabrication with more underbody length to plan
- Mounts, driveline, hardware — custom driveshaft is near-certain; differential gearing is a real consideration
- Tuning and coding — immobilizer, VIN, TCM adaptation, then calibration
1 · Donor engine and accessories — $4,500 to $9,500
The B58 is one of the most abundant modern BMW engines in salvage right now. It left the factory in the F-series 340i/440i/240i (pre-update), the G-series M340i and 540i (the Technical Update engines), the Z4 M40i, the X3/X4/X5 40i models, and the Toyota Supra. For an E39 swap, the common pick is a wrecked RWD 340i or 240i with the ZF 8HP: the engine, transmission, harness, ECU and accessories come out as one matched set, which matters more than any single component price.
2026 salvage ranges:
- Complete B58 pull-out with harness, ECU, accessories: $4,500–$7,500
- Technical Update (2019+) pull-out: $6,500–$9,500
- Low-mileage (<15k) pull-out with accessories: $7,000–$9,500
Buy the most complete pull-out you can stretch to. Rebuying the starter, alternator, and accessory drives separately typically costs $1,200 or more, and not every accessory carries across B58 variants.
Before money moves, verify on the donor:
- Compression — all six within 5% of each other
- Oil — no coolant mixing, no metal in the filter housing
- Turbo actuator — play in the wastegate rod means a rebuild budget
- Known leak points — valve cover and oil filter housing on higher-mileage units
- Crank sensor ring — damaged reluctor teeth will haunt first start
2 · Transmission — $2,000 to $5,500 (the E39's real decision)
The ZF 8HP family is the transmission the B58 was designed around. But the E39 is a heavier sedan that was engineered around six-cylinder and V8 torque — which makes the 8HP70 (from a 540i/740i donor) a more serious consideration here than in a lighter chassis. The 8HP45 carries stock B58 torque fine; the 8HP70 buys headroom for a working sedan carrying load. Get the engine and transmission from the same car so the TCM and DME already speak the same language.
- Used 8HP45 (340i/240i): $2,000–$3,500
- Used 8HP70 (540i/740i): $3,000–$4,500
- Rebuilt 8HP45 with warranty: $4,000–$5,500
- Replacement TCM if needed: $400–$700
3 · Wiring, DME and integration — $800 to $3,500
This is the E39's defining section. The E39 is the earliest chassis in the B58-swap generation set — its body electronics predate both the E46 and E9x. The B58's engine management needs to talk to the transmission controller, the chassis modules, and a minimum set of signals to run properly — and the E39 side has to be bridged into that world cleanly. There are two routes:
Route A: standalone harness — $800 to $1,500
Strip the engine down to what it needs to run with standalone management. Simpler wiring, but you trade away factory driveability and diagnostics. It's a valid path; know what you're giving up before you choose it.
Route B: factory DME, full integration — $1,500 to $3,500
Keep the factory DME, run the full harness, and merge it into the E39 chassis with a purpose-built adapter or merge harness. This preserves cold-start behavior and full diagnostics, and it's the route this desk recommends for a car that has to live on the road. The work splits across the merge harness or adapter ($600–$1,200), DME coding ($300–$800), immobilizer and start-request handling ($200–$500), and connectors and sensors ($200–$500).
4 · Cooling system — $600 to $2,400
The B58 runs a split cooling circuit with an electric water pump, an electronic thermostat, and a coolant pipe through the engine valley. In an E39 — a heavier sedan that will work harder than a coupe at the same speed — budget toward the upper end of the radiator range:
- Radiator (OEM-spec or upgraded): $400–$900
- Electric water pump: $250–$400
- Electronic thermostat: $120–$200
- Hoses and custom pipes: $150–$400
- Expansion tank and coolant: $140–$250
Technical Update engines use different pump and thermostat spec than pre-update engines. Match parts to your exact donor variant, not to "a B58."
5 · Fuel system — $300 to $1,200
The B58's high-pressure pump does the injection work, but it needs adequate supply pressure and volume. A healthy pump upgrade ($150–$250), proper lines and fittings ($100–$300), and filtration ($30–$80) cover a stock-power build. Bigger power plans change this line item significantly — size the fuel system to the power target before ordering.
6 · Exhaust — $500 to $3,500
The widest range on the sheet, because it's the most fabrication-heavy. If you weld and have a lift, materials alone run about $500–$1,000. Paying a shop for a quality custom system is $2,000+. The E39's longer underbody gives more routing room than a coupe, but the downpipe exit geometry around the steering and crossmember still sets the difficulty — measure the installed position before bending tube.
7 · Mounts, driveline, hardware — $300 to $1,500
- Engine mounts (conversion-specific): $150–$400
- Transmission mount: $50–$200
- Custom driveshaft (length and output flange differ with the 8HP): $300–$800
- Differential gearing consideration (the E39's factory ratios against the 8HP's spread): budget if changing
- Hardware, brackets, fasteners: $100–$300
8 · Tuning and coding — $400 to $2,000
Immobilizer deletion, VIN correction, and TCM coding run $300–$800. An off-the-shelf calibration covers a stock-engine build ($400–$1,000); modified engines with turbo work need custom calibration ($800–$2,000). For anything past modest power targets, professional calibration is not optional.
The grand total
Tier 1 · Budget build — DIY, used parts, own labor
| Category | Range |
|---|---|
| Engine + accessories | $4,500–$5,500 |
| Transmission | $2,000–$2,500 |
| Wiring / DME integration | $800–$1,500 |
| Cooling | $600–$1,100 |
| Fuel | $300–$500 |
| Exhaust | $500–$1,000 |
| Mounts / driveline / hardware | $300–$500 |
| Tuning / coding | $400–$800 |
| Total | $9,400–$13,400 |
Tier 2 · Mid-range build — DIY with quality upgrades
| Category | Range |
|---|---|
| Engine + accessories | $5,500–$7,500 |
| Transmission | $2,500–$4,000 |
| Wiring / DME integration | $1,500–$2,500 |
| Cooling | $1,000–$1,900 |
| Fuel | $500–$800 |
| Exhaust | $1,000–$2,000 |
| Mounts / driveline / hardware | $500–$1,100 |
| Tuning / coding | $600–$1,200 |
| Total | $13,100–$21,000 |
Tier 3 · Full shop build — low-mileage donor, professional labor
| Category | Range |
|---|---|
| Engine + accessories | $7,000–$9,500 |
| Transmission | $3,500–$5,500 |
| Wiring / DME integration | $2,500–$3,500 |
| Cooling | $1,900–$2,400 |
| Fuel | $800–$1,200 |
| Exhaust | $2,000–$3,500 |
| Mounts / driveline / hardware | $1,100–$1,600 |
| Tuning / coding | $1,200–$2,000 |
| Total | $20,000–$29,200 |
The E39-specific traps
- The earliest body network of the set. The E39's electronics predate the E46 and E9x. Every integration decision downstream of the DME is shaped by this — it's the section to plan first, not last.
- Weight changes system decisions, not core costs. The engine price is the same as any B58 swap; the E39's weight shows up in the transmission headroom, cooling sizing, and driveline considerations.
- Driveshaft geometry. The 8HP is longer than the E39's original transmissions. Measure the installed driveline — tunnel clearance and angle — before ordering a driveshaft.
- Baseline chassis health. A 1995–2004 chassis needs its own budget: cooling system refresh, bushings, and the deferred maintenance a swap project uncovers. Budget it separately — it's not swap cost, but it hits the same wallet.
The E39 Swap Guide — the full planning reference
This breakdown is the entry point. The E39 B48/B58 + ZF 8HP Swap Guide is the complete planning reference: 29 method sections, the E39 integration map, the full evidence register, and the complete build-record template system — so every one of the line items above becomes a planned, verified, recorded decision instead of a surprise.
Get the E39 Swap Guide