.40 S&W:
-greater energy
-more recoil
-flatter shooting
-larger magazine capacity
-155, 165, 180gr SD loads available
-cheaper to shoot
.45ACP
-less energy
-less recoil
-MUCH less magazine capacity in standard models
-185, 200, 230gr SD loads available
-more expensive to shoot
Those are pretty much the primary differences. Saying things like "I like .45, but .40 is no slouch" is just an ignorant comment. There is a reason the FBI chose .40 over .45.
If you want to compare by the numbers, the only thing .45 really has over .40 is years in service. By that fact, .45 may have "stopped" more bad guys than .40, but look at the Germans and the 9mm legacy.
Compared to other calibers, .45ACP under-performs in many different aspects, even compared to 9mm (yep, I said it; .45ACP was not created by God, sorry guys).
The 1911 has become, to some, the weapon all others are compared to. But compare it to a modern, standard 9mm platform, the Glock 17:
Magazine capacity
1911 - 5, 6, or 7+1
G17 - 17+1 (225% more ammo)
Recoil (compared by bullet momentum):
.45ACP - ~195,500 gr/f/s
9mm - ~120,000 gr/f/s (~38% less)
So, in short, I am saying that either caliber will do the job equally as well in most cases. And "most cases" encompass virtually every SD encounter that occurs on the street. Your attacker is not tactically savvy, he/she is not likely wearing body armor and the encounter will take place within 20 feet. At 20 feet, anything from .380ACP will do just fine 99% of the time in 99% of situations. And when it comes to SD, you hope for 100%, but 99% is really the best you could ever hope for.
Now, don't be fooled in to thinking I posted this to make fun of .45ACP lovers--I didn't. I own a SA XD45 Tactical and I love to shoot it a lot. It is my favorite of what I own only second to my SIG Sauer P226, coincidentally in .40S&W.
-Jason