Magnetic Field of a Wire Calculator for Straight Wires

Created by Kenneth Alambra
Last updated: Sep 07, 2022

If you're wondering how to calculate the strength of the magnetic field a current-carrying wire produces, this magnetic field of a wire calculator is for you. Let this tool be your introductory guide to understanding:

  • The magnetic field of a wire;
  • How to calculate the strength of the magnetic field; and
  • How to use this magnetic field of a current-carrying wire calculator.

Magnetic field of a wire

One essential thing to know about electric current is that, apart from using it to power our electronic devices and appliances, we can also use electricity to produce magnetic fields.

A classic example we can use to demonstrate this is the assembly of a simple electromagnet. We can do that by wrapping a piece of electrical wire multiple times around a steel nail and connecting both the ends of the wire to the positive and negative terminals of a battery. With that, we produce a magnetic field around the steel nail, which makes it act like a magnet.

But did you know that you don't have to wrap the wire around a nail to make an electromagnet? Running a current through a straight wire also creates a magnetic field around it. Wrapping multiple times around a ferromagnetic object (i.e., things that can be magnetized) intensifies the magnetic field. You can learn more about that in our solenoid magnetic field calculator.

This text will discuss the fundamental concept of finding the magnetic field strength around a current-carrying long straight wire. Keep reading to learn how to calculate the magnetic field around a current-carrying wire.

How to calculate magnetic field of a current-carrying wire?

The magnetic field strength around a long straight wire depends on the strength of amperage flowing through the wire and the permeability factor around the wire. The magnetic field around a wire, which emanates in concentric circles around the wire, also varies in strength as we move farther away from the wire. Here is the magnetic field strength formula we can use to understand the relationship between these variables better:

B=μ0×I2π×d\small B = \frac{\mu_0\times I}{2\pi\times d}

Where:

  • BB is the magnetic field strength (in tesla\text{tesla}) at distance d;
  • μ0\mu_0 is the permeability of free space around the wire (in tesla-meters per ampere\text{tesla-meters per ampere});
  • II is the amperage or current flowing through the wire (in amperes\text{amperes}); and
  • dd is the perpendicular distance from the wire (in meters\text{meters}).

We can easily measure the amperage using an ammeter or a multimeter, and the distance, dd, using a ruler. On the other hand, the permeability of free space (or vacuum), which is a physical constant that affects the magnetic flux emanating from a source, has a value shown below:

μ0=4π×107 TmA=1.256637061×106 TmA\small \begin{align*} \mu_0 &= 4\pi \times 10^{-7}\ \tfrac{\text{T}\cdot \text{m}}{A}\\ &= 1.256637061\times 10^{-6}\ \tfrac{\text{T}\cdot \text{m}}{A} \end{align*}

We can then simplify our formula by combining the constant μ0\mu_0 and the magnetic field formula to have:

B=μ0×I2π×d=(4π×107)×I2π×d=2×107×Id=2×Id×107\small \begin{align*} B &= \frac{\mu_0\times I}{2\pi\times d}\\[1.2em] &= \frac{(4\pi \times 10^{-7})\times I}{2\pi\times d}\\[1.2em] &= \frac{2 \times 10^{-7}\times I}{d}\\ &= \frac{2\times I}{d}\times 10^{-7}\\ \end{align*}

From our equation above, we can figure that with higher amperage, we can produce a stronger magnetic field. However, at farther distances, the weaker the magnetic field becomes.

So let's say we have a long straight wire wherein 10 amperes\small{10\ \text{amperes}} of current flows. The magnetic field 5 centimeters\small{5\ \text{centimeters}} (or 0.05 meters\small{0.05\ \text{meters}}) away from it is:

B=2×Id×107=2×10 A0.05 m×107=400 Am×107=0.00004 T\small \begin{align*} B &= \frac{2\times I}{d}\times 10^{-7}\\[1.2em] &= \frac{2\times 10\ \text{A}}{0.05\ \text{m}}\times 10^{-7}\\[1.2em] &= 400\ \tfrac{\text{A}}{\text{m}}\times 10^{-7}\\[0.5em] &= 0.00004\ \text{T}\\ \end{align*}

🙋 Remember that for our magnetic field of a wire calculation, the permeability constant has a unit of measure in TmA\tfrac{\text{T}\cdot \text{m}}{A}. So multiplying to it a value that results in a unit of measure in Am\tfrac{\text{A}}{\text{m}} leaves us with T\text{T} or tesla.

How to use this magnetic field of a wire calculator

Although manually calculating the magnetic field is very easy, it can be very tiresome if you have to do it for various situations. That is where our magnetic field or a wire calculator comes in handy. Here are the steps in using our calculator:

  1. Enter the current flowing through the wire.
  2. Input the distance you're interested to know the magnetic field caused by the flowing current.
  3. You can skip step 1 or step 2 and enter a value for the magnetic field to solve for the unknown variable.

🔎 We can easily perceive the magnetic field around a wire by bringing a ferromagnetic object near it. We can also bring another current-carrying wire near it and feel either an attractive or repulsive force between the two wires. Learn more about magnetic force between two wires by checking out our magnetic force between current-carrying wires calculator.

Kenneth Alambra
Current
A
Distance
in
Magnetic field
T
People also viewed…

Hall coefficient

Examine the Hall effect phenomenon with our Hall coefficient calculator.

Schwarzschild radius

Discover the fundamental of black hole physics with our Schwarzschild radius calculator.

Solenoid magnetic field

The solenoid magnetic field calculator estimates the magnetic field created by specific solenoid.
main background