Magnetic Field Calculator Formula
Understand the math behind the magnetic field calculator. Each variable explained with a worked example.
Formulas Used
Magnetic Field
magnetic_field = 4e-7 * pi * current / (2 * pi * distance)Magnetic Field (μT)
magnetic_field_ut = 4e-7 * pi * current / (2 * pi * distance) * 1e6Variables
| Variable | Description | Default |
|---|---|---|
current | Current(A) | 10 |
distance | Distance from Wire(m) | 0.05 |
How It Works
Magnetic Field of a Straight Wire
A current-carrying wire generates a circular magnetic field around it.
Formula
B = mu_0 * I / (2 * pi * r)
where mu_0 = 4*pi x 10^-7 T·m/A is the permeability of free space. The field direction follows the right-hand rule.
Worked Example
Magnetic field 5 cm from a wire carrying 10 A.
current = 10distance = 0.05
- 01B = mu_0 * I / (2*pi*r)
- 02B = 4*pi*1e-7 * 10 / (2*pi*0.05)
- 03B = 4e-6 / 0.1
- 04B = 4e-5 T = 40 μT
Ready to run the numbers?
Open Magnetic Field Calculator