Cost is no issue --- .45 ACP.
Limited budget ----- 9mm.
Purpose and Pistol design plays a lot into it, too. For example, I like my Walther P99 in 9mm but would probably not like it in .45. I most likely will not like a small pistol on .45 but in a government 1911 sized pistol, it is great.
I shoot 9 mm because I shoot it well and the low recoil makes my followup shots faster and more accurate, and because it maximizes capacity for a given size of pistol. Factoring in cost and availability makes it even more attractive.
In revolvers:
I guess if you pegged me down to what I would carry if I didn't know what in the world I might have to stare down, I'd say the .357.
In all honestly, I really prefer the .38 Special. Up until the internet was invented, it stopped/killed a lot of bad guys just fine It's an elegant old world round. Nothin' flashy, just a rim a nice long case and a .357 bullet peeking out.
As far as as auto's go:
I'd really a 10mm. However, .45 acp is a great all arounder. I still have to give 9mm the nod in practicality and affordability.