The Biot-Savart law

Each short piece of a current makes a field $d\vec B = \frac{\mu_0}{4\pi}\frac{I\,d\vec l \times \hat r}{r^2}$, and adding the pieces gives the field of any wire, $\frac{\mu_0 I}{2R}$ at the centre of a loop and $\frac{\mu_0 I}{2\pi r}$ round a long straight wire.

From Physics 2.