Biot-Savart's law is used to determine the magnetic field at a point due to a current element. It states that the magnetic field by a small current carrying element at a point (distance of r) is given by
dB = μ₀/(4π) * (Idl sin θ)/r²
where dl is the length of the small element and θ is the angle between the direction of the small element and the line joining the current element and the external point.
Consider a current carrying loop of radius r and current I (refer image (I))
If we consider a small element dl,
dB = μ₀/(4π) * (Idl sin θ)/r²
sin θ = 90° at all times and dl = rdθ
∴B = μ₀I/(4πr²) ∫₀²π rdθ = μ₀I/(4πr) [θ]₀²π = μ₀I/(4πr) [2π]
B = μ₀I/(2r)