Magnetic field strength at the center of a solenoid having
#mu_0#is permeability of free space and #= 4π × 10^-7 H.m^-1#
It can be shown that for an infinitely long solenoid having same number of turns per unit length of the solenoid, the magnetic field is constant everywhere inside.
A solenoid having ends, can be considered as an infinitely long solenoid minus the end parts that stretch up to infinity. The magnetic field strength on the axis of the solenoid, at the end of the solenoid is equal to the field of an infinitely long solenoid minus half of it because half of solenoid (or half number of turns) is missing. Therefore,