Here is how it works.
BMW started back in the late '60s and early '70s denoting their bodies with an E and then a number. They also have denoted their motors by an M and then a number, or in special cases an S and then a number.
Here is how the E works
E3 - Bavarias, the 4 door sedan that BMW made in the late '60s and early '70s.
E9 - Coupes as in the 2800cs and the 3.0cs made in the late '60s and early '70s.
E12 - The First 5 Series. Make from late '70s to early '80s.
E21 - First 3 Series. In the US the 320i. In the rest of the world, 320i, and 323i.
E23 - First 7 series.
E24 - The 6 series, all of them. Unfortunately here is a confusing point. BMW called the 6 series by the same E name even though in 1982 they completely changed the suspension and many other things. When talking about 6 series you also need to talk about year.
E28 - The Second Generation 5 Series. Make from '82 to '87.
E30 - Second Generation 3 Series. Built from '83 to 90. Convertables continued to Dec. '92.
E31 - 8 series
E32 - Second Generation 7 series.
E34 - Third Generation 5 series. This car was built from '89 through '95.
E36 - Third Generation 3 series. Came in such things as the 318ti, and the Z3 verions.
E38 - Third Gen. 7
E39 - Fourth Gen. 5
E46 - Fourth Gen. 3
As for the motors BMW started with the original 4 cylider and has gone from there.
M10 - Four cylinder found in 2002 and 320i
M30 - Big Six, based on M10 but with 2 extra cylinders. Found in every large BMW(not 3 series) up to and including the E34.
M20 - Baby Six, smaller displacement 6 cylinder.
M40 - Four cylinder first found in the E30 318is. This is the motor with the profile gasket problem.
M50 - Multi-valve small six that replaced the M20.
M52 - All Aluminum small six that replaced the M50.
M motors go by a different designation. They use S.
S14 - E30 M3 motor based on M10.
S38 - E28/E34/E24 M5/M6 motor based on the M30.
Written by Rob Anderson '00