The differences in "stopping power" between the most common automatic pistol calibers are not so great as their supporters (and detractors) would have you think. 9mm, .40 S&W, and .45ACP are all fairly close in terms of kinetic energy and wounding potential (even the more niche calibers like .357SIG and 10mm aren't very far from their more common brethren).
.40 S&W is lighter and faster than .45ACP, but the overall energy levels are quite close. The average .40S&W round will go further than the average .45ACP round. .40S&W rounds are less expensive than .45ACP. Magazine capacity is greater for a given volume with .40S&W. Recoil with .40S&W is often quite "snappy" compared to .45ACP.
Choosing a pistol caliber boils mostly down to personal preference. Handle and fire as many pistols as you can before deciding on one.
Stopping power depends much more on shot placement than caliber. You may have a larger margin of error with a 45 than a 22, but if you can't make hits to the central nervous system, you're not likely to immediately stop anyone with either.
i.e. We've all seen by now the infamous DEA agent who shot himself in the foot with his own weapon, a Glock 40. Even at point blank range this didn't incapacitate the agent who went on trying to teach.
In short, choose a caliber you can shoot well and practice. That's the secret to stopping power.
While there are many formulas that try to predict stopping power, they're not very realistic in practice. To show the fallacy of the Taylor Knockout Value for instance, take a 10 pound bowling ball rolled at a leisurely pace and see what type of big game it's predicted to stop.
(10 lbs=70,0000 grains. Velocity= a leisurely 10 feet per second. Caliber would be 10 inches. TKV=1,000) Is a slow rolling balling ball really more effective than a 50 BMG that has a TKV of 139?