# 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 the 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 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 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, RLC Circuit and inductive reactance calculators.

## 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 the solenoid. The infinite solenoid is often a reasonable approximation of a real-world, finite-length solenoid if we can accept that the magnetic field will be slightly different from that of an infinite solenoid in the vicinity of the ends.

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 simplified into:

`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; and
- 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; and
- The length of the solenoid.

This will return the magnetic field inside of it. To learn about the effect of the magnetic field on charged particles, try our Lorentz Force Calculator.