the length of your barn door hardware, onto the studs of the wall. This will ensure that you have adequate anchor points to support your new doors.