Ans. The formula to calculate the magnetic field due to a current is given by the Biot-Savart law, which states that the magnetic field at a point due to a small element of current is directly proportional to the current, the length of the element, the sine of the angle between the element and the line joining the element to the point, and inversely proportional to the square of the distance between the element and the point.