Magnetic Field of a Long Straight Wire Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Enter current and distance to compute magnetic field strength.

The Physics of Magnetic Fields Around Wires

Whenever electric charges move, they generate magnetic fields. A simple yet fundamental example is an infinitely long, straight conductor carrying a steady current. In this configuration, the magnetic field lines form concentric circles centered on the wire, and their strength diminishes with distance. This calculator applies the formula derived from Ampère's law or the Biot–Savart law to compute the magnitude of the magnetic field at a given radial distance. The relationship is expressed as B=μI0/2πr, where μ0 is the permeability of free space, I is the current in amperes, and r is the perpendicular distance from the wire in meters. Understanding this simple geometry lays the groundwork for analyzing more intricate electromagnetic systems ranging from coils to transmission lines.

Derivation from Ampère's Law

Ampère's circuital law states that the line integral of the magnetic field around a closed loop equals the permeability times the total current enclosed: B·dl=μ0I. For a straight wire, the symmetry suggests choosing a circular integration path of radius r centered on the wire. The magnetic field has constant magnitude and is tangent to the circle, reducing the integral to B·2πr=μ0I. Solving for B yields B=μ0I2πr. This derivation highlights the inverse relationship between field strength and distance: doubling the distance halves the field.

Visualization of Field Lines

Magnetic fields around a wire can be visualized using the right-hand rule. Point the thumb of the right hand in the direction of the current, and the curled fingers indicate the direction of circular field lines. Nearby iron filings or compasses reveal these patterns experimentally. Field strength diminishes with distance, so compasses placed farther away deflect less. This behavior contrasts electric fields, which radiate outward rather than circling the source.

Sample Calculations

The table below gives sample magnetic field strengths for a wire carrying a current of 5 A at various distances. The permeability of free space μ0 equals ×10-7 T·m/A. As distance increases, the field drops off rapidly.

Distance r (m)B (µT)
0.01100
0.0520
0.1010
0.502
1.001

Practical Applications

The magnetic field of a wire underlies many technologies. In electrical transmission lines, the fields from multiple conductors can influence each other, affecting inductance and energy losses. Designers twist pairs of wires to cancel external fields and reduce interference, a principle used in Ethernet cables. In scientific instruments, precise knowledge of magnetic fields allows calibration of Hall probes and gaussmeters. Particle accelerators rely on magnetic fields to guide beams, and even simple devices like electric motors depend on interactions between current-carrying wires and magnetic fields to produce torque.

Relation to the Biot–Savart Law

While Ampère's law provides an elegant route for symmetric situations, the Biot–Savart law offers a more general solution for the magnetic field from any current distribution. It states B=μ0/Idl×rr3. For an infinitely long straight wire, the integration reproduces the familiar B=μ0I2πr. The Biot–Savart perspective becomes essential when dealing with finite wires, loops, or coils where symmetry is less pronounced.

Units and Measurement

The magnetic field is measured in teslas (T), named after Nikola Tesla. One tesla is a substantial field; everyday environments typically have fields in the microtesla range. Earth's magnetic field near the surface ranges from about 25 to 65 µT. The formula implemented here returns B in teslas, but the result display converts to microteslas for convenience because the magnitudes near laboratory wires often fall in that range.

Safety Considerations

High currents can produce strong magnetic fields and significant heating. When working with large currents, ensure proper insulation and consider the mechanical forces that arise between parallel wires carrying current in the same or opposite directions. Attractive or repulsive forces can be substantial in power systems, leading to mechanical stress. Although the magnetic fields from household currents are generally weak, specialized facilities with high-current experiments must account for potential hazards.

Worked Example

Suppose a straight wire carries 50 A and we wish to know the magnetic field 2 cm away. Plugging values into the formula gives B=4π×10^{-7} × 502π × 0.02 T, which simplifies to approximately 5×10^{-4} T or 500 µT. Such a field is several times stronger than Earth's field and could noticeably deflect a compass needle. Doubling the distance to 4 cm would halve the field to 250 µT.

Multiple Wires and Superposition

If several wires carry currents, the net magnetic field at a point is the vector sum of the individual fields. For parallel wires with currents in the same direction, fields between the wires oppose each other, leading to reduced magnitude midway. With opposite currents, the fields reinforce between the wires. Such effects underpin the operation of transmission lines and transformers, where careful arrangement of conductors minimizes unwanted fields and maximizes efficiency.

Limitations of the Model

The ideal formula assumes an infinitely long wire in a uniform, non-magnetic medium. Real wires have finite length and may be near materials with magnetic properties, altering the field distribution. Close to the wire, the assumption of uniform current density may break down if skin effects occur at high frequencies. Additionally, extremely high currents can produce fields strong enough to require relativistic corrections. Despite these limitations, the simple model offers excellent accuracy for a wide range of practical scenarios.

Historical Perspective

The relationship between electric currents and magnetism was first observed by Hans Christian Ørsted in 1820 when he noticed a compass needle deflecting near a current-carrying wire. This discovery sparked rapid developments by Ampère, Faraday, and others, leading to the unification of electricity and magnetism. Maxwell later synthesized these ideas into his famous equations, of which Ampère's law is one component. The ability to calculate magnetic fields from currents revolutionized technology, enabling telegraphs, electric motors, and modern power grids.

Using the Calculator

Enter the current in amperes and the perpendicular distance from the wire in meters. The calculator assumes the standard permeability of free space and computes the magnetic field magnitude. Results appear in microteslas for convenience. Experiment with different values to see how doubling the current doubles the field, while doubling the distance halves it. Such exploration reinforces the intuitive relationships between current, distance, and field strength.

Conclusion

The magnetic field produced by a long straight wire embodies fundamental principles of electromagnetism. Through the simple formula implemented here, students and practitioners can evaluate field strengths for laboratory setups, engineering designs, or educational demonstrations. The extended explanation covers derivations, applications, and historical context, providing a comprehensive reference for anyone studying or utilizing magnetic fields in practical contexts.

Related Calculators

Magnetic Field of a Finite Wire Calculator

Compute the magnetic field near a straight finite wire or solve for current, distance, or endpoint angles.

finite wire magnetic field calculator biot savart law

Magnetic Force on a Current-Carrying Wire Calculator

Evaluate the force on a wire in a magnetic field or solve for current, field strength, length, or angle using F = I L B sin θ.

magnetic force wire calculator ILB sin theta magnetism physics

Biot-Savart Law Calculator - Magnetic Field Near a Current

Estimate the magnetic field produced by a steady current using the Biot-Savart law. Enter current and distance to compute field strength.

Biot-Savart law calculator magnetic field current carrying wire