Solenoid Magnetic Field Calculator

By Miłosz Panfil, PhD
Last updated: Aug 07, 2021

The Solenoid Magnetic Field Calculator helps you compute the magnetic field inside a long solenoid. Curious to see what a solenoid is and how to calculate magnetic field of a solenoid? Just continue reading. You will also learn about the solenoid magnetic field equation.

What is a solenoid?

If we run a current through a wire, there is a magnetic field around it. A solenoid is a wire wound tightly in a long, thin coil. Due to its shape, if we run a current through the solenoid, there will be a strong magnetic field inside of it and little magnetic field outside of it.

Solenoids are used in many practical applications whenever there is a need to create a magnetic field. Unlike the magnets, we can control the strength of the magnetic field by just adjusting the electric current. Solenoids, and in general coils, are also basic inductive elements in electric circuits. To find out more, check our Solenoid Inductance Calculator, RLC Circuit calculator and inductive reactance calculator.

Solenoid magnetic field equation

A solenoid of infinite length is the easiest to describe. The magnetic field of an infinite solenoid is precisely zero outside and has a constant value inside of the solenoid. The infinite solenoid is often a reasonable approximation of a real-world, finite-length solenoid if we can accept that in the vicinity of the ends the magnetic field will be slightly different from calculated for an infinite solenoid.

The magnetic field inside a long solenoid is properly calculated by using the cross product and maybe the right hand rule, but all that can be simplify into:

B = µ₀ * N * I / L


  • B is the magnetic field,
  • µ₀ = 1.25664 * 10^-6 T*m/A is the vacuum permeability,
  • N is the number of turns in the solenoid,
  • I is the electric current,
  • L is the length of the solenoid.

How to calculate magnetic field of a solenoid?

The simplest way to calculate the magnetic field of a solenoid is to use our calculator. Simply specify

  • number of turns,
  • the electric current,
  • the length of the solenoid,

to get the magnetic field inside of it. To learn about the effect of the magnetic field on charged particles try our Lorentz Force Calculator.

Miłosz Panfil, PhD
People also viewed…

Coffee kick

A long night of studying? Or maybe you're on a deadline? The coffee kick calculator will tell you when and how much caffeine you need to stay alert after not sleeping enough 😀☕ Check out the graph below!

Immersed weight

The immersed weight calculator helps you understand why objects float or sink in different liquids and guides you through DIY experiments to see firsthand how immersing something in various liquids affects its weight in different ways.
main background