The SD40 is 65'8" long, the SD40-2 is 68'10" long. Most of this is in the rear porch, the front porch I believe is the same as an SD40. Which gives the SD40-2 it's famous asymmetry. One of the reasons it's longer is to accommodate the HT-C trucks which replaced Flexicoils as the standards. The HT-Cs are longer and to still allow for a full size fuel tank, the whole frame had to be stretched.
The SD38, SD39, SD40, SDP40, and SD45 all share the same frame and wheelbase.
The SD38-2, SD40-2, and SD45-2 all share the same frame and wheelbase.
Spotting features:
1. HT-C trucks. If it has them it's a dash-2. If not, it may or may not be; both Chessie and Conrail ordered SD40-2s with Flexicoil trucks.
2. Longer (6') long hood porch on the dash 2.
3. "Knockout" rings on the long hood end (dash 2)
4. Offset battery box under the cab on the left side (dash 2)
5. Cab roof overhang slightly toward long hood end (dash 2)
6. Sight glass on right side of long hood (dash 2 and some late 40-series)
Also further evolutions occurred during the long production life of the SD40-2 that you won't find on a straight SD40: the "corrugated" type radiator grills, Q-fans, Q-exhaust (with the bulge in the dynamics), and the 88" low short hood as well as longer "snoot" hoods ordered by the Santa Fe, UP, and others.
When I see the familiar profile, my eye first looks to the top for corrugated grills, which a large number of SD40-2s have. If they have earlier grills, my eyes go down to the trucks. If I see Flexicoils, then I'm looking at the battery box if I can see the left side, or I'm looking for the cab overhang. By then I can make the call. I think the cab overhang is the most reliable dash 2 spotting feature. So far, I've never seen a pre dash-2 loco that has the overhang, and I've never seen a dash 2 without it. I'm speaking of factory built locomotives. Rebuilds all bets are off, shops tend to do whatever they want and use whatever they have. Such as the EL 3657 and 3667, which carry the distinctive spotting features of the SD45-2... and the 3657 even has a dash 2 cab and battery box. But neither are... both are SDP45s internally, rebuilt from a wreck with new long hood components from EMD.
Andy