Magnetic Force Between Current-Carrying Wires Calculator
Enter the currents in two parallel wires and the distance between them to find the magnetic force per unit length and the total force acting on a given wire segment. The calculator detects whether the wires attract or repel each other, shows the full working step by step, lets you reverse-solve for the wire spacing or either current, and plots how the force changes as the distance grows. Switch between SI and practical units at any time.
Formula
Worked example
Two parallel wires each carry 10 A in the same direction and are separated by 5 cm (0.05 m). F/L = (4pi x 10^-7 x 10 x 10) / (2 x pi x 0.05) = (4 x 10^-7 x 100) / 0.10 = 4 x 10^-4 N/m = 0.4 mN/m, attractive. The B-field produced by wire 1 at the location of wire 2 is B = (4pi x 10^-7 x 10) / (2 x pi x 0.05) = 4 x 10^-5 T = 40 uT.
What is the magnetic force between two current-carrying wires?
When electric current flows through a wire it creates a magnetic field around that wire. If a second wire carrying its own current sits in that field, the field exerts a force on the moving charges in the second wire. The result is that the two wires exert equal and opposite forces on each other, a consequence of Newton's third law applied to electromagnetism. The force per unit length is given by F/L = (mu0 x I1 x I2) / (2 x pi x d), where mu0 = 4 x pi x 10^-7 T m/A is the permeability of free space, I1 and I2 are the currents, and d is the centre-to-centre distance between the wires. The sign of the force depends on the relative directions of the two currents: currents flowing in the same direction attract each other, while currents flowing in opposite directions repel each other.
How to use this calculator
Use the "Solve for" selector to choose your goal. In the default mode (Force per unit length) enter the currents in the two wires and their separation and the result updates immediately. Choose "Total force on a wire segment" and add the length of the wire section to get the full force in newtons. Three reverse-solve modes let you work backwards: "Wire spacing" finds the distance needed to achieve a given force per unit length, and the two current modes find the unknown current when the other current, the separation, and the target force are all known. Choose the current direction to see whether the force is attractive or repulsive. The force output unit selector lets you read results in N/m, mN/m, or uN/m, and the separation input accepts m, cm, mm, in, and ft.
Attraction vs. repulsion: the right-hand rule
The direction of the magnetic field around a current-carrying wire is given by the right-hand rule: curl the fingers of the right hand around the wire with the thumb pointing in the direction of current flow and the fingers indicate the field direction. Between two parallel wires with currents in the same direction, the fields point in opposite directions between the wires, partially cancelling, and in the same direction outside the wires. The net effect is that the field between the wires is weaker than the field outside, so the wires are pushed together by the stronger outer field region - they attract. With opposite currents the fields between the wires add rather than cancel, and the wires push apart - they repel. This attraction-repulsion rule is the foundation of the historical definition of the ampere: one ampere was defined as the constant current that, flowing in two infinitely long parallel wires one metre apart in a vacuum, produces a force per unit length of 2 x 10^-7 N/m.
Engineering significance and practical examples
The force between parallel conductors matters across a wide range of engineering contexts. In power transmission, parallel busbars carrying large currents can experience significant mechanical forces, and the support structure must be designed to withstand them, particularly during short-circuit events when currents surge to many times their normal value. In electric motors and transformers, the forces on adjacent conductors produce vibration and noise. In particle accelerators, coils carrying thousands of amperes generate forces that must be contained by robust cryogenic structures. Even in household wiring, the force is non-zero, though at 10 A and a centimetre of separation it is only about 0.2 mN per metre of wire, far too small to feel but measurable in a laboratory. The inverse proportionality with distance means that doubling the gap halves the force, while doubling both currents quadruples it.
Typical magnetic force per unit length in practice
| Current (each wire) | Separation | F/L (N/m) | Context |
|---|---|---|---|
| 1 A | 1 cm | 2.0 x 10^-5 | Signal wiring |
| 10 A | 1 cm | 2.0 x 10^-3 | Household circuit |
| 100 A | 1 cm | 0.20 | Busbar / EV battery |
| 1000 A | 1 cm | 20 | Industrial switchgear |
| 1 A | 1 m | 2.0 x 10^-7 | SI definition of the ampere (historical) |
Illustrative values for two parallel wires each carrying the listed current separated by 1 cm. Use the calculator for exact values.
Frequently asked questions
Why do parallel wires with the same current direction attract each other?
Each wire produces a magnetic field that encircles it. Between two wires carrying current in the same direction, the fields point in opposite directions, partially cancelling. The net field is weaker between the wires than outside them. The second wire sits in the field of the first and experiences a force directed toward the first, and vice versa. The underlying mechanism is the Lorentz force F = I L x B acting on the charge carriers moving through the field of the neighbouring wire.
What is the formula for the force between two parallel wires?
The force per unit length is F/L = (mu0 x I1 x I2) / (2 x pi x d), where mu0 = 4 x pi x 10^-7 T m/A, I1 and I2 are the currents in amperes, and d is the centre-to-centre separation in metres. Multiply F/L by the length of the wire segment in metres to get the total force in newtons. Positive values indicate attraction and negative values indicate repulsion (depending on convention).
How does the force change if I double the current in one wire?
The force is directly proportional to the product of the two currents. If you double the current in one wire, the force doubles. If you double both currents, the force increases by a factor of four. Conversely, the force is inversely proportional to the distance: doubling the separation halves the force.
What is the historical connection to the definition of the ampere?
Before 2019, the SI ampere was defined as the constant current that, maintained in two infinitely long parallel wires of negligible cross-section placed one metre apart in a vacuum, produces a force per unit length of exactly 2 x 10^-7 N/m. This is a direct consequence of the formula: with I1 = I2 = 1 A and d = 1 m, F/L = (4 x pi x 10^-7 x 1 x 1) / (2 x pi x 1) = 2 x 10^-7 N/m. The 2019 SI redefinition fixed the ampere by specifying the elementary charge instead, but the formula and the value of mu0 remain the same.
Does the force formula apply to wires that are not infinitely long?
Strictly speaking, the formula F/L = mu0 I1 I2 / (2 pi d) is exact only for infinitely long, perfectly straight, parallel wires. For real finite wires it is a very good approximation as long as the wire length is much greater than the separation d. For short wires or large separations a more involved integral is needed, but in most engineering situations the simplified formula is accurate enough.
Why is it important to know the force between busbars during a short circuit?
During a short-circuit event the current in a conductor can jump to tens or even hundreds of times its normal operating value. Because force scales as the square of the current (when both wires carry the same fault current), even a brief surge can produce forces orders of magnitude greater than those under normal operation. Engineers must design busbar supports and switchgear enclosures to withstand these impulse forces to prevent structural failure and maintain safety.