# Magnetic Field of a Straight Wire Calculator

URL: https://speedycalculator.com/calculators/physics/magnetic-field-of-straight-current-carrying-wire/
Last updated: 2026-10-30

> The magnetic field of a straight wire calculator finds the magnetic flux density at a distance from a long straight wire carrying a current.

## Inputs

- Current I (A, mA, µA, kA)
- Distance from the wire d (cm, mm, m, in, ft)

## Results

- Magnetic field B
- Compared with Earth's field (≈ 50 µT)

## Formula

```
B = μ₀·I / (2π·d)
```

## Explanation

Current in a wire creates circular magnetic field lines around it. A 10 A cable produces 20 µT at 10 cm – about half of Earth's field – which is why compasses misbehave near power cables.

### How to use the Magnetic Field of a Straight Wire Calculator

- **Current I**
- **Distance from the wire d**

Results update as you type, every field has its own unit menu, and everything is calculated in your browser.

### How it works

Enter the current and the distance from the wire.

### Inputs explained

FieldWhat to enterCurrent IUnits: A, mA, µA, kADistance from the wire dUnits: cm, mm, m, in, ft

### What each result means

- **Magnetic field B** = 1.25663706212e-06×[Current I]÷(2×pi×[Distance from the wire d])
- **Compared with Earth's field (≈ 50 µT)** = [Magnetic field B]÷50e-6×100

### Example values

How the main result changes when **Current I** changes and everything else stays at the example values above:

Current I (A)Magnetic field B (µT)5107.515102012.52515302040

## Worked example

Inputs — Current I: 10 A; Distance from the wire d: 10 cm.

Results — **Magnetic field B = 20 µT**; Compared with Earth's field (≈ 50 µT) = 40 %.

## Key terms

- **Tesla**: SI unit of magnetic flux density.

## FAQ

**Which way do the field lines go?**
Circles around the wire – use the right-hand grip rule.

**Why does a two-core cable produce little field?**
The opposite currents cancel each other.

**How does the field change with distance?**
It falls as 1/d.

**Is the formula valid near the wire's ends?**
No – it assumes an infinitely long wire.


## Sources

- [OpenStax – University Physics Volume 2](https://openstax.org/details/books/university-physics-volume-2)
- [HyperPhysics (Georgia State University)](http://hyperphysics.phy-astr.gsu.edu/hbase/hframe.html)
