Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Magnetic Field Inside Solenoid (B)
0.001005
tesla (T)
Field strength (mT) 1.0053 mT
Field strength (gauss) 10.05 G
Turns per metre (n) 400 /m

What is the Solenoid Magnetic Field Calculator?

A solenoid is a long coil of wire that produces a nearly uniform magnetic field along its central axis when an electric current flows through it. This calculator finds the magnitude of that internal magnetic field, \(B\), from three quantities you can measure directly: the number of turns of wire (\(N\)), the current (\(I\)), and the length of the coil (\(l\)). Results are given in tesla, millitesla and gauss so they fit whatever scale your project uses.

Cut-away view of a cylindrical solenoid coil with uniform magnetic field lines inside and current direction arrows
Inside a solenoid the field is nearly uniform and parallel to the axis.

How to use it

Enter the total number of turns of wire, the current in amperes, and the physical length of the solenoid in metres. Press calculate to see the field strength inside the coil along with the turns-per-metre value. The formula assumes an ideal, tightly wound solenoid that is much longer than its diameter, where the field is uniform inside and negligible outside.

The formula explained

The field is given by $$B = \frac{\mu_0 \cdot \text{Turns }(N) \cdot \text{Current }(I)}{\text{Length }(l)}$$ where \(\mu_0 = 4\pi \times 10^{-7}\ \text{T}\cdot\text{m/A}\) is the permeability of free space. The ratio \(N/l\) is the number of turns per metre (\(n\)), so the equation is often written \(B = \mu_0 n I\). Doubling the current or the turn density doubles the field; lengthening the coil while keeping \(N\) fixed weakens it.

Labeled solenoid showing length l, number of turns N, and current I feeding the formula
The formula relates field \(B\) to turns \(N\), current \(I\) and length \(l\).

Worked example

Suppose a solenoid has \(N = 200\) turns over a length of \(l = 0.5\ \text{m}\) carrying \(I = 2\ \text{A}\). Then \(n = 200 / 0.5 = 400\ \text{turns/m}\), and $$B = \frac{(4\pi \times 10^{-7})(200)(2)}{0.5} \approx 0.001005\ \text{T}$$ or about \(1.005\ \text{mT}\) (\(10.05\) gauss).

FAQ

Does the wire diameter matter? Only indirectly — it limits how many turns fit per metre. The formula uses \(N\) and \(l\) directly.

What if there is an iron core? Replace \(\mu_0\) with \(\mu = \mu_0 \mu_r\), where \(\mu_r\) is the relative permeability of the core, which can increase \(B\) by hundreds or thousands of times.

Is the field really uniform? It is nearly uniform deep inside a long solenoid; near the ends it weakens and bulges outward.

Last updated: