Dock Line and Mooring Rope for Your Boat
As a general rule, the length of bow and stern lines should equal two-thirds of your boat's overall length. Spring lines should be slightly longer, approximately the same length as your boat. Spring lines keep the boat snugly near the dock by preventing it from moving fore or aft, while allowing for the rise and fall of the tide. Keep in mind; the position of cleats on your boat and dock may affect the length of the dockline.
Unless your boat is unusually heavy or will be subjected to severe conditions, a bow line, stern line, and two spring lines are recommended. If your permanent slip has outboard pilings as well, you will need an additional bow and stern line.
http://www.ropeinc.com/choosingdockline.html