Stroke index is a measure of the swimmer's overall stroke efficiency. This is how it is calculated.
Calculation: Speed x Distance per Stroke (DPS) x Cycle Multiplier.
The Cycle Multiplier is used to convert distance per stroke into distance per cycle. The Cycle Multiplier for freestyle / backstroke is 2 (two strokes = one cycle), and the Cycle Multiplier for breaststroke / butterfly is 1 (one stroke = one cycle).
A higher stroke index means that your stroke is more efficient. When you're going faster (Speed) and farther per stroke (DPS), you need to spend less energy per lap, which means that you're becoming more efficient. As you increase efficiency in swimming, you also increase your potential speed, because you now need less energy to maintain the same speed.
Since we use average speed rather than just speed during stroking, the speed underwater also plays a part in this metric.