Magnetic field dB due to a current carrying element is given by
Applet shows the magnetic induction vector due to a differential element of a circular wire on the axis of the circle. The red vector is the dl element, the blue vector the radius vector r of the point on the axis relative to the element and the green vector dB is the magnetic induction vector due to the element. The components parallel and perpendicular to the axis are shown in maroon and red colors. Dragging the center of the coil shifts it. Dragging in vertical/horizontal directions changes orientations of the coil.