Magnetic Field of Straight Wire Calculator

Calculate the magnetic field around a current-carrying wire using the Biot-Savart law. Supports infinite and finite wire models with permeability.

Use negative for opposite direction
A
For finite-wire calculation
m
1 for air/vacuum, 5000+ for iron core
B (Infinite Wire)
300.0000 µT
B = µI / (2πr) — standard formula
B (Finite Wire)
299.9400 µT
Wire length: 1 m
Force Between Parallel Wires
4.5000 mN/m
Attractive (same direction) / Repulsive (opposite)
vs Earth Field
6.00×
Earth ≈ 50 µT, Wire = 300.0000 µT
Flux (r to 2r, per m)
2.0794 µWb/m
Through rectangular area
Permeability Used
1.257 µH/m
Free space (µ₀)
ICurrent out of page
Field wraps counterclockwise
(right-hand rule)
B = 300.0000 µT

Field vs Distance

DistanceB (Infinite)B (Finite, 1m)vs Earth Field
1 mm3.0000 mT3.0000 mT60.00×
5 mm600.0000 µT599.9700 µT12.00×
1 cm300.0000 µT299.9400 µT6.00×
2 cm150.0000 µT149.8801 µT3.00×
5 cm60.0000 µT59.7022 µT1.20×
10 cm30.0000 µT29.4174 µT0.60×
50 cm6.0000 µT4.2426 µT0.12×
1 m3.0000 µT1.3416 µT0.06×
5 m600.0000 nT59.7022 nT0.01×
10 m300.0000 nT14.9813 nT0.01×

Material Permeability Reference

Materialµ_rCategory
Vacuum / Air1Diamagnetic
Copper0.999994Diamagnetic
Aluminum1.000022Paramagnetic
Platinum1.000265Paramagnetic
Nickel100 – 600Ferromagnetic
Mild Steel2,000Ferromagnetic
Silicon Steel5,000 – 10,000Ferromagnetic
Mu-metal20,000 – 100,000Ferromagnetic
Supermalloy100,000 – 1,000,000Ferromagnetic
Planning notes, formulas, and examples

About the Magnetic Field of Straight Wire Calculator

A straight current-carrying wire produces a magnetic field that circles around it in concentric rings, with the field strength decreasing inversely with distance. This is one of the most fundamental relationships in electromagnetism, described by Ampere's law and the Biot-Savart law. The famous formula B = µ₀I/(2πr) appears in every physics textbook and is the starting point for understanding electromagnets, transformers, motors, and power transmission.

For an infinitely long wire, the field depends only on the current and the perpendicular distance from the wire. For real wires of finite length, a correction factor accounts for the reduced contribution from the wire ends. This calculator handles both cases, letting you compare the ideal infinite-wire result with the more realistic finite-wire field.

Beyond the basic field calculation, this calculator also computes the force between parallel wires (the basis for the original definition of the ampere), the magnetic flux through nearby surfaces, and a comparison with Earth's magnetic field. The material permeability input lets you explore how ferromagnetic cores amplify the field by factors of thousands.

When This Page Helps

Understanding the magnetic field around current-carrying conductors is essential for electrical safety (magnetic field exposure limits), EMI/EMC design (shielding and separation distances), sensor placement, and electromagnetic device design. It gives field values for any current and distance combination.

The side-by-side infinite vs finite wire comparison helps you understand when the textbook formula is accurate and when end effects matter. The permeability input extends the calculator to real materials, showing the dramatic field amplification possible with ferromagnetic cores.

How to Use the Inputs

  1. Select a preset scenario or enter custom values.
  2. Enter the current flowing through the wire in amperes.
  3. Enter the perpendicular distance from the wire and select the unit.
  4. Enter the wire length for the finite-wire correction.
  5. Optionally change the relative permeability for non-vacuum environments.
  6. Read the magnetic field for both infinite and finite wire models.
  7. Check the distance table to see how the field varies with distance.
Formula used
Magnetic Field of a Straight Wire: • Infinite wire (Ampere's law): B = µ₀µᵣI / (2πr) • Finite wire (Biot-Savart): B = (µ₀µᵣI / 4πr)(sin θ₁ + sin θ₂) • Force between parallel wires: F/L = µ₀I₁I₂ / (2πd) • Direction: right-hand rule (thumb = current, fingers = field) Where µ₀ = 4π × 10⁻⁷ T·m/A, µᵣ = relative permeability, I = current (A), r = distance (m)

Example Calculation

Result: B = 300.0 µT (infinite wire), 299.9 µT (1 m finite wire)

A 15A household wire produces B = (4π × 10⁻⁷ × 15) / (2π × 0.01) = 300 µT at 1 cm distance — about 6× Earth's field. The finite wire result is nearly identical because 1 m is much longer than the 1 cm observation distance.

Tips & Best Practices

  • The field halves every time you double the distance — this 1/r relationship means a small increase in separation provides significant field reduction.
  • For EMI reduction, twist wire pairs together — the opposing currents cancel their far-field magnetic emissions.
  • Two parallel wires carrying equal but opposite currents (like a power cord) produce a field that falls off as 1/r² at large distances, much faster than a single wire.
  • Use the force formula to calculate mechanical loads on bus bars in high-current switchgear.
  • Magnetic field exposure limits vary by country — check IEEE C95.1 or ICNIRP guidelines for occupational and public limits.
  • For precise near-field calculations, account for the wire radius — the field inside the conductor also varies linearly with r.

Ampere's Law and the Biot-Savart Law

The magnetic field around a straight wire can be derived from two complementary laws. Ampere's law states that the line integral of B around any closed path equals µ₀ times the enclosed current. For the symmetric case of an infinite straight wire, choosing a circular Amperian loop gives B × 2πr = µ₀I immediately.

The Biot-Savart law is more general and gives the field contribution dB from each current element: dB = (µ₀/4π) × (I dl × r̂)/r². Integrating along a finite wire of length L gives the finite-wire formula involving the angles subtended by the wire ends. As L → ∞, the angles approach 90° and the result reduces to the Ampere formula.

Practical Applications

Power line engineers use the wire field formula to calculate magnetic field exposure for workers and nearby residents. High-voltage transmission lines carrying hundreds of amperes produce measurable fields at ground level. Shield wires, optimal conductor spacing, and phase arrangement are designed to minimize these fields.

In circuit board design, trace current creates magnetic fields that can couple to adjacent traces (crosstalk). The 1/r dependence means that doubling the trace spacing cuts the coupling by half. Ground planes provide return current paths that minimize the loop area and reduce radiated emissions.

Superposition and Multiple Wires

When multiple wires are present, the total field is the vector sum of individual wire fields. For a coaxial cable, the equal and opposite currents on the inner conductor and shield produce zero net field outside the cable. For parallel wires carrying current in the same direction, the fields between them oppose each other, while a two-wire power cord's opposing currents produce a dipole field that falls off rapidly with distance.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • By symmetry, the magnetic field has cylindrical symmetry around a long straight wire. Applying Ampere's law to a circular path of radius r gives B × 2πr = µ₀I, so B = µ₀I/(2πr). The 1/r dependence reflects the spreading of the field over a larger circumference at greater distances.