Code tool

Solenoid Magnetic Field Calculator

Enter the number of turns, solenoid length in metres, and current in amperes.

In-browser processingNo account requiredPrivacy details ↗

Central field: —

Calculated locally. Long-solenoid centre approximation for vacuum or air; no core material or end effects.

---

A QUICK WALKTHROUGH

How to use this tool

  1. Enter the stated measurements in the specified units.
  2. Select Calculate to evaluate the formula.
  3. Review the result and the model limitations.

Formula and scope

For a long solenoid, B = μ₀NI/L at its centre. This uses μ₀ = 4π × 10⁻⁷ H/m as the conventional approximation. Independent reference: OpenStax University Physics Volume 2, Solenoids and Toroids (https://openstax.org/books/university-physics-volume-2/pages/12-6-solenoids-and-toroids). Turns N is a positive integer, L > 0 m; current may be signed. Assumes vacuum or air permeability and neglects core materials and end effects.

GOOD TO KNOW

Common questions

What assumptions does this use?

Long-solenoid centre approximation for vacuum or air; no core material or end effects.

Are values uploaded?

No. The calculation runs locally in this browser.