Magnetic force between wires calculator - parallel force

Magnetic force between wires calculator that returns force per unit length and total force, and states whether two parallel currents attract or repel.

Updated: July 8, 2026 • Free Tool

Magnetic Force Between Wires Calculator

Current magnitude in the first wire, in amperes.

Current in the second wire. Enter a negative value to model currents flowing in opposite directions.

Center-to-center spacing between the two wires, in meters.

Length of cable over which the total force is reported. Set to 0 to report the per-unit-length force only.

Results

Force per unit length
0N/m
Total force 0N
Direction 0

What Is the Magnetic Force Between Wires Calculator?

The magnetic force between wires calculator finds the mechanical pull or push between two long, straight, parallel conductors that carry electric currents. It returns the force per unit length in newtons per meter, the total force over a chosen run length in newtons, and whether the wires attract or repel. You use it whenever you need to know how strongly neighboring cables or busbars act on each other.

  • Power busbar spacing: Estimate the sideways load on parallel busbars in a switchboard so supports are sized for the magnetic force at full current.
  • Transmission line design: Check the attraction or repulsion between bundled phase conductors to decide spacing and bundling for a transmission line.
  • Physics lab verification: Confirm a textbook worked example for two wires by entering the same currents, spacing, and length used in class.
  • Coil and harness layout: Predict whether adjacent current-carrying wires in a harness will try to clamp together or bow apart under load.

Two currents near each other never sit quietly. Each wire makes a magnetic field, and the neighboring wire feels a force from that field. The net effect is a steady force along the whole length of the parallel run.

The result matters because the force grows with current squared and shrinks only with distance. A modest drop in spacing can more than double the mechanical load on a support, which is why cable trays and busbar clamps are rated with this effect in mind.

The magnetic force between wires calculator is one example of a magnetic force, and the Lorentz force calculator shows how a single moving charge feels a related q v x B force.

How the Magnetic Force Between Wires Calculator Works

The calculator applies the Ampere force law for two infinite parallel conductors. It takes the two currents, the center-to-center spacing, and an optional segment length, then returns the per-unit-length force and, when a length is given, the total force.

F/L = (mu0 * I1 * I2) / (2 * pi * d)
  • I1, I2: Currents in the two wires, in amperes. Enter a negative I2 to model currents flowing in opposite directions.
  • d: Center-to-center distance between the wires, in meters. The force is inversely proportional to d.
  • mu0: Vacuum permeability, 1.25663706127 x 10^-6 N/A^2. It sets how strongly currents couple through the magnetic field.
  • L: Length of wire over which the total force is reported. Zero reports the per-unit-length force only.

Because mu0 / (2 pi) equals exactly 2 x 10^-7, the formula is often written as F/L = 2e-7 * I1 * I2 / d. That compact form makes quick estimates easy without a calculator.

The direction comes straight from the sign of the current product. Same-direction currents give a positive sign and attract; opposite-direction currents give a negative sign and repel.

Worked example: 10 A wires 1 cm apart

I1 = 10 A, I2 = 10 A, d = 0.01 m, L = 1 m.

F/L = (1.25663706127e-6 * 10 * 10) / (2 * pi * 0.01) = 1.25663706127e-4 / 0.06283 = 0.002 N/m.

Force per unit length = 0.002 N/m; total force over 1 m = 0.002 N, attractive.

Two modest household-scale currents only 1 cm apart pull together with about 2 mN per meter, small but measurable in a sensitive rig.

Worked example: opposite currents

I1 = 10 A, I2 = -10 A, d = 0.01 m, L = 1 m.

Magnitude is the same 0.002 N/m, but the negative sign of I2 flips the direction.

Force per unit length = 0.002 N/m, repulsive.

Reversing one current keeps the strength the same and only changes attraction to repulsion, which is why anticorrelated currents bow apart.

According to HyperPhysics, the force per unit length between two parallel current-carrying wires is F/L = (mu0 * I1 * I2) / (2 * pi * d), with attraction for currents in the same direction.

As published by Wikipedia, the SI ampere was historically defined by this force: two straight parallel conductors 1 m apart each carrying 1 A exert a force of exactly 2 x 10^-7 N per meter of length.

The strength of the force depends on the vacuum permeability constant, which the magnetic permeability calculator explains alongside the mu0 value used here.

Key Concepts Explained

A few ideas explain why the force behaves the way it does and how it connects to the rest of electromagnetism.

Vacuum permeability mu0

Mu0 is the constant that links current to the magnetic field it creates in free space. It is the same value that appears in the magnetic permeability of a material and in solenoid field formulas.

Attractive versus repulsive

When the currents point the same way, the wires pull toward each other; when they point opposite ways, they push apart. The calculator reports this from the current signs.

Force per unit length

Reporting newtons per meter removes the need to pick a total length. It is the natural quantity for an infinitely long pair and scales linearly to any real run.

Ampere force law

This is the two-wire special case of the general force between current elements. It is the law that historically fixed the definition of the ampere.

The wire formula is a limit of the full Biot-Savart and Ampere law treatment, valid when the wires are long compared with their spacing.

