Look at the bottom of a sock. You will see three different areas:
To figure out how to knit the foot, initially you have to determine the total foot length.
Let's size a Men's 9. The length of a typical size 9 is 10.55 inches long.
So, to determine how long the foot area is, you do the following:
Shoe size length - Heel - Toe = Foot
10.55" - 2" - 2" = 6.55"
Next you have to use the row gauge of the yarn.
Let's say that the ball band says the yarn is 12 rows per inch.
So to determine how many times you crank, it's a simple multiplication:
Foot * Row Gauge = # of cranks for foot.
6.55-inch * 12 rows/inch = 78.6 rows => round up to 79 cranks
When you make your sock, work the heel, then crank 79 times, work the toe.
Check your actual gauge after you knit the sock. If it doesn't match the ball band gauge, then can always frog the sock and re-calculate the foot length.
As you get used to your machine and the types of yarns you knit with you will be able to custom make socks in no time.