Formula Current-Carrying Wire (Inside) Electric current Radius Distance
$$\class{violet}{B(}r\class{violet}{)} ~=~ \frac{ \mu_0 \, I}{2\pi \, R^2} \, r $$ $$\class{violet}{B(}r\class{violet}{)} ~=~ \frac{ \mu_0 \, I}{2\pi \, R^2} \, r $$
Magnetic field
$$ \class{violet}{B} $$ Unit $$ \mathrm{T} = \frac{\mathrm{kg}}{\mathrm{A} \, \mathrm{s}^2} $$ Magnetic field inside the wire increases linearly with the distance to the center of the wire. The B field runs in cylindrical coordinates in the \(\varphi\) direction.
Electric current
$$ I $$ Unit $$ \mathrm{A} $$ Current in the long straight wire.
Radius
$$ R $$ Unit $$ \mathrm{m} $$ Radius of the long straight wire.
Distance
$$ r $$ Unit $$ \mathrm{m} $$ Distance from the center of the wire to a location \(r\) inside the wire where the magnetic field is to be calculated. Here the formula is valid only for inside the wire: \( r ~\le~ R \).
Vacuum permeability
$$ \mu_0 $$ Unit $$ \frac{\mathrm{Vs}}{\mathrm{Am}} = \frac{ \mathrm{kg} \, \mathrm{m} }{ \mathrm{A}^2 \, \mathrm{s}^2 } $$ Vacuum permeability is a physical constant with the value: \( \mu_0 = 4\pi \cdot 10^{-7} \, \frac{ \text{N} }{ \text{A}^2 } \).