On this page
Your textbook draws the inside of a solenoid as neat parallel lines and leaves the outside almost empty. That picture comes from adding up the fields of many current loops. Here is the reasoning in three steps, a one-line proof, and a calculation that shows how long "long" has to be.
What happens when you stack many current loops?
The NCERT Class 12 Physics textbook, chapter Moving Charges and Magnetism defines a long solenoid as one whose length is large compared to its radius, with neighbouring turns closely spaced. Each turn acts as a circular loop, and the net field is the vector sum of all the turns. Three things happen.
On the axis, every turn pushes the same way. By symmetry, a loop's field on its axis points along the axis. All turns carry current the same way round, so these contributions add.
Between neighbouring turns, the fields cancel. Close to a wire, its field circles the wire. In the gap between two turns, the circle around one wire points one way and the circle around the next points the other way. Describing its Figure 4.15(a), NCERT says "the field between two neighbouring turns vanishes".
Outside, the return field spreads thin. Every field line through the inside must close on itself outside. Inside, the lines squeeze through one small circle; outside, they spread over all the space around the coil, so the field per square metre is small. NCERT notes that as the solenoid is made longer, the field outside approaches zero.
Why does Ampère's law prove the field is the same everywhere inside?
The standard derivation uses a rectangular Ampère loop with one long side (length h) inside the coil, parallel to the axis, and the other outside. The short ends are perpendicular to the field and contribute nothing, and the outside side contributes nothing because the field there is taken as zero. The loop encloses nh turns, each carrying current I, so Bh = μ0nhI, which gives B = μ0nI (NCERT, section 4.7; the same argument appears in OpenStax University Physics Volume 2, section 12.6).
Notice what is missing: the distance of the inside side from the axis. Slide it up or down and the enclosed current is unchanged, so B is the same at every point inside.
How long does a solenoid need to be? A worked example
Take NCERT's Example 4.8: a solenoid 0.5 m long with radius 1 cm, 500 turns and a current of 5 A (NCERT, Example 4.8). Then n = 500/0.5 = 1000 turns per metre, and the long-solenoid formula gives B = 4π × 10⁻⁷ × 1000 × 5 = 6.28 × 10⁻³ T.
How uniform is it really? For a finite solenoid, the field on the axis is B = (μ0nI/2)(cos α1 + cos α2), where cos α = d/√(d² + r²) and d is the distance from the point to each end. This is the finite-solenoid result in OpenStax, equation 12.27, written with the angles that the ends subtend.
At the centre: d = 0.25 m to each end, so cos α = 0.25/0.2502 = 0.9992. The field is 99.9% of μ0nI.
5 cm (five radii) from one end: d = 0.05 m and 0.45 m give 0.9806 and 0.9998. Their average is 0.990, so the field is still 99% of μ0nI.
At the end itself: d = 0 and 0.5 m give 0 and 0.9998, so the field is almost exactly half (here is why the field at the end of a solenoid is half).
So the field stays flat until you are within a few radii of an end. "Long" means long compared with the radius, not long in metres.
What do exam questions on solenoid fields test?
Before you write B = μ0nI, check:
Is the length much greater than the radius? If not, use the finite formula.
Is the point well away from the ends? On the axis at an end, use half.
Is n in turns per metre? Convert from total turns N with n = N/L.
Is the point outside a long solenoid? Then take B ≈ 0.
Is there a core? An iron core multiplies the field by its relative permeability, as HyperPhysics shows with B = μ0nkI.
Did the radius change? It does not appear in μ0nI, so a fatter long coil with the same n and I has the same interior field.
For comparison, Helmholtz coils make a uniform field from just two loops, while the field of a toroid, which has no ends, varies as 1/r, as OpenStax notes.
If you keep mixing up n and N, or reach for μ0nI near an end, practise solenoid questions in the Fermi Problem Library, where a step-by-step solver explains the reasoning rather than printing an answer. To revise Ampère's law itself, the Fermi Concept Library gives each physics concept its own lesson.
Next time you see parallel lines inside a coil, try explaining the three steps without the book.



