A Solenoid is a tightly compacted coil of wire, much like a slinky.
It has a number of turns
When it carries a Current
As you get closer to the ends of a solenoid, the magnetic field breaks down. We typically only look at the magnetic field in the center of the solenoid. An “ideal” solenoid is infinitely long.
We can use Ampere’s Law to find the magnetic field
Then we do the math: