Magnetic Field of a Wire
Did you know that electricity is always strictly linked to magnetism? It results from one of Maxwell's equations, which says that a flowing electric current produces a magnetic field. This magnetic field of a straight current-carrying wire calculator makes it easy to describe the magnetic field produced by a long, straight current-carrying wire.
Consider a long straight wire that carries an electric current. In this particular situation, the magnetic field lines form concentric circles around the cable, and the strength of the magnetic field depends only on the distance from the wire and the current flowing through it. Be sure to also check our electromagnetic force on a current-carrying wire and the magnetic force between wires.
We can also wind a wire tightly into a thin coil, forming a solenoid. To learn more, try our solenoid magnetic field calculator.
How to Calculate the Magnetic Field Around a Wire
To correctly calculate the magnetic field around a wire we would need to make use of the cross product and the right-hand rule. But we can also approximate. Assuming that our wire is straight and very long, we can estimate the magnetic field around the wire with the following equation:
B = μ₀ · I / (2π · d)
- B — Strength of the magnetic field produced at distance d (Tesla, T)
- I — Current flowing through the wire (Amperes)
- d — Distance from the wire (meters)
- μ₀ = 4π × 10⁻⁷ T·m/A ≈ 1.25664 × 10⁻⁶ T·m/A — Permeability of free space (2019 definition)
You can see that the higher the current flowing through the wire, and the closer we are to the wire, the stronger the magnetic field produced is.
Using the Calculator
- Choose your unit system — metric (SI) or the American system of measurement.
- Enter the electric current I (in mA, A, or kA).
- Enter the distance d from the wire (in mm, cm, m, inches, or feet).
- The calculator applies B = μ₀ × I / (2π × d) and displays the result in Tesla (T), millitesla (mT), microtesla (μT), and Gauss (G).
Earth's Magnetic Field
The Earth, other planets, and stars in our universe act like giant magnets. The Earth's magnetic field originates in its core, where very hot, electrically conducting fluids reside. The motion of these fluids generates a flowing current — just like in the wire — which is then responsible for producing the magnetic field. The mean magnitude of Earth's magnetic field has changed over the years but presently equals about 5 × 10⁻⁵ T (50 μT). Although this is a tiny field, we can still see it act on a compass.
Let's use the calculator to estimate the current that must flow in a straight wire to obtain Earth's magnetic field at a distance of 1 cm from the wire. It turns out that we need only 2.5 A to keep up with Earth's magnetic field! That is why the calculator also reports your result as a multiple of Earth's field.
Unit Conversions
- 1 T = 1,000 mT = 1,000,000 μT = 10,000 G
- Earth's surface field ≈ 25–65 μT (0.25–0.65 G)
- Refrigerator magnet ≈ 5–10 mT
- MRI machine ≈ 1.5–7 T
Frequently Asked Questions
What shape do the magnetic field lines take around a straight wire?
The magnetic field lines form concentric circles centered on the wire and lying in planes perpendicular to it. The direction of the field is given by the right-hand rule: point your right thumb in the direction of the current, and your curled fingers show the direction of the circular field lines.
Why does the field get weaker farther from the wire?
The magnetic field is inversely proportional to the distance d (B ∝ 1/d). Doubling the distance from the wire halves the field strength. This is different from a point source, whose field falls off as 1/d².
Is this formula exact?
The equation B = μ₀I/(2πd) is exact for an infinitely long, straight wire. For a real wire of finite length it is a very good approximation as long as the distance d is much smaller than the length of the wire and you stay away from its ends.
What is the permeability of free space (μ₀)?
The vacuum permeability μ₀ = 4π × 10⁻⁷ T·m/A is a fundamental physical constant that relates magnetic field strength to the current that produces it in free space. It is sometimes called the magnetic constant or permeability of free space.