When I buy small volumes (1-2 boxes) I can usually find 9mm for $12-14, .40 for $14-15, and .45 for $15-16 a box.
Even if you shoot 2000 rounds per year, the difference is only $60. If you reload, it's almost nothing once you have brass. Now if you shoot 10,000 rounds per year it's going to cost you, but if you've got that much ammo and time, you likely have the cash anyway.
All I'm trying to say is, if you like a particular caliber or gun, don't let the cost of the ammo be the deciding factor. Accuracy beyond 30 yards with a hand gun takes a lot of skill and the lack of accuracy at that range will be more you than the caliber. We're not talking rifles.
Buy a 9mm if you want a high veolcity small bullet that's well suited to penitrate something like a helmet.
Buy a .40 if you want more power (bullet mass X velocity) without a lot of extra recoil and without sacrificing magazine capacity in smaller guns.
Buy a .45 if you want lots of power, recoil is not an issue (weak wrists don't let these semi autos cycle well) and you don't mind the weight.