The other distance to consider (and I think more important ) is the distance between your shoulders and the shifters/brakes. If the distance is too far and you really have to reach forward to brake, then the bike maybe too big for you (some adjustment is possible by buying a shorter stem) or if you feel too bunch up, sitting upright and not bented over, then the bike maybe too small for you (but you can try a longer stem).
Each bike is different. I am 5'8". I had a medium Spec. Stumpjumper FSR and now have a medium Santa Cruz Superlight. Both bikes are approximately 17" but on the Specialized I was way stretched out. I had a hard time reaching the shifters and then getting back off the saddle. The Santa Cruz fits me alittle better. If you are concerned spend the money and get fitted.