Probably somewhat less than 100 yards/meters. If one looks at the Army manual for the M9 and M11 pistols in 9mm, they post the effective range at 50 meters, and the maximum range at something like 1,600 meters (IIRC). WHile a projectile can travel a distance, it does not mean it is aimable, nor will it do much. Not wanting to get into ballistic gelatin comparisons and the whole stopping power issue, the Army apparently feels that at 50 meters one can hit what one is aiming at, and there is enough kinetic energy left to do some harm. Along those lines, look at ballistics tables by Winchester and Remington, and they show the remianing energy at various ranges, which should be an indicator.
Relating to your question on the MP5, which has a longer barrel - 8.5inches (IIRC) vs. the 4.5 inches of the M11, one can expect more muzzle velocity, yielding a slightly flatter trajectory, and more kinetic energy which translates to a greater distance until the KE reaches a comp[arable "hurt" point. That is, if one can find the muzzle velocity (though we know it will be a reasoanble amoutn faster), we can say that the 50 yard figures the Army has determined as effective, will occur at a somewhat greater distance. None of this is truly linear, so we can't just go multipy by two. Hence my estimate of the 100 yards or less.