SOLVETUTORMATH SOLVER

Instrument MI-03-289 · Physics

Magnetic Field of a Straight Current-Carrying Wire Calculator

A current turns the space around a wire into circles of magnetic field. Feed in the current and how far away you're standing, and this instrument runs Ampère's law for you.

Instrument MI-03-289
Sheet 1 OF 1
Rev A
Verified
Type 03 — Electromagnetism SER. 2026-03289

Magnetic field strength, T

0.0000100000

B = μ₀I ⁄ (2πr)

The working Every figure verified twice
  1. B = 0.000001·5 ⁄ (2·π·0.1) = 0.0000100000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

Any steady current in a straight wire is wrapped in a magnetic field that circles the conductor like rings on a target, strongest close to the wire and weaker farther out. Ampère's circuital law pins down exactly how much weaker: walk a closed loop around the wire and the field integrated along that loop equals μ₀ times the current it encloses. Choose the loop to be a circle of radius r centred on the wire, where symmetry makes the field the same strength all the way around, and the integral collapses to B times the circle's circumference, 2πr. Set that equal to μ₀I and solve for B, and you get B = μ₀I ⁄ (2πr).

The r in the denominator is linear, not squared, and that difference is the whole point. A point charge's field spreads over the surface of an expanding sphere, area 4πr², so it thins out as 1 ⁄ r². A straight wire's field spreads over the rim of an expanding circle, circumference 2πr, so it thins out as 1 ⁄ r — gentler, because a line source loses intensity more slowly than a point source does. Double your distance from the wire and the field is cut in half, not to a quarter.

The formula assumes an infinitely long, infinitely thin wire, which no real conductor is. In practice it is accurate wherever the distance to the wire is small compared with the wire's length, so the missing ends barely matter — the situation for a benchtop demonstration, a bus bar, or a household cable. It also breaks down at r = 0, predicting an infinite field the formula was never meant to describe: inside a real conductor of finite radius, only the current enclosed within radius r counts, and that enclosed current shrinks with r², so the internal field actually rises linearly from zero at the centre to a peak at the surface before the 1 ⁄ r falloff takes over outside.

B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
B — magnetic field strength at the field point (tesla, T) · μ₀ — vacuum permeability, 1.25663706×10⁻⁶ T·m/A (the historical 4π×10⁻⁷ figure) · I — steady current in the wire (amperes, A) · r — perpendicular distance from the wire's centre to the field point (metres, m).
  • Enter Wire current — the steady current flowing through the straight conductor, in amps.
  • Enter Distance from the wire — the radial gap between the conductor's centre and the point you care about; the field defaults to centimetres but accepts millimetres or metres.
  • Read Magnetic field strength, T — the result comes out in tesla, a unit small enough that everyday currents give micro- or millitesla figures.
  • To check a claim about direction rather than size, apply the right-hand rule separately: thumb along the current, curled fingers trace the field's circulation.
  • To see the 1 ⁄ r relationship directly, run the same current at two distances and compare — doubling the distance should exactly halve the reading.

Worked example — repeating Ørsted's 1820 demonstration

Set the current to 5 A and the distance to 0.1 m (10 cm), the numbers behind the lecture-hall trick that first tied electricity to magnetism. The formula gives B = μ₀ × 5 ⁄ (2π × 0.1) = (1.2566×10⁻⁶ × 5) ⁄ 0.6283 = 1×10⁻⁵ T, or 10 microtesla. Earth's own field is roughly 50 microtesla depending on latitude, so this wire's field is about a fifth of it at that range — plenty to swing a compass needle held nearby, which is precisely the effect Hans Christian Ørsted noticed during a lecture and published that same year.

Move the compass out to 0.2 m and the reading drops to 5 microtesla, exactly half, because doubling r halves a 1 ⁄ r quantity. Had the field instead obeyed an inverse-square law like a point charge's, doubling the distance would have cut it to a quarter, 2.5 microtesla, not a half — the distinction is the cleanest way to demonstrate by hand that a wire's field is a 1 ⁄ r effect rather than a 1 ⁄ r² one.

Questions

Why does the field fall off as 1 ⁄ r instead of 1 ⁄ r²?

Because a straight wire is a line source, not a point source. Ampère's law spreads the field over the circumference of an expanding circle, 2πr, which grows only linearly with distance — unlike a point charge's field, which spreads over the surface of an expanding sphere, 4πr², growing with the square. That gentler spread is why doubling the distance from a wire halves the field rather than quartering it.

Does this formula work for a coil, loop, or solenoid instead of a straight wire?

No. This expression is specific to a long, straight conductor. A circular loop's on-axis field falls off faster than 1 ⁄ r as you move away, and a long solenoid's interior field is nearly uniform regardless of position on the axis — both come from integrating the Biot-Savart law over a different current geometry, and neither shares this equation.

What happens to the field inside the wire itself?

The 1 ⁄ r formula only holds outside the conductor, at r greater than the wire's radius. Inside, only the current enclosed by a circle of radius r contributes, and for a uniform current density that enclosed current scales with r², so the internal field rises linearly from zero at the centre to its maximum right at the surface, then switches to the 1 ⁄ r falloff this calculator computes.

Which way does the field actually point?

In circles around the wire, following the right-hand rule: point your thumb along the direction of conventional current flow and your curled fingers show the field's circulation direction. This calculator returns only the magnitude in tesla; the direction has to be tracked separately since it depends on which way the current is flowing, not on r or I alone.

How does a clamp-on ammeter use this relationship?

It runs the formula backward. A clamp meter's Hall sensor sits at a fixed, known distance from the conductor and measures B directly, then solves I = 2πrB ⁄ μ₀ internally to display current without ever breaking the circuit. That is also why clamp meters demand the jaw be centred and perpendicular to the wire — any change in r changes the reading exactly as this formula predicts.

References