First, lay the door down. Then, take the 'pivot pin' that's in the TOP of the door. From the center of the hole, measure OUTWARDS to the edge/point of BOTH corners. Add 1/8" to the LARGER of the 2 measurements and you have the distance from the wall over to the inner-edge of the pivot-end of the door. You want the doors to basically touch each other when closed.
So get out a tape measure and get a pencil and paper and start figuring. Don't foget to measure BOTH bi-fold pivot-points (to the edge) plus 1/8". My best to ya and hope this helps.