Straight Wire Magnetic Field Calculator

Find the magnetic field around a long straight current-carrying wire with Ampere's law.

Straight-wire magnetic field
Enter current, radial distance, and the medium's relative permeability.

About a straight wire's magnetic field

An electric current in a straight conductor creates a magnetic field that circles the wire. For a wire that is effectively infinite compared with the observation distance, symmetry makes the field magnitude depend only on current, distance, and magnetic permeability. Ampere's law gives B = μ₀μrI / (2πr). In free space, relative permeability μr is approximately one, and the expression simplifies numerically to B = 2 × 10⁻⁷ I/r when current is in amperes and distance is in metres. The field grows directly with current: doubling current doubles magnetic flux density at every fixed distance. It decreases inversely with radial distance: doubling the distance halves the field. Its direction is tangential to an imaginary circle centred on the wire. Apply the right-hand grip rule by pointing your thumb with conventional current; the curl of your fingers shows the magnetic field direction. Reversing current reverses direction but leaves the reported magnitude unchanged if current magnitude is used. Relative permeability represents how a linear surrounding medium changes the field compared with vacuum. Air is usually treated as μr = 1 for everyday calculations. Some materials can have larger or field-dependent permeability, but this simple model assumes a uniform, linear, isotropic medium. Values for ferromagnetic materials should be used cautiously because permeability can depend on field strength, prior magnetization, temperature, and geometry. The calculator multiplies the vacuum result by the entered relative permeability and reports both teslas and microteslas for convenient comparison. The infinite-wire approximation is best when the straight conductor extends many times farther than the observation distance in both directions. Near a wire end, bend, return conductor, or finite segment, the Biot-Savart law with actual geometry gives a better result. The model also treats the conductor as thin, so distance is measured from its central axis and should normally exceed its radius. Nearby currents contribute their own vector fields and are not included. Use SI units consistently: convert centimetres to metres before entering distance. This calculator is useful for electromagnetism exercises, initial busbar estimates, sensor placement studies, and checking the order of magnitude around laboratory conductors while keeping its geometric assumptions in mind.

Straight-wire examples

Each example uses the long, thin wire approximation.

InputsMagnetic fieldObservation
I = 5 A, r = 0.1 m, μr = 1B = 10 μTA free-space field ten centimetres from the wire.
I = 2 A, r = 0.04 m, μr = 4B = 40 μTPermeability multiplies the vacuum field by four.
I = 100 A, r = 0.5 m, μr = 1B = 40 μTA high-current conductor observed half a metre away.

How to calculate the field

  1. Enter the magnitude of current in amperes.
  2. Measure radial distance from the wire's central axis and enter it in metres.
  3. Use a relative permeability of one for air or vacuum, or enter the medium's known value.
  4. Select Calculate magnetic field to see the result in teslas and microteslas.

Frequently asked questions

Which law does this calculator use?

It uses Ampere's circuital law for a long straight conductor with cylindrical symmetry. The same result can be derived from the Biot-Savart law for an infinite wire.

Where is distance measured from?

Distance is measured radially from the wire's central axis, not from an arbitrary nearby surface. The thin-wire model is most accurate when that distance is larger than the conductor radius.

What relative permeability should I use for air?

Use one for normal air and vacuum calculations because their permeability is extremely close for this purpose. A different value is appropriate only when a known material uniformly surrounds the conductor.

Does the calculator show field direction?

It reports magnitude only. Determine direction with the right-hand grip rule, and reverse that direction when conventional current reverses.

Can this model calculate a short wire?

A finite wire needs a geometry-dependent Biot-Savart expression, especially near either end. The long-wire result becomes a good approximation when wire length is much greater than the radial distance.