Magnetic force on a current carrying wire

Hi, I am slightly confused by the formula for finding the force on a current carrying wire. It is given as F=BIL where F is force, B is the strength of the magnetic field and L is the length of the wire being acted upon. What I don't understand is why this formula doesn't factor in the distance between the magnet and the wire itself.