It depends on torpedo speed and target speed. Distance does not matter.
A good discussion of this here:
http://www.subsim.com/radioroom/show...Fast+90+method
For a chart showing you EXACTLY where to point your scope and fire so your torpedo goes the exact direction as your sub's heading and hits the target when it intersects that path download this document collection. The chart you want is called the "Torpedo bearing table".
http://www.subsim.com/radioroom/down...o=file&id=1487
Extract the zip and go to:
Carnovaro's Document Collection\sheets\Torpedo bearing table
But a pretty good rule of thumb is 10 degrees. Fire when the ship is at 350 degrees or at 10 degrees.