Depends on weather conditions. Surfaced on a clear calm day, say ~3000 m. On a dark night, medium weather 1000-1500m, on a foggy night less than 400m.
Submerged, you can be quite invisible to merchants, unless your periscope is sticking up more than 1m from the surface, or if your conning tower gets exposed from big waves. A ballpark figure would be less than 500m.
__________________
|