Magnetic Field Around a Wire Calculator (Ampère's Law)
Magnetic field at a given distance from a straight wire carrying a current, in microtesla and gauss, compared with the Earth's field.
Results
The dashed line marks the value you entered.
What this tool does
Ampère's law — another of Maxwell's equations — says the magnetic field circling a long straight wire falls off as one over the distance: double the distance and the field halves. Ten amps at 5 cm gives 40 µT, about the same as the Earth's own field (roughly 25 to 65 µT depending on where you are), which is why a compass next to a cable can be fooled. A household cable carries the same current out and back in two conductors millimetres apart, so their fields almost cancel; this gives the field of one conductor on its own, which is the worst case.
Formula
B = μ₀ I ÷ (2π r) (μ₀ = 4π × 10⁻⁷ H/m)
Variables
| Symbol | Meaning | Unit |
|---|---|---|
i | Current | A |
r | Distance | cm |
ef | Reference field (Earth ≈ 50 µT) | µT |
B | Magnetic field | µT |
BG | Field in gauss | G |
HF | Magnetising field H | A/m |
RT | Times the reference field | × |
RD | Distance where it falls to the reference | cm |
Worked example
- Current10 A
- Distance5 cm
- Reference field (Earth ≈ 50 µT)50 µT
- Magnetic field40 µT
- Field in gauss0.4 G
- Magnetising field H31.831 A/m
- Times the reference field0.80 ×
- Distance where it falls to the reference4 cm
Limitations
- The formula assumes ideal geometry — an infinitely long wire or coil, a perfectly uniform sphere — in empty space or a uniform material. Real parts come close, but ends, nearby metal and magnetic materials change the field.
- Electrical installations are governed by national wiring rules. Cable sizing also depends on installation method, grouping, ambient temperature and protection devices, which this calculator does not evaluate.