# Solenoid Magnetic Field Calculator

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 and RLC Circuit 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

`B = µ₀ * N * I / L`

where

- 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.