Let’s assume the lop carrying the current and having the length .
Consider the diagram shows current carrying loop as,

According to the Ampere’s law, the magnetic field along a closed loop is given by,
The expression for the magnetic field due to the wire is given as,
Here s is the distance.
The resultant field due to both the wire is given by,
Substitute for B into above equation.
role="math" localid="1658138349161"
The magnetic flux is given by,
Substitute into above equation.
Since, therefore
….. (1)
The magnetic flux in term of inductance and current is given by,
Equate the equation (1) and (2),
Hence the self-inductance of the hairpin loop is.