Magnetic Field of a Straight Wire Calculator
Calculate the magnetic flux density around a long straight current-carrying wire using Ampère's law. Enter the current, distance from the wire, and optional relative permeability to get the result in µT, mT, T or gauss.
Find the Magnetic Flux Density Near a Current-Carrying Wire
Straight Wire Magnetic Field
Where:
- \(B\) — magnetic flux density at distance \(r\) from the wire (T)
- \(\mu_0\) — permeability of vacuum, \(4\pi \times 10^{-7}\) T·m/A
- \(\mu_r\) — relative permeability of the surrounding medium (1 for air or vacuum)
- \(I\) — current flowing through the wire (A)
- \(r\) — perpendicular distance from the wire to the point of interest (m)
This is Ampère's law applied to an infinitely long, straight conductor: the field forms concentric circles around the wire and its magnitude decreases in proportion to \(1/r\).
Straight Wire Magnetic Field – Calculation Example
Example: a long straight wire carries a current of 10 A. What is the magnetic flux density 5 cm away from the wire, in air (\(\mu_r = 1\))?
\[ B = \frac{4\pi \times 10^{-7} \times 1 \times 10}{2\pi \times 0.05} = \frac{2 \times 10^{-6}}{0.05} = 4 \times 10^{-5}\ \text{T} \]
Result: \(B = 40\ \mu\text{T} = 0.04\ \text{mT} = 0.4\ \text{G}\). This is comparable to the Earth's magnetic field (roughly 25–65 µT).
How to Use the Calculator
- Enter the current flowing through the wire in the Current (I) field and choose its unit: mA, A or kA.
- Enter the perpendicular distance from the wire to the point where you want the field in Distance from Wire (r) and pick the unit: mm, cm, m, in or ft.
- Leave Custom Relative Permeability (μr) unchecked if the wire is surrounded by air or vacuum. Check it and enter a value only for other media, such as a ferromagnetic material.
- Read the Magnetic Flux Density in µT, mT, T or gauss. The Calculation Details block shows the full substitution step by step.
What Is the Magnetic Field of a Straight Wire?
When an electric current flows through a conductor, it generates a magnetic field around it. For a long, straight wire the field lines are concentric circles centered on the wire, lying in planes perpendicular to it. The direction of the field follows the right-hand rule: point the thumb of your right hand along the conventional current, and your curled fingers show the direction in which the field circulates.
The magnitude of the field follows directly from Ampère's law. Because the field is symmetric around the wire, integrating it around a circle of radius \(r\) gives \(B \cdot 2\pi r = \mu_0 \mu_r I\), which leads to the formula \(B = \mu_0 \mu_r I / (2\pi r)\). Two key features stand out: the field grows linearly with the current, and it falls off as \(1/r\) — doubling the distance from the wire halves the field strength.
The result is expressed as magnetic flux density \(B\), measured in tesla (T). In practice, fields around everyday currents are small, so microtesla (µT) and millitesla (mT) are often more convenient; the older CGS unit gauss (G) is still common, with \(1\ \text{mT} = 10\ \text{G}\). For context, a typical refrigerator magnet is about 5 mT, Earth's field is 25–65 µT, and the wire in the example above (10 A at 5 cm) produces 40 µT.
A related quantity is the magnetic field strength \(H = I / (2\pi r)\) in A/m; the flux density is \(B = \mu_0 \mu_r H\). If you need the effect this field has on a moving charge, see the Magnetic Force on a Charge calculator, and if the field changes over time, the induced voltage follows from Faraday's Law.
Assumptions, Limitations and Practical Tips
- Infinitely long wire: the formula assumes a very long, straight conductor. It is accurate at points close to a long wire (where the distance is small compared with the wire's length) and becomes less reliable near the ends, bends, or coils. For a coiled wire, the field is better described by solenoid formulas.
- Thin wire: the wire's own radius is assumed negligible. The formula describes the field outside the wire; inside a real conductor of radius \(R\), the field grows linearly, \(B \propto r\), reaching its maximum at the surface.
- Homogeneous medium: the calculation assumes the same permeability everywhere around the wire. Use \(\mu_r = 1\) for air, vacuum, copper, water and most non-magnetic materials. Values well above 1 apply to ferromagnetic media such as iron, which can amplify the field by factors of hundreds or thousands.
- No nearby currents: other conductors nearby also contribute their own fields, which add as vectors. This matters in cable bundles, where currents flowing in opposite directions can partially cancel each other's fields.
- Static current: the formula applies to direct current (and, to a good approximation, slowly varying currents). Rapidly varying currents introduce radiation and skin-effect corrections.
A useful sanity check: at 1 cm from a wire carrying 1 A, the field is 20 µT in air. Scale linearly with current and inversely with distance to estimate any other configuration quickly. For other electromagnetic and physics computations, you can also explore the Point Charge Electric Field calculator and the Parallel Plate Capacitor calculator.
Frequently Asked Questions
How do I calculate the magnetic field of a straight wire by hand?
Convert the current to amperes and the distance to metres, then apply B = μ₀μr·I / (2πr). A shortcut: 2π cancels part of μ₀ = 4π×10⁻⁷, so B = 2×10⁻⁷ × μr × I / r in tesla. Example: 5 A at 0.2 m gives B = 2×10⁻⁷ × 5 / 0.2 = 5×10⁻⁶ T = 5 µT. Multiply by 10⁶ for µT or by 10⁴ for gauss.
What is a normal or strong magnetic field near a wire?
For household currents the fields are tiny compared with magnets. At 1 cm, 1 A produces only 20 µT — similar to Earth's field (25–65 µT). Heavy appliances drawing 10–15 A give roughly 40–200 µT at a few centimetres, still far below a refrigerator magnet (~5 mT). Strong fields near wires appear only with very large currents, such as in industrial busbars or near transformer windings.
How do I convert between tesla, microtesla, millitesla and gauss?
The relationships are: 1 T = 1000 mT = 1,000,000 µT = 10,000 G. So 1 mT = 10 G and 1 µT = 0.01 G. To go from gauss to tesla, divide by 10,000. Example: 0.4 G = 0.04 mT = 40 µT = 4×10⁻⁵ T. Gauss belongs to the old CGS system but remains common in magnet specifications, especially in the US.
Why is my hand calculation off by a factor of 100 or 2.54?
The two most common mistakes are unit errors. First, forgetting to convert centimetres or inches to metres before plugging into the formula — the distance must be in metres. Second, entering a diameter (e.g., cable thickness) instead of the perpendicular distance from the wire's centre to the measurement point. Also check that the current is in amperes, not milliamps, and remember the distance is measured perpendicular to the wire, not along it.
Does the formula work inside the wire or near its ends and bends?
No. The formula B = μ₀μr·I/(2πr) is only valid outside a long, straight, thin conductor. Inside a real wire of radius R the field grows linearly with r and peaks at the surface. Near the wire's ends, bends, or loops, the geometry breaks the symmetry of Ampère's law, so actual fields deviate — for coils use solenoid or loop formulas instead.
What happens if two wires are close together, like in a cable?
Each wire produces its own field, and the total is the vector sum. In a two-conductor cable carrying equal currents in opposite directions (live and neutral), the fields largely cancel at distances larger than the conductor separation, which is why appliance cords emit far less than a single separated conductor. Currents flowing the same direction, as in some industrial setups, reinforce each other. Calculate each wire's contribution separately, then add with direction (right-hand rule) in mind.
Are these magnetic fields a health concern?
Fields from ordinary wiring are extremely weak — typically tens of µT, comparable to Earth's natural field. International exposure guidelines (ICNIRP) set reference limits for the general public around 100–200 µT for 50/60 Hz fields, far above what a single household wire produces at normal distances. If you are assessing a specific workplace or high-current installation, consult local EMF regulations or a qualified specialist rather than relying on a single calculation.