Physics · Moving Charges and Magnetism

Magnetic Field of a Solenoid

A solenoid is a long wire wound into a closely spaced helix, and it is the standard laboratory tool for producing a strong, uniform magnetic field. Following NCERT Section 4.7, this note derives the interior field $B = \mu_0 n I$ from Ampere's circuital law, shows why the field outside vanishes and why it falls to half at the ends, contrasts the solenoid with the toroid, and explains how a soft-iron core turns it into an electromagnet — all of which feed NEET numericals and statement-based questions every year.

What a Solenoid Is

A solenoid is a long wire wound in the form of a helix in which the neighbouring turns are closely spaced. Because each turn is so nearly circular, NCERT treats each one as a circular current loop, and the net field is the vector sum of the fields due to all the turns. Enamelled wire is used so that adjacent turns stay electrically insulated from one another.

The phrase that does all the work here is long solenoid: the length is large compared with the radius. Only then is the interior field genuinely uniform and the exterior field negligible. The clean formula below is an idealisation valid for such a long, tightly wound coil, built from many fields on the axis of a circular loop.

The Field Pattern

For a single section of the winding, the loops of neighbouring turns produce fields that cancel in the gaps and reinforce along the axis. So at the interior mid-point the field is uniform, strong and axial. At an exterior mid-point it is weak and, for a long solenoid, also parallel to the axis with no perpendicular component. As the solenoid is made longer it behaves like a long cylindrical current sheet, and the field outside approaches zero.

The external field lines emerge from one end, loop around the outside, and re-enter at the other end — exactly the pattern of a bar magnet. One end of the solenoid behaves as a north pole and the other as a south pole, which is why a current-carrying solenoid is the closest electrical analogue of a permanent magnet.

Figure 1

Field of a long solenoid — uniform and axial inside, vanishing outside.

B = μ₀nI (uniform, inside) B ≈ 0 (outside) Closely wound turns carrying current I

Deriving B = μ₀nI from Ampere's Law

The derivation rests on Ampere's circuital law, $\oint \mathbf{B}\cdot d\mathbf{l} = \mu_0 I_e$, applied to the idealised long solenoid. As the solenoid is made longer it appears like a long cylindrical metal sheet; the field outside approaches zero and is taken as zero, while the field inside becomes everywhere parallel to the axis.

Following NCERT, consider a rectangular Amperian loop $abcd$ with one long side $ab$ deep inside the solenoid (parallel to the axis) and the opposite side $cd$ outside it.

Figure 2

The rectangular Amperian loop abcd used to apply Ampere's law.

a b c d ab = L = h (field B, inside) cd: outside, B = 0 current I

Along $cd$ the field is zero, as argued above. Along the two transverse sections $bc$ and $ad$ the field component along the path is zero (the field there is either zero outside or perpendicular to the path). These three sides therefore make no contribution. Only the side $ab$, of length $L = h$ deep inside the solenoid, contributes. Let the field along $ab$ be $B$.

Let $n$ be the number of turns per unit length, so the total number of turns threaded by the loop is $nh$. The enclosed current is $I_e = I(nh)$, where $I$ is the current in the solenoid. Ampere's circuital law then gives:

$$BL = \mu_0 I_e \qquad\Rightarrow\qquad Bh = \mu_0 I(nh)$$ $$\boxed{\,B = \mu_0 n I\,}$$

The direction of the field is given by the right-hand rule. Notice what the result does not contain: there is no radius and no distance from the axis, which is precisely why the interior field of a long solenoid is uniform across its whole cross-section. The solenoid is, for this reason, the standard device for obtaining a uniform magnetic field in the laboratory.

Build the foundation

The whole derivation hinges on choosing the right loop. Revise the master tool in Ampere's Circuital Law.

Worked Example · NCERT 4.8

A solenoid of length 0.5 m has a radius of 1 cm and is made up of 500 turns. It carries a current of 5 A. Find the magnitude of the field inside.

Turns per unit length $n = 500/0.5 = 1000$ turns/m. Since length $\gg$ radius ($l/a = 50$), the long-solenoid formula applies: $B = \mu_0 n I = 4\pi\times10^{-7}\times10^{3}\times5 = 6.28\times10^{-3}\ \text{T}$.

Field at the End and Outside

The result $B = \mu_0 n I$ describes the deep interior. At the end (mouth) of the solenoid, a point on the axis sees turns extending in only one direction instead of both, so it receives half the contribution of the deep interior. The axial field at the end of a long solenoid is therefore exactly half the interior value:

$$B_{\text{end}} = \frac{\mu_0 n I}{2}$$

