Tough for me to call this one. I love them all for their differences.
I sold my .40 lately to make room for a new addition and have yet to choose the new addition.
I have owned the 40 and the 9mm as well as shot the 45.
The 40 has more kick and penetrates more than the 45 and expansion on the hp is to about .68" vs the .75" of the 45.
If you ever dare to carry you would want to go with the 9mm as previously mentioned the 40 and 45 are way to large.
Personally I like the 40 for a range gun because the ammo is much cheaper.
So for range I would say the 40.
As for Home defense, I am stuck between the 40 and 45 but lean to the 40 for it's penetration which comes in handy for drywall and door penetration.
Hope this helps!