The distance you measure is the minimum length your strings need to be before any silk wrap or tapering should start. You’re aiming for the string to be long enough to pass through your bridge or body (depending on how you string your bass) and for the wound portion of the string to then pass over the nut before the silk winding starts or the string starts to taper down.
If the silk starts before (or even in) the nut, it is a big no, no and the string simply won’t sound as it should.
**PLEASE NOTE** If you have a bass where you cannot see the ball end i.e. a thru-body bass, you will have to measure your string once it has been removed.
To accurately do this before taking the string off the bass, make a mark on the string with a permanent marker just behind the nut. Then once you’ve unwound the string from the machinehead and removed it from the bass, measure from the ball end up the mark you made on the string. This will be your 'ball end to nut' measurement.
A quick tip... before taking the string off your bass, be sure to cut the string beyond your marker and remove the straggly, curly bits from the top of the string. If left on, there's a risk of the string waving about scratching the body of your bass. Plus trying to pull these straggly bits of string through your bass' body is not a simple or pleasant job.