SOLVETUTORMATH SOLVER

Instrument MI-03-434 · Physics

Solenoid Magnetic Field Calculator

Wind wire into a tight coil and drive current through it: the field inside grows in direct proportion to how many turns per metre, with no coil radius involved at all.

Instrument MI-03-434
Sheet 1 OF 1
Rev A
Verified
Type 03 — Magnetism SER. 2026-03434

Magnetic field inside the coil, T

0.01256637

B = μ₀NI ⁄ l

The working Every figure verified twice
  1. B = 0.000001·500·2 ⁄ 0.1 = 0.01256637
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

A solenoid is a coil of wire wound densely and uniformly along its length, and the field building up inside it comes from every turn contributing in the same direction, stacking like layers instead of cancelling the way loops pointed every which way would. Apply Ampère's law along a rectangular path that runs down the coil's axis, cuts out through the winding, and closes outside where the field is essentially zero, and only the segment running through the interior survives the integral. What remains is B times that segment's length equal to μ₀ times the current enclosed — I multiplied by however many turns thread through the path. Divide through and B = μ₀NI ⁄ l falls out directly: the field depends on turns packed into a length, not on any single turn's size.

Notice what is missing from that equation: the coil's diameter never appears. That surprises people used to a single circular loop, where the on-axis field from the Biot-Savart law genuinely does shrink as the loop widens. A long solenoid behaves differently because Ampère's law treats the winding as a cylindrical sheet of current, and stretching that sheet to any radius leaves the interior field, set only by turn density and current, unchanged — provided the coil stays long compared with its diameter, roughly a ten-to-one ratio or better. That is what lets a relay designer swap a fat bobbin for a slim one, or a student rewind a coil onto a wider tube, without touching the field strength at all.

The formula also assumes an air core and an idealized, infinitely long winding, and both assumptions carry real consequences. Slide an iron rod inside the coil and the field jumps by a factor of the core's relative permeability — often several hundred to a few thousand for soft iron or ferrite — because the material's own atomic dipoles align with and reinforce the applied field, a separate multiplication this instrument does not attempt. A real, finite coil is only this uniform in the middle, too: right at the open end of the winding, where half the surrounding turns are simply missing, the field drops to almost exactly half the interior value, a detail that matters to anyone positioning a plunger or sensor near the mouth of the coil.

B=μ0NIlB = \frac{\mu_0 N I}{l}
B — magnetic field inside the coil (tesla, T) · μ₀ — vacuum permeability, 1.25663706212×10⁻⁶ T·m/A · N — number of turns · I — coil current (amperes, A) · l — coil length (metres, m).
  • Enter Number of turns — the total count of wire loops wound along the coil, not a rate per unit length.
  • Enter Coil current — the steady current flowing through every turn, in amps or milliamps.
  • Enter Coil length — the physical span the turns are wound over, from millimetres up to metres; keep it well beyond the coil's diameter for the formula to stay accurate.
  • Read Magnetic field inside the coil, T — the result in tesla, uniform along the central axis away from the two open ends.
  • To see the relationship directly, double the turns and watch the field double, or double the length and watch it halve.

Worked example — 500 turns, 10 cm long, 2 amps

Wind 500 turns of wire onto a form 10 cm — 0.1 m — long and drive 2 A through it. Turn density comes first: n = N ⁄ l = 500 ⁄ 0.1 = 5,000 turns per metre. Multiply by the current and by μ₀: B = μ₀ × n × I = 1.25663706212×10⁻⁶ × 5,000 × 2 = 0.0125663706212 T, about 12.57 mT. That is roughly the surface field of a strong refrigerator magnet, produced here with nothing but copper wire, an air core, and a bench power supply.

Scaling shows the shape of the formula better than any single number does. Wind twice as many turns onto the same 10 cm form — 1,000 instead of 500 — and the field exactly doubles, to 0.0251327412424 T, about 25.13 mT, because B is linear in N. Stretch the original 500-turn coil out to 20 cm instead, and the field is cut exactly in half, to 0.0062831853106 T, about 6.28 mT, because those same 500 turns are now spread twice as thin. It is easy to confuse this linear turn dependence with the way self-inductance scales — inductance grows with the square of the turns, since it also depends on how much flux each individual turn links — but the field itself only ever tracks turns per metre.

Questions

Why doesn't the coil's diameter appear in the formula?

Because the ideal-solenoid derivation treats the winding as an infinite cylindrical sheet of current, and Ampère's law over a rectangular path makes the radius cancel out completely — unlike a single circular loop, whose on-axis field from the Biot-Savart law does shrink as the loop widens. The cancellation holds well once the coil's length is roughly ten times its diameter or more; a short, fat coil departs from this formula noticeably near its ends.

Does slipping an iron core inside the coil change the answer?

Yes, dramatically, and this calculator does not model it. B = μ₀NI ⁄ l assumes an air core with relative permeability of 1. A ferromagnetic core — soft iron or ferrite — adds its own aligned atomic dipoles to the applied field, multiplying the result by the core's relative permeability, often several hundred to a few thousand, which is exactly how a small coil becomes a strong electromagnet.

Why is the field weaker right at the ends of the coil?

Because B = μ₀NI ⁄ l is only exact deep inside an ideally long solenoid, where turns surround the point on every side. At the very opening, half of that surrounding winding is simply absent, and the field there works out to almost exactly half the interior value. Anyone positioning a plunger, a Hall sensor, or a pickup coil near the mouth of a real solenoid needs to account for this droop rather than assume the interior figure applies.

How does the field change if I double the turns, or double the length instead?

Doubling the turns doubles the field: 500 turns at 2 A over 10 cm gives 12.57 mT, and 1,000 turns under the same current and length gives 25.13 mT. Doubling the length instead has the opposite effect — stretching that same 500-turn coil from 10 cm to 20 cm halves the field to 6.28 mT, because the same turns are now spread over twice the distance. Both responses trace straight back to the turn density N ⁄ l sitting inside the formula.

What exactly is μ₀, and why does it sit in the formula?

μ₀ is the vacuum permeability, the constant fixing how strong a magnetic field a given current produces in empty space: 1.25663706212×10⁻⁶ T·m/A, very close to the older textbook value of 4π×10⁻⁷ exactly. Since the SI system's 2019 redefinition tied the ampere to a fixed value of the elementary charge rather than to μ₀ directly, μ₀ became a measured quantity with a tiny uncertainty instead of an exact constant — a change with no practical effect at the precision this calculator works to.

Who actually needs to calculate a solenoid's magnetic field?

Anyone building or specifying an air-core electromagnet: an engineer sizing the coil in a solenoid valve or relay so it develops enough pull on the plunger, a physics student winding a coil for a Helmholtz-style demonstration, or a hobbyist building a coilgun who needs to know how many turns and how much current a given field target actually requires before winding a single loop of wire.

References