Free Magnetic Field of a Straight Current-Carrying Wire Calculator

Reverse mode (solve for current or distance)
Compare to Earth's magnetic field (~5 × 10⁻⁵ T)

Enter values to see results

Understanding the Magnetic Field Around a Straight Current-Carrying Wire

When an electric current flows through a conductor, it generates a magnetic field in the surrounding space. For a long, straight wire, the magnetic field lines form concentric circles centered on the wire, and the field strength depends on two factors: the amount of current flowing and the distance from the wire. This fundamental relationship is described by Ampère's law, one of Maxwell's equations, and forms the basis of many electromagnetic applications.

Calculating the Magnetic Field Strength

Under the idealization of an infinitely long, straight wire, the magnetic field magnitude (B) at a perpendicular distance (r) from the wire is given by a simple formula derived from Ampère's law:

B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}

where:

  • II represents the current flowing through the wire (in amperes),
  • rr is the radial distance from the wire (in meters),
  • μ0\mu_0 is the permeability of free space, a fundamental constant with the value 4π×10−7  T⋅m/A4\pi \times 10^{-7}\; \text{T·m/A} (exact, based on the 2019 redefinition of SI units).

According to this equation, the field strength is directly proportional to the current and inversely proportional to the distance from the wire. Doubling the current doubles the field, while moving twice as far away halves the field.

A Practical Example: Earth's Magnetic Field

The Earth itself behaves like a giant magnet, with a surface field strength averaging about 5×10−5  T5 \times 10^{-5}\; \text{T}. This field originates from electric currents generated by the motion of molten iron in the planet's outer core. To appreciate how small this value is, consider what current would be needed in a straight wire to produce the same field at a distance of 1 cm from the wire. Using the formula above, the required current is:

I=2πrBμ0=2π×0.01×5×10−54π×10−7≈2.5  AI = \frac{2\pi r B}{\mu_0} = \frac{2\pi \times 0.01 \times 5 \times 10^{-5}}{4\pi \times 10^{-7}} \approx 2.5\; \text{A}

Thus, a mere 2.5 amperes flowing in a straight wire can match Earth's magnetic field at a close distance. This example highlights how relatively weak the planetary field is compared to fields achievable with everyday currents.

Using This Calculator

The Wire Magnetic Field Calculator provides a convenient way to compute any of the three quantities (B, I, or r) when the other two are known. You can input the current and distance to find the magnetic field, or work backwards from a desired field strength to find the necessary current or distance. The calculator also automatically applies the correct units and uses the latest value of μ0\mu_0.

Related Concepts

The magnetic field around a straight wire is just one aspect of electromagnetism. For more complex geometries, such as coils and solenoids, different formulas apply. Tools like the Ampere's Law Calculator and Electromagnetic Field Calculator can handle a wider range of configurations. Additionally, understanding the force on a current-carrying wire in an external magnetic field and the magnetic interaction between parallel wires are natural next steps.

This calculator focuses specifically on the simple but important case of a single, straight, long wire — a scenario that is not only a foundation for physics education but also useful in practical circuit analysis and field estimation.

FAQ

1. What is the formula for the magnetic field around a straight current-carrying wire?

For an infinitely long, straight wire, the magnetic field magnitude at a distance r from the wire is B = μ₀ I / (2π r), where I is the current and μ₀ is the permeability of free space (4π × 10⁻⁷ T·m/A). The field lines are concentric circles around the wire, and the direction is given by the right-hand rule.

2. How can I calculate the current needed to produce a given magnetic field at a certain distance?

Rearrange the formula to I = (2π r B) / μ₀. For example, to produce the Earth's surface field (5×10⁻⁵ T) at 1 cm from the wire, you need about 2.5 A.

3. What is the value of μ₀ and why is it important?

μ₀ (the permeability of free space) is exactly 4π × 10⁻⁷ T·m/A. It appears in Ampère's law and determines the strength of the magnetic field produced by a given current in a vacuum. It is a fundamental constant that links electric current to magnetic field.

4. Does the formula assume an infinitely long wire? How accurate is it for real wires?

Yes, the formula B = μ₀ I / (2π r) assumes an infinitely long, straight wire. For real finite wires, it is a good approximation when the distance to the wire is much smaller than the length of the wire. For distances comparable to the wire length, corrections from integrating over the finite length are needed.

How to Use

  1. Enter the current flowing through the wire and the distance from the wire.
  2. Select the appropriate units for current, distance, and output magnetic field.
  3. Toggle reverse mode to solve for current or distance instead of magnetic field.