Magnetic Field of a Straight Wire – Ampère's Law in Practice
Every current-carrying conductor is wrapped in a magnetic field, and for a long straight wire that field takes the simplest form in all of electromagnetism: B = µ₀ · µᵣ · I / (2 · π · r). The field lines are concentric circles centred on the wire, their direction given by the right-hand rule — thumb along the conventional current, fingers curling the way B points. Because µ₀/(2π) is 2 × 10⁻⁷ T·m/A, the arithmetic is friendlier than it looks: 10 A at 5 cm gives exactly 40 µT, or 0.400 gauss. This magnetic field of a straight wire calculatorevaluates that law in every direction, so it also answers “what current would produce this field?” and “how far away does the stray field drop to 1 µT?” — for a 200 A building riser, the answer to the second is 40 m.
Why the field falls as 1/r, not 1/r²
A point charge's field obeys an inverse-square law, so the wire's gentler 1/r decay surprises people. The reason is geometric. Each short element of current does contribute an inverse-square field, but as you retreat from a long wire, more of that wire comes into view at a shallow angle. Integrating the Biot–Savart law along an infinite line leaves exactly one power of r surviving. Practically, doubling your distance from a cable only halves the field, which is why stray-field surveys need real distance rather than a small step back.
Finite wires are always weaker
Real conductors end. Over a segment of length L the integral gives B = µ₀ µᵣ I /(4πr) · [a/√(a²+r²) + b/√(b²+r²)], where a and b are the along-wire distances to each end — equivalently (cos θ₁ − cos θ₂) in the angle form. The bracket approaches 2 but never reaches it, so a finite wire always undershoots the idealisation. Probe 5 A from 2 cm opposite the mid-point of a 10 cm segment and you get 46.424 µT against the 50 µT the infinite-wire formula predicts — 92.85 % of it, so the textbook shortcut is 7.15 % optimistic. Stretch the geometry to a 50 cm segment probed from 5 cm and about 98 % is recovered. The useful rule is that a wire behaves as infinite once it is roughly twenty times the distance to the field point, and the calculator reports the exact percentage for whatever length you enter rather than assuming it.
Inside a thick conductor
Ampère's law counts only the current enclosed by the loop, so inside a solid rod of radius R carrying a uniform current density the field rises linearly: B = µ₀ µᵣ I r / (2πR²). A 100 A conductor of 5 mm radius reaches 1.6 mT two millimetres in and peaks at 4.0 mT at the surface, then decays as 1/r outside. At high frequency the skin effect drives the current to the surface and the interior field collapses towards zero.
Many wires, and the force between them
Fields superpose as vectors. A “go and return” pair carrying 10 A spaced 10 cm apart produces 80 µTmidway between them, because both contributions point the same way there — and almost nothing a metre away, where they cancel. Each wire also sits in the other's field and feels F/ℓ = µ₀ µᵣ I₁ I₂ / (2πd): two 1000 A busbars 5 cm apart push on each other at 4.0 N/m, so a 2 m run sees 8.0 N. Parallel currents attract, opposed currents repel, and this is the effect that defined the ampere until 2019.
Reading the result
Alongside B the tool reports the gauss equivalent, the auxiliary field H = B/(µ₀µᵣ) — 31.831 A/mfor that opening 40 µT — and two comparisons: the result as a multiple of Earth's ~50 µT field (0.80 ×) and as a percentage of the ICNIRP 2010 public reference level of 200 µT (20 %).
Real installations carry return currents that cancel most of the field within a few conductor diameters, and steel conduit redistributes what is left. Treat a single-wire figure as a worst case for screening, and the reference-level comparison as context rather than a compliance verdict.