The mag field formula for a long, straight conductor is B = (μ0 × I) / (2π × r). This equation calculates the magnetic flux density (B) in Teslas generated by a steady current (I) at a specific radial distance (r) from the center of the wire. Whether you are designing a busbar array, routing sensitive analog traces near a power feed, or calibrating a Hall-effect current sensor, predicting the exact magnetic field strength is non-negotiable.
Below, we break down every variable, provide real-world magnitude benchmarks, and solve practical engineering problems with strict unit tracking.
The Core Mag Field Formula and Symbol Definitions
The foundational equation for the magnetic field radiating from an infinitely long, straight wire in a vacuum or air is derived from Ampère's Circuital Law. Here is the exact specification sheet for every symbol in the formula.
| Symbol | Parameter Name | SI Unit | Typical Value / Engineering Notes |
|---|---|---|---|
| B | Magnetic Flux Density | Tesla (T) | Often measured in microtesla (μT) or Gauss (G) in practical electronics. 1 T = 10,000 G. |
| μ0 | Vacuum Permeability | T·m/A (or H/m) | Approx. 4π × 10-7 T·m/A (1.2566 × 10-6). Note: Since the 2019 SI redefinition, NIST defines this as an experimentally measured constant, but 4π × 10-7 remains the standard for all practical electrical engineering calculations. |
| I | Current | Amperes (A) | Use DC or RMS AC values for low-frequency (50/60Hz) calculations. |
| r | Radial Distance | Meters (m) | Measured from the exact center-axis of the conductor, not the surface insulation. |
| 2π | Geometric Constant | Dimensionless | Approx. 6.2832. Represents the full circular path of the magnetic field lines. |
Real-World Magnetic Field Magnitudes (Reference Data)
Abstract formulas are useless without a sense of scale. If your calculation yields 50 Tesla for a household branch circuit, you have a decimal error. The table below provides realistic B-field magnitudes for common electrical scenarios to anchor your expectations. This data assumes non-magnetic surroundings (air, PVC, or drywall).
| Source / Scenario | Current (I) | Distance (r) | Calculated B-Field (μT) | Equivalent in Gauss (G) |
|---|---|---|---|---|
| Earth's Ambient Magnetic Field | N/A | N/A | ~25 to 65 μT | 0.25 to 0.65 G |
| 14 AWG NM-B Cable (Lighting) | 15 A | 10 mm (0.01 m) | 300 μT | 3.0 G |
| 4/0 AWG Feeder (Subpanel) | 200 A | 50 mm (0.05 m) | 800 μT | 8.0 G |
| EV DC Fast Charge Cable | 400 A | 100 mm (0.1 m) | 800 μT | 8.0 G |
| Neodymium Magnet (N52 grade) | N/A | Surface | ~1,250,000 μT | 12,500 G |
As shown in the data above, standard wiring generates fields in the microtesla (μT) range. This is critical when placing high-gain analog amplifiers or unshielded inductors near power feeds. For deeper theoretical background on how these fields integrate over a path, refer to the Georgia State University HyperPhysics database on Ampère's Law.
Rearranged Forms for Circuit Design
On the bench, you rarely need to solve for B in isolation. More often, you are trying to find the safe distance for a sensor or estimating the current based on a clamp-meter reading. Here are the algebraically rearranged forms of the mag field formula:
- Solve for Current (I): I = (B × 2π × r) / μ0
Use case: Calibrating a DIY Rogowski coil or verifying a Hall-effect sensor reading against a known physical gap. - Solve for Radial Distance (r): r = (μ0 × I) / (2π × B)
Use case: Determining the minimum keep-out zone between a high-current busbar and a sensitive magnetic encoder (like an AS5048A). - Solve for Permeability (μ0): μ0 = (B × 2π × r) / I
Use case: Rarely used in basic wiring, but essential in materials science when characterizing the permeability of a custom ferrite core.
Worked Problems with Strict Unit Tracking
The most common point of failure in magnetic field calculations is unit mismanagement. The SI formula demands meters, Amperes, and Teslas. Below are two solved problems demonstrating strict unit tracking.
Problem 1: Calculating B-Field from a DC Busbar
Scenario: You have a copper busbar carrying 250 A of steady DC current. A PCB with a TI DRV5055 Hall-effect sensor is mounted 4 cm away from the center of the busbar. What is the magnetic flux density at the sensor?
- Identify Knowns: I = 250 A; r = 4 cm; μ0 = 4π × 10-7 T·m/A.
- Convert Units: The formula requires meters. r = 4 cm ÷ 100 = 0.04 m.
- Substitute into Formula:
B = (4π × 10-7 × 250) / (2π × 0.04) - Simplify the Math:
The π terms cancel out partially: (4 × 10-7 × 250) / (2 × 0.04)
Numerator: 1000 × 10-7 = 1 × 10-4
Denominator: 0.08 - Calculate Final Tesla Value:
B = 1 × 10-4 / 0.08 = 0.00125 T - Convert to Practical Units:
0.00125 T = 1.25 mT (millitesla) or 12.5 G (Gauss).
Result: The sensor will read 1.25 mT. Since the DRV5055 linear range is typically up to 100 mT, this placement is well within safe operating bounds.
Problem 2: Sizing a Keep-Out Zone for a Sensitive Encoder
Scenario: A motor controller uses a magnetic encoder that saturates and throws errors if exposed to fields greater than 500 μT. The adjacent power cable carries a peak current of 80 A. How far away must the encoder be placed?
- Identify Knowns: I = 80 A; Bmax = 500 μT; μ0 = 4π × 10-7 T·m/A.
- Convert Units: Convert microtesla to Tesla. B = 500 × 10-6 T = 0.0005 T.
- Rearrange Formula for r:
r = (μ0 × I) / (2π × B) - Substitute and Simplify:
r = (4π × 10-7 × 80) / (2π × 0.0005)
Cancel 2π from numerator and denominator:
r = (2 × 10-7 × 80) / 0.0005 - Calculate Final Meter Value:
Numerator: 160 × 10-7 = 1.6 × 10-5
r = 1.6 × 10-5 / 0.0005 = 0.032 m - Convert to Practical Units:
0.032 m × 1000 = 32 mm.
Result: The encoder must be placed at least 32 mm from the center-axis of the 80 A cable to avoid saturation.
Boundary Conditions: Assumptions and Fatal Unit Mistakes
The mag field formula is elegant, but it is a mathematical model with strict boundary conditions. Applying it blindly to real-world jobsite scenarios will yield incorrect data if you ignore its assumptions.
When the Formula Applies (and When It Doesn't)
- The 'Infinitely Long' Assumption: The formula assumes the wire is infinitely long. In practice, this means the length of the straight wire segment must be at least 10 times greater than the distance r. If you are measuring 5 cm away from a wire, the wire must be straight for at least 50 cm in both directions. If the wire bends sharply near your measurement point, you must use the Biot-Savart Law with vector integration instead.
- AC vs. DC Current: For DC, the formula gives the exact static field. For standard 50/60 Hz AC, you can use the RMS current to find the RMS magnetic field. However, at high frequencies (e.g., 100 kHz switching in a buck converter), skin effect alters the current distribution inside the wire, and displacement currents begin to matter. The basic formula breaks down at RF frequencies.
- Non-Magnetic Surroundings: The formula assumes μr (relative permeability) of the surrounding medium is 1.0 (air, vacuum, PVC, drywall, copper). Jobsite Trap: If you run your wires through rigid steel conduit or mount your busbar against a steel chassis, the steel acts as a magnetic flux concentrator. Steel has a relative permeability (μr) ranging from 100 to 4000. This will drastically distort and amplify the local magnetic field, rendering the standard vacuum formula inaccurate.
Unit Mistakes That Break the Math
If your final answer looks physically impossible, check these three common errors:
- The Centimeter Trap: Forgetting to convert r from centimeters or millimeters to meters. If you plug '4' (for 4 cm) into the denominator instead of '0.04', your calculated B-field will be 100 times smaller than reality.
- The Gauss/Tesla Confusion: Datasheets for Hall sensors often specify limits in Gauss, while the SI formula outputs Teslas. Remember that 1 Tesla = 10,000 Gauss. Plugging a 50 Gauss limit directly into the formula as '50 Teslas' will result in a calculated distance that is microscopically small.
- Dropping the 2π: Confusing the formula for a straight wire with the formula for the center of a circular loop (B = μ0I / 2r). The straight wire formula must include the 2π in the denominator to account for the cylindrical geometry of the field lines.
By strictly tracking your units and respecting the physical boundaries of the conductor geometry, the mag field formula transitions from a textbook abstraction into a highly reliable tool for PCB layout, sensor placement, and busbar safety verification.






