Skip to content
Physics

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.

Your details

Choose which quantity to solve for. All others become inputs.
Parallel currents in the same direction attract each other; opposite directions repel.
Magnitude of the current in the first wire in amperes.
A
Magnitude of the current in the second wire in amperes.
A
Centre-to-centre distance between the two parallel wires.
Unit for displaying the force per unit length result.
Force per unit length (F/L)Attractive
4.0000e-4 N/m

Magnetic force per metre of wire length

InteractionAttractive (same direction)
Magnetic field at wire 2 (from wire 1)4.0000e-5 T
_fpl_raw0.0004
Force per unit length (N/m)0.0004
000011
Wire separation (m)
F/L (N/m)
Wire separation (m)Force per unit length
0.030
0.050
0.080
0.10
0.130
0.150
0.180
0.20
0.230
0.250
0.280
0.30
0.330
0.350
0.380
0.40
0.430
0.450
0.480
0.50
0.530
0.550
0.580
0.60
0.630
0.650
0.680
0.70
0.730
0.750
0.780
0.80
0.830
0.850
0.880
0.90
0.930
0.950
0.980
10

Force per unit length: 4.0000e-4 N/m (attractive).

  • Both currents are equal (10 A), so increasing either current by the same factor multiplies the force by that factor squared.
  • The wires carry current in the same direction, so the magnetic fields between them partially cancel, drawing the wires together.
  • Force per unit length is inversely proportional to distance: halving the separation doubles the force.

Next stepTo find the force on a specific section of wire, switch the mode to "Total force on a wire segment" and enter the length.

Formula

FL=μ0I1I22πd,B1=μ0I12πd,μ0=4π×107Tm/A\frac{F}{L} = \frac{\mu_0 \, I_1 \, I_2}{2\pi d}, \quad B_1 = \frac{\mu_0 \, I_1}{2\pi d}, \quad \mu_0 = 4\pi \times 10^{-7}\,\text{T\,m/A}

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)SeparationF/L (N/m)Context
1 A1 cm2.0 x 10^-5Signal wiring
10 A1 cm2.0 x 10^-3Household circuit
100 A1 cm0.20Busbar / EV battery
1000 A1 cm20Industrial switchgear
1 A1 m2.0 x 10^-7SI 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.

Sources

Written by Dr. Tomás Okafor, PhD Physicist · Lagos, Nigeria

Physicist specializing in classical mechanics, bringing 17 years of research and applied dynamics expertise to every calculator he reviews.

Search 3,500+ calculators

Loading search…