Magnetic Field of a Wire Calculator

Calculate the magnetic field strength around a current-carrying wire using the Biot-Savart law. Supports straight wires, loops, and solenoids with visual field diagrams.

Magnetic Field of a Wire Calculator

1 for air/vacuum, ~5000 for iron
Magnetic Field (B)
40.0000 μT
0.4000 Gauss
vs Earth\'s Field
0.80×
Earth ≈ 50 μT
Energy Density
6.366e-4 J/m³
B² / (2μ)
Force Between Wires
0.4000 mN/m
Between I₁=10A and I₂=10A at d=0.05m
Configuration
Straight Wire
Field Direction
Right-Hand Rule
Thumb = current → fingers curl = B direction

Field vs Distance (Straight Wire, I = 10 A)

Distance (m)FieldGaussRelative
0.01200.0000 μT2.0000
0.02100.0000 μT1.0000
0.0540.0000 μT0.4000
0.120.0000 μT0.2000
0.210.0000 μT0.1000
0.54.0000 μT0.0400
12.0000 μT0.0200
21.0000 μT0.0100
5400.0000 nT0.0040
10200.0000 nT0.0020

Magnetic Field Reference Scale

SourceField StrengthScale
Interstellar space1.000e-10 T
Earth's field (surface)50.0000 μT← Your result
Refrigerator magnet5.0000 mT
Loudspeaker magnet1.0000 T
MRI scanner3.0000 T
Strong lab magnet20.0000 T
Strongest continuous45.0000 T
Neutron star surface100,000,000.0000 T
Planning notes, formulas, and examples

About the Magnetic Field of a Wire Calculator

The Magnetic Field of a Wire Calculator computes the magnetic flux density (B field) around current-carrying conductors using fundamental electromagnetic equations. It supports three configurations: infinite straight wire, circular loop, and solenoid — covering the most common scenarios in electrical engineering and physics. That makes it useful for quick checks on coil strength, wiring fields, and lab-scale electromagnet setups.

For a straight wire, the magnetic field forms concentric circles and decreases inversely with distance (B = μ₀I / 2πr). For a circular loop, the field at the center is B = μ₀I / 2R. For a solenoid, the interior field is nearly uniform at B = μ₀nI. These relationships, derived from the Biot-Savart law and Ampère's law, are foundational in electromagnetism.

Enter the current, conductor geometry, and distance to compute field strength in Tesla, Gauss, and milliTesla. The calculator also shows force between parallel wires, field direction using the right-hand rule, and energy density of the magnetic field. It is a quick way to compare a wire field against familiar magnetic values.

When This Page Helps

Use this calculator when you need a field-strength estimate from a simple current geometry without doing the derivation or unit conversion by hand. It is useful for electromagnetics coursework, coil intuition, and quick comparisons with Earth-field or lab-scale values where the geometry is simple but the units are not. That keeps the geometry check fast when you just need the magnitude.

How to Use the Inputs

  1. Select the wire configuration: straight wire, circular loop, or solenoid.
  2. Enter the current flowing through the conductor in Amperes.
  3. Enter the distance from the wire (for straight wire) or radius (for loop/solenoid).
  4. For solenoids, enter the number of turns and length.
  5. View the magnetic field in Tesla, Gauss, and milliTesla.
  6. Check the force calculation between parallel wires.
  7. Use presets for common scenarios.
Formula used
Straight Wire: B = μ₀I / (2πr). Circular Loop Center: B = μ₀I / (2R). Solenoid: B = μ₀nI, where n = N/L (turns per meter). μ₀ = 4π × 10⁻⁷ T·m/A. Force between parallel wires: F/L = μ₀I₁I₂ / (2πd).

Example Calculation

Result: B = 40.0 μT

A straight wire carrying 10 A creates a field at 5 cm distance of B = (4π×10⁻⁷ × 10) / (2π × 0.05) = 4.0 × 10⁻⁵ T = 40 μT. This is comparable to Earth's magnetic field strength.

Tips & Best Practices

  • The right-hand rule determines field direction: thumb = current, curling fingers = B field.
  • For solenoids, field uniformity holds only in the interior — edge effects matter at the ends.
  • At large distances, a small loop's field behaves like a magnetic dipole (falls off as 1/r³).
  • Use relative permeability (μᵣ) for wires inside magnetic materials — iron can amplify fields by 1000×.
  • MRI machines use superconducting solenoids to achieve 1.5-7 T uniform fields.
  • Power lines at 50 cm distance typically produce fields of 1-10 μT, well below safety limits.

The Biot-Savart Law

The Biot-Savart law provides the fundamental relationship for calculating magnetic fields from arbitrary current distributions: dB = (μ₀/4π) × (I dℓ × r̂)/r². For a straight wire, integration yields B = μ₀I/(2πr). For a loop and solenoid, different integration paths give their respective standard formulas.

This law is the magnetic equivalent of Coulomb's law for electric fields. Combined with the principle of superposition, it can compute the field from any current distribution, though complex geometries often require numerical methods.

Practical Applications

Magnetic field calculations are essential in transformer design, motor engineering, magnetic shielding, and electromagnetic compatibility (EMC). Engineers use these formulas to ensure fields don't interfere with sensitive electronics, to design inductors and electromagnets, and to predict forces in actuator systems.

In power systems, the fields around high-voltage lines are regulated for public safety. In medical devices, precise field calculations ensure MRI image quality and patient safety. In particle physics, bending magnets use solenoid fields to steer charged particles.

Units and Scale

The range of magnetic fields in engineering spans many orders of magnitude: Earth's field is ~50 μT, a refrigerator magnet ~5 mT, a loudspeaker magnet ~1 T, an MRI scanner ~3 T, and a superconducting research magnet up to 45 T. Understanding this scale helps engineers choose appropriate materials and designs.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • A current-carrying wire creates a magnetic field in concentric circles around it. The field strength decreases with distance from the wire (1/r for a straight wire). The direction follows the right-hand rule: thumb in current direction, fingers curl in field direction.