When doing replacement or upgrading on 1994 – 2018 BMW 540i xDrive adaptive capsule halogen headlamps HID lighting with without, the bulb size guide is necessary for you to take the reference.
Jump to corresponding car model with the catalog bellow.

Low Beam Headlight1994 – 1995 9006
High Beam Headlight1994 – 1995 9005
Front Fog Light1994 9006
1995 H1
Back Up Light1994 – 1995 1156
Brake1994 – 1995 1156
Front Side Marker1994 – 1995 12961
Front Turn Signal1994 – 1995 P21/5W
License Plate1994 – 1995 12844
Parking Light1994 – 1995 1157
Rear Turn Signal1994 1156
1995 P21W
Tail Light1994 – 1995 12814
Center High Mount Stop Light1994 – 1995 1156
Engine Compartment Light1994 – 1995 578
Glove Box1994 – 1995 DE3423
Trunk1994 – 1995 6411
Low Beam Headlight1997 – 2003 H7
High Beam Headlight1997 – 2000 9005
2001 – 2003 H7
Front Fog Light1997 – 2000 H7
2001 – 2003 H8
Back Up Light1997 – 2003 1156
Brake1997 – 2003 1156
Dome Light2001 – 2003 578
1997 – 2000 6411
Front Side Marker1997 – 2000 3157
Front Turn Signal2001 3357NA
2002 – 2003 3457NA
License Plate1997 – 2003 12844
Parking Light1997 – 2000 3157
2001 – 2003 H6W
Rear Side Marker1997 – 2000 12821
Rear Turn Signal1997 – 2000 1156
Tail Light1997 – 2000 12821
Front Inner Turn Signal1997 – 2000 3157
Front Outer Turn Signal1997 – 2000 12961
Center High Mount Stop Light1997 – 2003 1156
Glove Box1997 – 2003 DE3423
Stepwell2001 – 2003 12844
1997 – 2000 DE3423
Trunk1997 – 2003 6411
Low Beam Headlight1997 – 2003 D2S
High Beam Headlight1997 – 2000 9005
2001 – 2003 H7
Front Fog Light1997 – 2000 H7
2001 – 2003 H8
Back Up Light1997 – 2003 1156
Brake1997 – 2003 1156
Dome Light1997 – 2003 6411
Front Side Marker1997 – 2000 3157
Front Turn Signal2001 3357NA
2002 – 2003 3457NA
License Plate1997 – 2003 12844
Parking Light1997 – 2000 3157
2001 – 2003 H6W
Rear Side Marker1997 – 2000 12821
Rear Turn Signal1997 – 2000 1156
Tail Light1997 – 2000 12821
Front Inner Turn Signal1997 – 2000 3157
Front Outer Turn Signal1997 – 2000 12961
Center High Mount Stop Light1997 – 2003 1156
Glove Box1997 – 2003 DE3423
Stepwell2001 – 2003 12844
1997 – 2000 DE3423
Trunk1997 – 2003 6411
Front Turn Signal2017 – 2018 PY21W
Front Turn Signal2017 – 2018 PY21W