Magnetic field (solenoid): the magnetic field (B) inside a long solenoid is set by its turns per metre and the current it carries, given by B = μ₀nI. This free calculator solves for the field, the turns per metre or the current — in any unit — and shows every step of the working.
A solenoid is a coil of wire wound into a tight helix. When a current flows, the loops reinforce one another and produce a strong, almost perfectly uniform magnetic field along the axis inside the coil. For a long, ideal solenoid that field is B = μ₀ × n × I, where μ₀ is the permeability of free space (4π×10⁻⁷ T·m/A ≈ 1.2566×10⁻⁶), n is the number of turns per metre, and I is the current in amperes. Notice that the diameter of the coil does not appear — only how densely the turns are packed and how much current they carry.
There are three steps. First, decide which quantity you want — the field B, the turns per metre n, or the current I — and select it in the calculator’s Solve for menu. Second, enter the two values you already know and pick their units; the calculator converts everything to SI base units (tesla and amperes) behind the scenes, so you never have to convert by hand. Third, read the answer together with the worked steps, which show the formula, your numbers substituted in, and the final value with its units.
The equation rearranges easily. To find the turns per metre, divide the field by the rest: n = B ÷ (μ₀ × I). To find the current that produces a target field, use I = B ÷ (μ₀ × n). The single most common slip is confusing n (turns per metre) with the total number of turns N: if you know N and the length L, first work out n = N ÷ L. The current itself often comes straight from Ohm’s law, where I = V ÷ R for the coil’s supply.
This formula assumes an air or vacuum core. If the solenoid is wound around a ferromagnetic core such as soft iron, replace μ₀ with μ = μ_r·μ₀, where the relative permeability μ_r can be in the thousands — which is exactly why electromagnets use iron cores.
A solenoid is 0.5 m long and has 1000 turns, so its turns per metre is n = 1000 ÷ 0.5 = 2000 /m. If it carries a current of 2 A, the field inside is B = μ₀ × n × I = (1.2566×10⁻⁶) × 2000 × 2 = 5.03×10⁻³ T, or about 5 mT. To double that field to 10 mT without rewinding the coil, you would simply double the current to 4 A, since B is directly proportional to I.
The uniform field of a solenoid underpins electromagnets, relays, solenoid valves and door locks, inductors in electronics, MRI scanners and particle-physics magnets, and the calibration of magnetic instruments — anywhere a controllable, predictable magnetic field is needed.
The field inside a long, ideal solenoid is B = μ₀nI, where μ₀ is the permeability of free space (4π×10⁻⁷ T·m/A ≈ 1.2566×10⁻⁶), n is the number of turns per metre, and I is the current. The field is uniform along the axis and does not depend on the solenoid’s diameter.
In B = μ₀nI, the lower-case n is the turns per unit length — turns divided by the solenoid’s length (n = N/L). If you only know the total number of turns N and the length L, work out n = N/L first, then enter that value. Using N instead of n is the most common mistake.
The SI unit is the tesla (T). Smaller fields are quoted in millitesla (mT) or microtesla (µT), and the older CGS unit is the gauss (G), where 1 T = 10⁴ G. This calculator converts between T, mT, µT and G for you.
Yes. With a magnetic core you replace μ₀ with the material’s permeability μ = μ_r·μ₀, where μ_r is the relative permeability. Soft iron can have μ_r in the thousands, so a core dramatically increases the field. This calculator assumes an air (vacuum) core, μ_r = 1.
Because B = μ₀nI, you can raise the field by increasing the current I, winding more turns per metre n (more coils in the same length), or adding a ferromagnetic core to multiply μ₀. Doubling either the current or the turns-per-metre doubles the field.