Physics & Mechanics

Magnetic Field (Straight Wire) Calculator

Calculate the magnitude of the magnetic field generated by a long, straight wire carrying an electric current.

A
m
Magnetic Field (B)
4 × 10⁻⁵

Calculated locally in your browser. Fast, secure, and private.

Magnetism from Electricity

In 1820, Hans Christian Ørsted discovered that a wire carrying an electric current creates a magnetic field ($B$) around it. This discovery laid the foundation for the entire field of electromagnetism.

For a long, straight wire, the magnetic field forms concentric circles around the wire. The strength of this field depends on:

  • Current ($I$): A stronger current produces a stronger magnetic field.
  • Distance ($r$): The field strength drops off linearly as you move further away from the wire ($1/r$).

The Right-Hand Rule

To determine the direction of the magnetic field, use the Right-Hand Rule:

  1. Point your right thumb in the direction of the conventional current flow ($+$ to $-$).
  2. Your fingers will naturally curl in the direction of the magnetic field lines.

The Formula

B=μ0I2πr\begin{aligned} B = \frac{\mu_0 \cdot I}{2 \cdot \pi \cdot r} \end{aligned}

Where:
B=
Magnetic Field Strength (Tesla, T)
μ0\mu_0=
Permeability of Free Space (4π × 10⁻⁷ T·m/A)
I=
Current (Amperes, A)
r=
Distance from wire (meters, m)

Example Calculation

A wire carries a current of $20 , \text{Amps}$. You want to find the magnetic field strength at a distance of $2 , \text{cm}$ ($0.02 , \text{m}$).

  1. Constants: $\mu_0 = 4\pi \times 10^{-7} \approx 1.257 \times 10^{-6}$.
  2. Calculate: $(1.257 \times 10^{-6} \times 20) / (2 \cdot \pi \cdot 0.02) = 0.0002 , \text{Tesla}$.

The magnetic field is $200 , \mu\text{T}$ (about 4-5 times stronger than the Earth's magnetic field).

Frequently Asked Questions

A Tesla (T) is a very large unit. The Earth's magnetic field is only about $0.00005 , \text{T}$ ($50 , \mu\text{T}$). A strong refrigerator magnet is about $0.005 , \text{T}$, while an MRI machine uses fields between $1.5 , \text{T}$ and $3 , \text{T}$.

Mathematically, the field extends to infinity, getting weaker with distance. Practically, it eventually becomes so weak that it is masked by the Earth's magnetic field or other electronic noise.

By twisting two wires carrying current in opposite directions, their magnetic fields cancel each other out. This reduces electromagnetic interference (EMI) and 'crosstalk' in data cables like Ethernet.