Thinking in terms of force per length keeps the answer independent of how much cable you actually install, which is helpful when you only know the spacing and currents.

Both the inverse-distance force here and the gravitational force calculator model how two bodies pull on each other, which helps compare the two force laws.

How to Use This Calculator

Enter your wire setup and read the force and direction. The steps below walk through a typical power-cable check.

  1. 1 Enter current 1: Type the magnitude of the current in the first wire in amperes.
  2. 2 Enter current 2: Type the second current. Use a negative value to model currents flowing in the opposite direction.
  3. 3 Set the spacing: Enter the center-to-center distance between the wires in meters; smaller values raise the force quickly.
  4. 4 Choose a length: Enter the parallel run length in meters to get a total force, or 0 to report only the per-unit-length force.
  5. 5 Read the result: Note the force per length, the total force, and whether the pair attracts or repels.

For two 50 A busbars spaced 2 cm apart over a 3 m run, enter 50, 50, 0.02, and 3. The tool returns the per-meter force and the accumulated pull across the 3 m span, which you can compare with the support rating.

If you start from a coil instead of two wires, the solenoid magnetic field calculator converts a known current into the surrounding field that produces these forces.

Benefits of Using This Calculator

The tool turns a textbook formula into a quick, repeatable check for real conductor layouts.

  • Fast spacing checks: See how a small change in conductor spacing changes the mechanical load without hand-deriving the formula each time.
  • Direction made explicit: The attractive or repulsive label removes the guesswork about whether same or opposite currents pull the wires together.
  • Per-length and total in one view: Get both the newtons-per-meter value and the total newtons so you can match the answer to your support or harness length.
  • Ampere-definition context: The result connects directly to the historical SI ampere definition, which helps when teaching or verifying the constant 2e-7 N/m.
  • Current-aware design: Because the force scales with current, the numbers help you decide how much current a given busbar spacing can safely carry.

Engineers use the per-unit-length number to size clamps and spacers, while students use it to confirm a lecture example in seconds.

Having the direction stated keeps designs from assuming wires always attract, which is only true for aligned currents.

Because the force scales with current, the Ohm's law calculator helps you size the amperes that drive the parallel-wire attraction or repulsion.

Factors That Affect Your Results

Three quantities set the force, and a few modeling limits decide when the answer is trustworthy.

Current magnitude

The force scales with the product I1 times I2, so doubling one current doubles the force and doubling both quadruples it.

Wire spacing

Force is inversely proportional to distance d. Halve the spacing and the force doubles; this is the strongest lever in a tight bundle.

Run length

The total force is the per-unit-length value times L. A longer parallel run accumulates more total force even when the per-meter value is fixed.

Current direction

Reversing one current flips attraction to repulsion at the same magnitude, which changes how the conductors load their supports.

  • The formula assumes long, straight, parallel wires and ignores end effects; short or sharply bent conductors need a full field simulation.
  • Real wires sit in a material or conduit, so nearby magnetic material can change the effective field and the measured force.
  • Very small spacing makes the straight-wire approximation break down because the conductors are no longer far apart relative to their radius.

The 2e-7 constant only holds in free space; a high-permeability nearby surface would alter the coupling.

Treat the output as a steady-state estimate; transient faults or alternating currents add time-varying forces not captured here.

According to NIST CODATA, the vacuum permeability mu0 is 1.25663706127 x 10^-6 N/A^2, the constant that fixes how strongly parallel currents interact.

Like the buoyant force calculator, this tool separates the geometry of the setup from the physical constant, so you can see what changes the answer.

Magnetic force between wires calculator showing current in two parallel wires, spacing, and the resulting attractive or repulsive force per unit length
Magnetic force between wires calculator showing current in two parallel wires, spacing, and the resulting attractive or repulsive force per unit length

Frequently Asked Questions

Q: What is the formula for the magnetic force between two wires?

A: The force per unit length is F/L = (mu0 * I1 * I2) / (2 * pi * d), where mu0 is the vacuum permeability, I1 and I2 are the two currents, and d is the center-to-center distance. Multiply by the segment length L to get the total force.

Q: Is the force between parallel wires attractive or repulsive?

A: Currents flowing in the same direction attract, while currents in opposite directions repel. This calculator reports the direction automatically from the signs of the two currents you enter.

Q: How does the distance between wires affect the force?

A: The force per unit length is inversely proportional to the spacing d. Halving the distance doubles the force, and pulling the wires twice as far apart halves it, which is why tightly bundled conductors experience strong mechanical loads.

Q: What does the force per unit length mean?

A: Force per unit length is the pull or push per meter of wire, in newtons per meter. It lets you compare any two wire spacings without choosing a total length, and you multiply it by your actual run length to get the total force.

Q: Why do currents in the same direction attract?

A: Each wire sits in the magnetic field produced by the other. The field from one wire pushes the neighboring current toward it when the currents align, so the conductors are drawn together; reversing one current reverses the push.

Q: Does the magnetic force between wires depend on the wire length?

A: The per-unit-length force does not depend on length, only on the currents and spacing. The total force equals the per-unit-length value times the length of wire you consider, so a longer parallel run accumulates more total force.