Do you own a tape measure? Try running a string or a wire from your brake to your lever. Use wire ties to mount it where you want your cable. Cut the string or wire where you think you need the ends of your cable.
Now, cut all the wire ties and measure the string or wire.