Outside the solenoid, the field is taken as zero for an ideal long solenoid. The closely wound turns behave like a current sheet whose internal field is intense and whose external field cancels; the longer and tighter the winding, the better this approximation holds.

Contrast: The Toroid

A toroid is an endless solenoid — a straight solenoid bent into a closed ring with no ends at all. For a point $P$ at distance $r$ from the centre, draw a circular Amperian path of radius $r$ concentric with the ring. By symmetry the field is everywhere tangential with constant magnitude, so $\oint \mathbf{B}\cdot d\mathbf{l} = B(2\pi r)$. With $N$ total turns each carrying current $i$, the threaded current is $Ni$, and Ampere's law gives:

$$B(2\pi r) = \mu_0 N i \qquad\Rightarrow\qquad B = \frac{\mu_0 N i}{2\pi r}$$

Two contrasts with the straight solenoid are worth fixing. First, the toroidal field uses the total number of turns $N$, whereas the solenoid formula uses turns per unit length $n$. Second, the toroidal field falls off as $1/r$ across the core — it is not uniform — and it is confined entirely within the core, with essentially no field outside the windings.

The Solenoid as an Electromagnet

A solenoid with an air core gives the modest field $B = \mu_0 n I$. Inserting a core of soft iron — a ferromagnetic material with a large relative permeability $\mu_r$ — multiplies this field dramatically. The iron becomes strongly magnetised by the solenoid's field and adds its own much larger contribution, so the field becomes:

$$B = \mu_0 \mu_r n I$$

The factor $\mu_r$ can run into the hundreds or thousands, which makes the iron-cored solenoid a practical electromagnet capable of lifting heavy loads. Soft iron is chosen deliberately: it magnetises strongly when current flows but loses almost all of that magnetism the instant the current is switched off, so the electromagnet can be turned on and off at will. Its strength depends on the current, the turns per unit length, and the core's permeability.

NEET Trap

n is turns per unit length, not total turns

In $B = \mu_0 n I$ the symbol $n$ is the number of turns per metre, $n = N/L$. Students who plug in the total number of turns $N$ get an answer too large by a factor of $L$. Always convert: a 50 cm coil of 100 turns has $n = 100/0.5 = 200$ turns/m, not 100.

Solenoid uses $n$ (per unit length); toroid uses total $N$. Read the question's wording carefully.

NEET Trap

End-field and outside-field confusions

The field at the mouth of a long solenoid is half the interior value, $\mu_0 n I/2$, not the full value. And the field outside a long solenoid is taken as zero, not as some small finite number you must compute. Knowing both halves of this trap clears most statement-based MCQs.

Inside: $\mu_0 n I$. End: $\mu_0 n I/2$. Outside: $\approx 0$.

NEET Trap

A soft-iron core multiplies, it does not add

Inserting soft iron changes the field from $\mu_0 n I$ to $\mu_0 \mu_r n I$ — a multiplication by $\mu_r$, not a small additive correction. If a question swaps an air core for an iron core of $\mu_r = 500$, the field rises 500-fold, not by a few percent.

Iron core: $B = \mu_0 \mu_r n I$. The factor $\mu_r$ can be in the thousands.

Field Summary Table

Location / deviceMagnetic fieldKey feature
Inside a long solenoidB = μ₀nIUniform, axial; independent of radius and position
At the end of a long solenoidB = μ₀nI / 2Half the interior value (turns on one side only)
Outside a long solenoidB ≈ 0Taken as zero for the ideal long solenoid
Inside a toroidB = μ₀Ni / 2πrUses total turns N; falls as 1/r; field outside ≈ 0
Solenoid with soft-iron coreB = μ₀μᵣnIElectromagnet; μᵣ multiplies the field
Quick Recap

Solenoid field in one screen

  • A long solenoid is a closely wound helix with length $\gg$ radius; each turn acts as a circular loop and their fields sum.
  • Interior field is uniform and axial: $B = \mu_0 n I$, with $n = N/L$ turns per unit length. It contains no radius — hence uniform.
  • Derived from Ampere's law on a rectangular loop: only the inside side $ab$ contributes ($cd$ outside gives zero, $bc$ and $ad$ are transverse).
  • Field at the end is half: $\mu_0 n I/2$. Field outside is taken as zero.
  • Toroid (endless solenoid): $B = \mu_0 N i/2\pi r$ — uses total $N$, not uniform, confined to the core.
  • A soft-iron core makes it an electromagnet: $B = \mu_0 \mu_r n I$, with $\mu_r$ in the hundreds or thousands; soft iron loses magnetism when current stops.
  • External field lines mimic a bar magnet, one end behaving as N, the other as S.

