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}

Worked example: 10 A at 5 cm → B = 40 uTpress 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. Try different units for next level excitement!

Learning zone

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
B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
Where
  • BB= Magnetic field (T)
  • II= Current (A)
  • rr= Distance from the wire (m)
Missing one of these? Work it out first, then come back