Magnetic Field of a Long Straight Wire

Also known as field around a wire · Ampere's law for a straight conductor · B equals mu zero I over two pi r

B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
sig figs

Worked example: 10 A at 5 cm → B = 40 uT. Press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Change any unit and the answer follows.

Where Magnetic Field of a Long Straight Wire fits

Your answer feeds

See also

Magnetic Field of a Solenoid: What happens when that same wire is wound into a coil: the field stops falling off and goes uniform inside.Force Between Parallel Wires: The consequence: put a second wire in this field and it is pushed or pulled.Magnetic Force on a Current-Carrying Wire: The force a current-carrying wire feels in any field, which is the mechanism behind that attraction.Magnetic Flux (Φ = BA cos θ): Both use magnetic field.Magnetic Force on a Moving Charge: Both use magnetic field.Motional EMF (ε = BLv): Both use magnetic field.
7 more relatedAlfvén Speed: Both use magnetic field.Plasma Beta: Both use magnetic field.Electric Charge (Q = It): Both use electrical current.Electrical Power (P = I²R): Both use electrical current.Electrical Power (P = VI): Both use electrical current.Energy Stored in an Inductor: Both use electrical current.Ohm's Law: Both use electrical current.
Here the solver did the work. Could you?

The field around a wire →

UniversityCircuits & Electrical Power

Test your skills in the Exam Room: new numbers every attempt. Free lessons for students, no sign-up, just pure learning.

See your Report Card
Learning zone

Magnetic Field of a Long Straight Wire explained

IrB

Hans Christian Ørsted noticed in 1820 that a compass needle beside a current-carrying wire swung sideways, and that single observation joined electricity to magnetism. The field a straight wire produces circles it (no beginning, no end, closed loops around the conductor) and its strength is B=μ0I/(2πr)B = \mu_0 I/(2\pi r). Point the right thumb along the current and the fingers curl the way the field goes. The 2πr2\pi r in the denominator is the circumference of the circle you are standing on, which is Ampère's law in its simplest possible use: the field times the path length around the wire equals μ0\mu_0 times the current enclosed.

Note the 1/r1/r, not 1/r21/r^2. The source is a line rather than a point, so the field spreads over a cylinder whose area grows only linearly with distance. A 10 A wire gives 40 µT at 5 cm, 20 µT at 10 cm, 4 µT at 50 cm, and 40 µT is comparable to the Earth's own field, which is exactly why Ørsted's compass moved and why a compass is useless near a welding lead.

The relation is also a measurement tool. A clamp meter is nothing but a magnetic circuit that reads this field and reports the current that must have caused it, which is why it works without breaking the circuit and why it must go round one conductor only. Run both conductors of a supply through the clamp and the two fields cancel, reading zero: that cancellation is the whole principle of a ground-fault detector, which trips when the two no longer cancel because current has left by another path.

"Long" is the assumption, and it is doing real work. The formula is the infinite-wire limit, accurate while the conductor runs straight for many times rr either side of the point of interest. Near an end, a bend, a termination or the return conductor, the true field is lower: sometimes far lower, because the return conductor's field opposes it, which is why a twisted pair or a coaxial cable radiates almost nothing. Three more. rr is measured from the wire's axis, and inside the conductor this form fails entirely: only the current enclosed by the circle counts, so the field rises linearly from zero at the centre out to the surface. The μ0\mu_0 here is the vacuum value, so a steel conduit or an iron core in the neighbourhood changes the answer by orders of magnitude. And on AC the field alternates with the current, so a value calculated from an RMS current is an RMS field, with a peak 2\sqrt{2} times larger.

Magnetic Field of a Long Straight Wire formula

B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
Where
  • BB= Magnetic field (T)
  • II= Current (A)
  • rr= Distance from the wire (m)
Revised 16 October 2026
Cite this page

formula.expert. (2026, October 16). Magnetic Field of a Long Straight Wire Formula & Calculator. https://formula.expert/solvers/straight-wire-magnetic-field