Just out of my own curiosity, I was checking the range of a few naval anti-aircraft guns…
Phalanx CIWS - effective max 1500 m, absolute max 5000 m
Oerlikon 20 mm - effect max 914 m/1500 m,
absolute max 4500 m/6000 m depending on the weapon version
Oerlikon 40 mm - effect max 3,800 m, absolute max 7,200 meters
Pom-Pom QF2 Mk.II - 40 mm, effect max 1,100 m
Pom-Pom QF2 Mk.IV - 40 mm (gyro+ radar) - effect max 3500-4500 meters
M2 0.50 mm machine gun - effect max 1800m/max 7400 m
It is generally considered that shooting up to approx. 3000 meters in height was deadly during WWII, up to 5000 m it was relatively effective, the farthest confirmed hit is 7300 meters (US destroyer vs. Judy plane).
Using the “VT close fuse” and radar, naval AAA was significantly more effective…
Attacks on fast motor torpedo boats did not pay off very well in the “war economy”. On the high seas, the chances were much greater for a boat than for an aircraft, most boats were destroyed by aircraft in the harbor, or during slow sailing, where surprise and sudden ambush , played a very important role…