This magnetic field of straight current carrying wire calculator finds the field at a distance from a long straight wire, B = μ₀ I ÷ (2π r). Its second mode finds the force between two parallel wires, so it is also a magnetic force between wires calculator. Enter the current or currents and the distance in SI units.
How to use the magnetic field of straight current carrying wire calculator
- Choose the field of one wire or the force between two wires.
- Enter the current and the distance.
- For two wires, add the second current, the direction and, if you want a total, the length.
- Press Calculate.
The field of a long straight wire
For a long straight wire, the field is B = μ₀ I ÷ (2π r), with I the current and r the perpendicular distance from the wire [1]. The field lines are concentric circles around the wire, and the strength falls in proportion to the distance. The calculator uses this formula and shows the result in tesla, microtesla and gauss.
The constant μ₀
The calculator takes the permeability of free space as μ₀ = 4π × 10⁻⁷ T·m/A. The Wikipedia article on the vacuum permeability gives the current measured value as 1.25663706127 × 10⁻⁶ N/A², and says that since the 2019 redefinition of the ampere it is no longer fixed by definition [3]. The two values differ only in the tenth digit, so the calculator uses 4π × 10⁻⁷, and μ₀ ÷ 2π is then exactly 2 × 10⁻⁷.
A worked example
Suppose you want a field of 5 × 10⁻⁵ T, about that of the Earth, at 1 cm from a wire. That takes about 2.5 A. The calculator runs the formula the other way: for 2.5 A at 0.01 m, B = 2 × 10⁻⁷ × 2.5 ÷ 0.01 = 5 × 10⁻⁵ T, or 50 µT, which is 0.5 gauss. This is why a compass near a wire carrying a few amperes is easily deflected.
The force between two parallel wires
For straight, parallel and very long wires, the force per unit length is F ÷ L = μ₀ I₁ I₂ ÷ (2π d), and the total force is that figure times the length. Wikipedia states the law in the form 2 k_A I₁ I₂ ÷ r with k_A = μ₀ ÷ 4π, which is equal to μ₀ I₁ I₂ ÷ (2π r) [2]. The calculator uses the μ₀ form.
Attraction or repulsion
Currents in the same direction attract [2], and currents in opposite directions repel. The force on each wire has the same size and opposite direction, in line with Newton's third law. Choose the direction in the calculator and it says whether the wires attract or repel. The result is shown per metre of wire, and as a total if you give a length.
A force example
Two long wires 0.1 m apart each carry 10 A in the same direction. The force per metre is 4π × 10⁻⁷ × 10 × 10 ÷ (2π × 0.1) = 2 × 10⁻⁴ N/m, an attraction. Over 3 m of wire the force on each is 6 × 10⁻⁴ N. This is our own example.
Why the force is small
The force between ordinary wires is tiny: at 10 A and 10 cm it is two ten-thousandths of a newton per metre. It grows with the product of the currents, so a short-circuit current of thousands of amperes can give large forces between busbars, and it falls as the wires move apart. This is why heavy conductors in switchgear are braced firmly.
Direction of the field
The field circles the wire. The direction follows the right-hand rule [1]: point the right thumb along the current, and the fingers curl in the direction of the field. The calculator gives only the size of the field, so work out the direction from the current direction when you need it.
Limits of the formulas
The formulas assume a very long, thin, straight wire in empty space. Near the end of a finite wire, or close to a bend, the field is different. Close to a thick conductor, the field inside the conductor is also different from the simple formula. A magnetic material nearby can change the field a great deal. For real design work, check against the relevant standards and use a field-solving tool.
Using the field in practice
The field of a single wire is weak: 10 A at 10 cm gives 2 × 10⁻⁵ T, which is less than the Earth's field, so a compass near a household cable is hardly disturbed. Close to a heavy cable, or with many turns, the field becomes much larger. The inverse relation with distance means that moving a sensor from 1 cm to 10 cm cuts the field by a factor of ten [1]. Use the calculator to check where a cable's field falls below a level you care about.
Two wires and one field
The force between two wires is the same law seen from the other side: the first wire makes a field at the second, and that field acts on the current in the second wire, which is the magnetic force on a wire [2]. Both views give the same numbers, and the calculator shows the result per metre so that you can scale it to any length.
Common mistakes
- Giving the distance in centimetres. Use metres: 1 cm is 0.01 m.
- Using the formula near the end of a short wire. It holds for a long wire.
- Expecting two currents in opposite directions to attract. They repel.
- Confusing the field with the force. The field is in tesla, the force in newtons per metre.
What next
Use this often? Add Magnetic Fie to your Home screen.
Frequently asked questions
What is a magnetic field of straight current carrying wire calculator?
A tool that finds the magnetic field at a distance from a long straight wire from the current: B = μ₀ I ÷ (2π r).
What is the force between two parallel wires?
F per metre = μ₀ I1 I2 ÷ (2π d), attractive for currents in the same direction and repulsive for opposite directions.
What value of μ₀ does the calculator use?
4π × 10⁻⁷ T·m/A, which differs from the measured value only in the tenth digit.
How does the field change with distance?
It is inversely proportional to the distance, so doubling the distance halves the field.
Does the formula work for a short wire?
No. It is for a very long straight wire, and near the ends of a short wire the field is different.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.