On this page
"It gets weaker" is the usual answer to how a wire's magnetic field changes with distance. Exam questions want more: how much weaker, and which graph matches. Here are the formula, the circular field lines and the 1/r graph, plus an example you can check on a calculator.
What does B = μ0I/2πr actually say?
The magnetic field at distance R from an infinitely long straight wire carrying current I is B = μ0I/(2πR), equation 12.8 in OpenStax University Physics Volume 2.
Here is what each symbol means:
I is the current in amperes. Double the current and B doubles.
r is the perpendicular distance from the wire in metres. Double it and B halves.
μ0 is the permeability of free space. NIST lists the CODATA 2022 value as 1.25663706127 × 10⁻⁶ N A⁻², which is 4π × 10⁻⁷ to the accuracy you need in school.
"Long" matters. OpenStax derives the formula for an infinitely long wire. For a real wire it works well when you are much closer to the wire than to either of its ends.
Why are the field lines around a wire circles?
According to HyperPhysics, the field lines around a long current-carrying wire "form concentric circles around the wire". The wire looks the same from every direction around it, so the field can't favour any side. Its strength depends only on r, and it points along the circle.
To get the direction, use the right-hand grip rule as OpenStax states it: hold the wire in your right hand with your thumb along the current, and your fingers wrap around it the way B points. If the current comes out of the page, the circles run anticlockwise.
The spacing carries the 1/r information too. OpenStax notes that because the field decreases with distance, the spacing of the field lines must increase with distance. In the diagram above, each circle is 1.55 times wider than the one inside it.
How does the magnetic field of a straight wire vary with distance?
B is inversely proportional to r. So B × r stays constant for a given current. That one fact lets you sketch every graph examiners use:
B against r: a hyperbola that falls steeply near the wire and flattens out far away. It never touches the r-axis.
B against 1/r: a straight line through the origin with slope μ0I/2π.
B × r against r: a horizontal line.
A straight line falling to zero for B against r is a trap: the field weakens but never reaches zero at any finite distance.
A worked example: how strong is the field 1 cm from a wire?
Take a 2 A current and a point 1 cm (0.01 m) away. Since μ0/2π = 2 × 10⁻⁷ T m/A, equation 12.8 from OpenStax section 12.2 gives B = 2 × 10⁻⁷ × 2 / 0.01 = 4 × 10⁻⁵ T.
Now use B × r = constant instead of starting over each time:
At 2 cm, B = 2 × 10⁻⁵ T.
At 4 cm, B = 1 × 10⁻⁵ T.
At 10 cm, B = 4 × 10⁻⁶ T.
To get a feel for the size, OpenStax gives Earth's surface field as about 5 × 10⁻⁵ T, or 0.5 G. So 1 cm from a 2 A wire, the wire's field is comparable to Earth's, which is why a compass held close to the wire can deflect noticeably. To see where the formula comes from, read our post on Biot-Savart and Ampère's law for wires, loops and solenoids.
What changes inside a thick wire?
For a wire of radius a with current spread evenly through it, OpenStax Example 12.7 uses Ampère's law to find B = μ0Ir/2πa² inside, which rises linearly with r, and B = μ0I/2πr outside. At the surface, both formulas give μ0I/2πa. So the full graph rises in a straight line from zero at the centre, peaks at the surface, then falls along the familiar curve. If a multiple-choice question offers four B-r graphs for a thick wire, this is the shape to look for.
A five-step check before you answer
Confirm you are outside the wire and far from its ends.
Convert r to metres and I to amperes.
Use μ0/2π = 2 × 10⁻⁷ to save a step.
Find the direction with the right-hand grip rule.
Use B × r = constant to check your answer at a second distance.
If your numbers still come out wrong, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than just printing an answer. For a gap in the basics, the Fermi Concept Library gives each physics concept its own lesson.
Once the single-wire field makes sense, use it next for the force on a rectangular loop near a long straight wire and the force between parallel currents.



