Magnetic force on a current-carrying conductor in a magnetic field can be expressed as the following
F=Bil Sin θ
Where F is force acting on a current carrying conductor,
B is magnetic flux density (magnetic field strength),
I is magnitude of current flowing through the conductor,
l is length of conductor and
θ is angle that conductor makes with the magnetic field.
When the conductor is perpendicular to the magnetic field, the force will be maximum.
When it is parallel to the magnetic field, the force will be zero.