A long wire wound closely around a circular ring forms a toroid.
Considering the symmetry of the problem it can be argued that the lines of force would be circles whose centers lie on the axis of the toroid.
To apply Ampere's law we consider one such circle as an Amperian loop.
So for a loop lying inside a solenoid, , where is the total number of turns on the toroid, is the steady current through each turn and is the current enclosed by the loop.
Thus, .
The magnetic field inside the toroid is non-uniform and is given by the formula above.
On the other hand, since the net current outside the toroid is zero, the magnetic field outside the toroid is also zero.