NEET PYQ Snapshot — Magnetic Field of a Solenoid

Solenoid numericals recur almost every year; all of them reduce to B = μ₀nI with n = N/L.

NEET 2022

A long solenoid of radius 1 mm has 100 turns per mm. If 1 A current flows in the solenoid, the magnetic field strength at the centre of the solenoid is

  1. 12.56 × 10⁻² T
  2. 12.56 × 10⁻⁴ T
  3. 6.28 × 10⁻⁴ T
  4. 6.28 × 10⁻² T
Answer: (1)

$B = \mu_0 n I$. Here $n = 100\ \text{turns/mm} = 100\times10^{3}\ \text{turns/m}$. So $B = 4\pi\times10^{-7}\times10^{5}\times1 = 4\pi\times10^{-2} = 12.56\times10^{-2}\ \text{T}$. The radius is irrelevant — a distractor.

NEET 2020

A long solenoid of 50 cm length having 100 turns carries a current of 2.5 A. The magnetic field at the centre of the solenoid is (μ₀ = 4π × 10⁻⁷ T m A⁻¹)

  1. 3.14 × 10⁻⁴ T
  2. 6.28 × 10⁻⁵ T
  3. 3.14 × 10⁻⁵ T
  4. 6.28 × 10⁻⁴ T
Answer: (4)

$n = N/L = 100/0.5 = 200\ \text{turns/m}$. $B = \mu_0 n I = 4\pi\times10^{-7}\times200\times2.5 = 6.28\times10^{-4}\ \text{T}$. Note the conversion of 100 turns over 0.5 m into $n$.

NEET 2017

A long solenoid of diameter 0.1 m has 2 × 10⁴ turns per metre. A coil of 100 turns and radius 0.01 m sits at the centre with its axis along the solenoid axis. The solenoid current falls steadily from 4 A to 0 in 0.05 s. If the coil's resistance is 10π² Ω, the total charge flowing through the coil is

  1. 16 π μC
  2. 32 π μC
  3. 16 μC
  4. 32 μC
Answer: (4)

The solenoid field at the coil is $B = \mu_0 n I$. Charge $q = \Delta\phi / R = N_{\text{coil}} B A_{\text{coil}}/R = 100\times(4\pi\times10^{-7}\times2\times10^{4}\times4)(\pi\times(10^{-2})^2)/(10\pi^2) = 32\ \mu\text{C}$. The solenoid field $B = \mu_0 n I$ is the starting point.

FAQs — Magnetic Field of a Solenoid

Common solenoid doubts, answered in line with NCERT Section 4.7.

What is the formula for the magnetic field inside a long solenoid?
The field inside a long solenoid is uniform and given by B = μ₀nI, where n is the number of turns per unit length and I is the current. Here n is turns per metre (n = N/L), not the total number of turns N. The field is directed along the axis and is the same at every interior point of a long, tightly wound solenoid.
Why is the magnetic field outside a long solenoid zero?
When the solenoid is much longer than its radius, the contributions of the closely spaced turns add to give a strong axial field inside and cancel outside. The exterior field of one ideal infinite solenoid approaches zero, so in NCERT it is taken as exactly zero. This is why, along the side cd of the Amperian loop drawn outside, B·dl is zero in the derivation.
What is the magnetic field at the end of a long solenoid?
At a point on the axis at the very end (mouth) of a long solenoid, the field is half of the interior value, B = μ₀nI/2. Physically the end sees turns extending in only one direction instead of both, so it receives half the contribution that the deep interior receives.
How does the field of a toroid differ from that of a solenoid?
A toroid is a solenoid bent into a closed ring. Its field is confined entirely within the core and is B = μ₀NI/2πr, where N is the total number of turns and r is the radius of the circular Amperian path. Unlike the straight solenoid, the toroidal field is not uniform across the core — it falls off as 1/r — and there is essentially no field outside.
Why does inserting a soft-iron core increase a solenoid's field?
A soft-iron core is a ferromagnetic material with a large relative permeability μᵣ. When placed inside the solenoid it becomes strongly magnetised and the field becomes B = μ₀μᵣnI, raising the field by the factor μᵣ, which can be in the hundreds or thousands. This is the principle of the electromagnet; soft iron is used because it loses its magnetism the moment the current stops.
Does the solenoid's interior field depend on the radius or the position inside it?
For an ideal long solenoid, no. The expression B = μ₀nI contains neither the radius nor the distance from the axis, so the interior field is uniform across the whole cross-section and along the length. The radius matters only near the ends and for a short solenoid, where the field is weaker and non-uniform.