Compute a solenoid's magnetic field B (tesla) — long ideal solenoid, finite solenoid along the axis with a B(x) profile chart, single loop & Helmholtz pair, plus field energy density and force on an iron core. Not an inductance calculator (see FAQ).
A real finite-length solenoid: the field at point x on the axis (x = 0 at the center) is computed from the viewing angles to both ends: B(x) = ½μ₀nI·(cosθ₁ − cosθ₂). The chart below plots the B(x) profile along the solenoid.
Magnetic field energy density u = B²/(2μ₀) — energy stored per cubic meter. The pull force on a ferromagnetic core/plunger in the air gap follows from Maxwell stress: F = u·A = B²·A/(2μ₀).
| Scenario | Input | Result |
|---|---|---|
| Lab solenoid | N = 1000, L = 10 cm, I = 1 A | B = 12.56637 mT |
| Finite solenoid at center | N = 1000, L = 10 cm, R = 2 cm, I = 1 A, x = 0 | B = 11.6676 mT |
| Finite solenoid at x = 2 cm | N = 1000, L = 10 cm, R = 2 cm, I = 1 A | B = 11.2694 mT |
| Single loop at center | N = 1, R = 10 cm, I = 1 A | B = 6.283185 µT |
| Helmholtz pair | n = 100 turns, R = 10 cm, I = 1 A | B = 0.899176 mT |
| Inverse: find N | B = 10 mT, L = 10 cm, I = 1 A | N = 795.77 turns |
| Inverse: find I | B = 10 mT, N = 500, L = 10 cm | I = 1.5915 A |
| Energy density B = 1 T | u = B²/(2μ₀) | u = 397,887.36 J/m³ |
| Core force B = 1 T, A = 1 cm² | F = B²A/(2μ₀) | F = 39.7887 N |
| Earth's magnetic field | B ≈ 50 µT | u ≈ 9.9472×10⁻⁴ J/m³ |
All values recomputed from definitions with 50-digit arithmetic; the calculator uses full float precision and the rounded numbers here are for display only.
Formulas: long ideal solenoid B = μ₀·N·I/L = μ₀·n·I (n = turns per meter). Finite solenoid on axis: B(x) = ½·μ₀·n·I·(d₁/√(R²+d₁²) + d₂/√(R²+d₂²)) with d₁ = L/2 − x and d₂ = L/2 + x. Single loop at center: B = μ₀·N·I/(2R). Helmholtz pair at midpoint: B = (4/5)3/2·μ₀·n·I/R ≈ 0.7155·μ₀·n·I/R. Energy density u = B²/(2μ₀); Maxwell force on core F = u·A.
Constants: μ₀ = 4π×10⁻⁷ H/m — the exact defined value before 2019; since the 2019 SI redefinition it is a measured quantity deviating ~2×10⁻¹⁰, which changes no displayed digit here. The formulas above assume an air/vacuum core (μ ≈ μ₀); a ferromagnetic core raises B nonlinearly and needs the material's B–H curve.
For a long ideal solenoid, B = μ₀·N·I/L = μ₀·n·I, with N the number of turns, L the solenoid length (meters), I the current (amperes), n = N/L the turns per meter, and μ₀ = 4π×10⁻⁷ H/m. Example: N = 1000, L = 10 cm, I = 1 A → B = 4π×10⁻⁷ × 1000 × 1 / 0.1 = 0.01256637 T = 12.56637 mT.
A real finite-length solenoid uses the angle formula: B(x) = ½·μ₀·n·I·(d₁/√(R²+d₁²) + d₂/√(R²+d₂²)), with d₁ = L/2 − x and d₂ = L/2 + x (x measured from the center), R the winding radius. Example: N = 1000, L = 10 cm, R = 2 cm, I = 1 A → at the center (x = 0) B = 11.6676 mT, while the ideal formula gives 12.56637 mT. At x = 2 cm, B = 11.2694 mT. Use the “Finite solenoid” mode above to plot the B(x) profile.
B = μ₀·N·I/(2R), with R the loop radius. Example: one loop (N = 1), R = 10 cm, I = 1 A → B = 4π×10⁻⁷ × 1 × 1 / 0.2 = 6.283185×10⁻⁶ T = 6.283185 µT = 0.0628319 G.
Two identical coaxial coils spaced one radius apart produce a very uniform field at the center. At the midpoint: B = (4/5)^1.5·μ₀·n·I/R ≈ 0.7155·μ₀·n·I/R (n = turns per coil). Example: n = 100, R = 10 cm, I = 1 A → B = 0.899176 mT. Helmholtz pairs are used for sensor calibration and experiments needing a uniform field.
SI: tesla (T). Its submultiples: millitesla (1 mT = 10⁻³ T), microtesla (1 µT = 10⁻⁶ T), nanotesla (1 nT = 10⁻⁹ T). The cgs unit: gauss — 1 G = 10⁻⁴ T (so 1 T = 10,000 G). Example: a solenoid with N = 1000, L = 10 cm, I = 1 A gives B = 0.01256637 T = 12.56637 mT = 125.6637 G. Earth's magnetic field ~25–65 µT (0.25–0.65 G); a fridge magnet ~5 mT (50 G); MRI 1.5–3 T.
Honestly: that was the exact defined value before 2019, when the ampere was defined via μ₀. Since the 2019 SI redefinition, the ampere is decoupled from μ₀ so μ₀ became a measured quantity; its experimental value deviates from 4π×10⁻⁷ by only ~2×10⁻¹⁰ — not changing a single displayed digit in engineering calculations or coursework. This calculator uses 4π×10⁻⁷ H/m and labels it as the pre-2019 defined value.
The physical quantity differs. This tool (#1831) computes the MAGNETIC FIELD B in tesla/gauss — how strong the field produced by the current is. The solenoid-inductance tool (#462) computes INDUCTANCE L in henry — the circuit property that determines induced emf and stored energy ½LI². Both take the same N, L, I, R as inputs but answer different questions: “how strong is the field?” vs “what is the inductance?”. This tool doesn't compute inductance at all.
Energy density (energy per volume): u = B²/(2μ₀). Example: B = 1 T → u = 1/(2 × 4π×10⁻⁷) = 397,887.36 J/m³. Pull force on a ferromagnetic core/plunger in the air gap (Maxwell stress): F = u·A = B²·A/(2μ₀). Example: B = 1 T, core area A = 1 cm² → F = 39.7887 N (~4 kgf). This is an air-gap idealization; a real core with leakage flux gives a smaller force.
Invert the formula: N = B·L/(μ₀·I), I = B·L/(μ₀·N), L = μ₀·N·I/B. Example: for B = 10 mT with L = 10 cm and I = 1 A → N = 0.01 × 0.1/(4π×10⁻⁷ × 1) = 795.77 turns. With N = 500 and L = 10 cm, the required current is I = 1.5915 A. With N = 500 and I = 2 A, the required length is L = 12.5664 cm. Use the “Find N/I/L” direction in the Ideal solenoid mode.
From the finite formula: at the end (x = L/2), one angle term vanishes (d₁ = 0), so B_end ≈ ½·B_center for a sufficiently long solenoid. Example: N = 1000, L = 10 cm, R = 2 cm, I = 1 A → B at the center 11.6676 mT, at the end 6.16117 mT (ratio 0.528 — slightly above ½ because the solenoid isn't very long). For very long solenoids the ratio approaches exactly ½.
No — the formulas here use μ ≈ μ₀ (air/vacuum core), which is right for coursework, Helmholtz coils, and coreless solenoids. A ferromagnetic core raises B nonlinearly (μᵣ can be hundreds to thousands) and saturates, so it needs the material's B–H curve; the result is not simply μᵣ × B_air. The “Core energy & force” mode only uses the air-gap model to estimate pull force.
More general field energy density (including the electric field E, with a proof tab that u_E = u_B) is in the energy-density-of-electric-and-magnetic-fields tool (#1610). The force on a straight current-carrying wire (F = I·L·B·sinθ) is in the magnetic-force-on-current-carrying-wire tool (#1720). The Lorentz force on a moving charge (F = qvB) is in the lorentz-force tool. This tool is specifically for coil-produced B: solenoids, loops, and Helmholtz pairs.
Free tool by NRTechStudio
Explore similar science tools and calculators. 100% free, accurate, and runs completely in your browser without sign-up.
2 taps, no typing needed — diagnostics are sent automatically.