Magnetic Field of a Long Straight Wire Calculator
Introduction: Magnetic Fields Produced by a Long Straight Wire
A steady current in a long, straight conductor produces the circular magnetic field calculated on this page. In the idealized geometry, the field lines are concentric circles centered on the wire, and their strength diminishes with perpendicular distance. This calculator applies the long-straight-wire result from Ampère's law or the Biot–Savart law to compute the field magnitude at a specified radial distance. The relationship is expressed as , where is the permeability of free space, is the current in amperes, and is the perpendicular distance from the wire in meters. This geometry is the starting point for estimating the magnetic field of conductors before considering more complex arrangements such as coils or transmission lines.
Ampère's Law Derivation for a Straight-Wire Magnetic Field
For the magnetic field surrounding a long straight wire, Ampère's circuital law relates the circulation of the field around a closed loop to the enclosed current: . For a straight wire, the symmetry suggests choosing a circular integration path of radius centered on the wire. The magnetic field has constant magnitude and is tangent to the circle, reducing the integral to . Solving for yields . This derivation shows why doubling the wire distance halves the reported field.
Visualizing Long Straight Wire Field Lines
The circular magnetic field around a straight wire can be identified with the right-hand rule. Point the right thumb in the current direction; the curled fingers show the direction of the field lines. Iron filings or compasses can reveal this pattern experimentally. Because the straight-wire field weakens with distance, a compass farther from the conductor deflects less.
Formula: Straight-Wire Magnetic Field Sample Values
These sample values use the straight-wire formula for a current of A at several perpendicular distances. The calculator uses the free-space permeability as T·m/A. Increasing the wire distance reduces the field in direct inverse proportion.
| Distance r (m) | B (µT) |
|---|---|
| 0.01 | 100 |
| 0.05 | 20 |
| 0.10 | 10 |
| 0.50 | 2 |
| 1.00 | 1 |
Why the 1/r Straight-Wire Field Matters in Real Hardware
The 1/r field calculated for an isolated straight wire is useful for estimating a conductor's magnetic footprint. For example, a single 15 A conductor produces about 300 µT at 1 cm, but the idealized field falls below roughly 50 µT beyond 6 cm. In household wiring, hot and neutral conductors commonly run side by side with opposite currents, so their fields substantially cancel; the isolated-wire result is not a complete cable-field model. The same distance dependence means that Hall probes and gaussmeters need careful positioning when they are referenced against a known current. Twisted-pair cables use closely spaced, opposite currents and twisting to reduce residual magnetic coupling. At higher currents, controlled magnetic fields become useful in motor windings, MRI gradient coils, and accelerator steering magnets.
Relation of the Straight-Wire Result to the Biot–Savart Law
The long straight-wire magnetic field can also be obtained from the more general Biot–Savart law for a current distribution. It states . Integrating that expression for an infinitely long straight wire reproduces . The Biot–Savart approach is needed for finite wires, loops, and coils that do not have the same cylindrical symmetry.
Units and Measurement of the Straight-Wire Magnetic Field
This straight-wire calculation produces magnetic field in teslas, while the result box converts it to microteslas for easier reading. A tesla is a large unit for many ordinary conductor measurements, so microteslas are often more practical when comparing current and distance cases. Earth's surface field is commonly in the microtesla range, although its value varies by location. Bench instruments are often scaled in gauss, and the conversion is exact: , so 100 µT is exactly 1 G. The calculator prints teslas, microteslas and gauss side by side, and also expresses the answer as a multiple of a nominal 50 µT geomagnetic field so the number has a familiar reference point.
The Magnetic Constant μ₀ After the 2019 SI Revision
Before 2019 the ampere was defined through the force between two parallel wires, which fixed at exactly N/A². The revised SI defines the ampere from a fixed numerical value of the elementary charge, so the magnetic constant is now measured rather than defined. The CODATA recommended value is N/A², which differs from the old exact figure by roughly 0.6 parts per billion. This page computes with the CODATA value, so the displayed field agrees with the classical result to every digit shown.
Safety Considerations for High-Current Straight Wires
High-current straight conductors can create both the magnetic fields estimated here and substantial resistive heating. Use appropriate insulation and account for the mechanical forces between nearby parallel wires, which can attract or repel depending on current direction. Household-current fields are generally modest, but high-current experimental and power-system installations require suitable electrical and mechanical safety measures.
Worked Example: A 50 A Straight Wire Measured at 2 cm
For a 50 A long straight wire observed cm away, the field calculation is T. This is approximately T, or µT. Doubling the distance to cm halves the ideal straight-wire field to µT.
Multiple Wires and Magnetic-Field Superposition
When more than one straight wire is present, this calculator's single-wire result is only one vector contribution to the magnetic field at a point. Parallel wires carrying current in the same direction have opposing fields between them, while opposite currents reinforce there. The total field is the vector sum , where each term keeps the sign of its own current. This vector superposition is important in transmission lines, transformers, and paired conductors designed to limit unwanted external fields. The Field Lines puzzle further down the page is built on exactly this sum: it evaluates every wire's contribution at each probe and adds the vectors before comparing the result with the target reading.
Limitations of the Long Straight Wire Model
The magnetic-field formula used here assumes an infinitely long wire in a uniform, non-magnetic medium. A real wire has finite length and may lie near magnetic materials that change the field distribution. Near a conductor at high frequency, nonuniform current density from skin effect can also make the idealized result less representative. The long-straight-wire expression remains a useful approximation when the observation point is far from the wire's ends and the surroundings do not strongly affect the field.
Historical Perspective on Current-Carrying Wire Magnetism
The link between current in a wire and magnetism was demonstrated by Hans Christian Ørsted in 1820 when he observed a compass needle deflect near a current-carrying conductor. The observation prompted work by Ampère, Faraday, and others, ultimately contributing to the unified theory of electromagnetism. Calculating fields from currents became fundamental to technologies including telegraphs, motors, and power systems.
How to Use the Straight-Wire Magnetic Field Calculator
Enter the straight-wire current in amperes and the perpendicular distance from that wire in meters. The calculator uses the free-space permeability and reports the magnetic-field magnitude in microteslas. Increasing current by a factor increases the result by the same factor; increasing distance by a factor reduces it by that factor. A negative current gives the same magnitude and indicates the reversed field direction.
Two Useful Straight-Wire Magnetic Field Reference Points
For this long straight-wire model, a 1 A current at 1 m produces 0.2 µT. Other cases scale directly from that reference: multiply by the current in amperes and divide by the distance in meters. The other key relationship is the circular 1/r field pattern, so twice the perpendicular distance produces half the field, not one quarter. These checks can help identify an incorrect distance unit or an implausible result before relying on a measurement or calculation.
Frequently Asked Questions About Straight-Wire Magnetic Fields
What equation does this straight-wire magnetic field calculator use?
For a long straight wire, the magnetic-field magnitude at perpendicular distance r is B = mu-zero I/(2 pi r). Here I is the current in amperes, r is the perpendicular distance in meters, and mu-zero is the magnetic constant, 1.25663706127 times 10 to the minus 6 tesla-meters per ampere. The calculator reports the answer in microteslas, teslas and gauss.
Why does the straight-wire field decrease with distance?
The magnetic field from the ideal long straight wire is proportional to 1/r. Therefore, doubling the perpendicular distance halves the field magnitude. Ampere's law gives this result because the circular path around the wire has a circumference proportional to its radius.
Does current direction change the displayed magnetic-field magnitude?
Reversing the current reverses the circular field direction according to the right-hand rule, but it does not change the magnitude. The calculator takes the magnitude from the absolute value of the current you type, and the direction selector reports which way the field circles when you look along the wire.
Can this calculator model a short wire or a coil?
No. It models an isolated wire that is long compared with the distance to the observation point. Field values near the ends of a finite wire, inside a coil, or near magnetic materials can depart from the simple mu-zero I/(2 pi r) result and require a more appropriate field model.
How do I convert the straight-wire result into gauss?
One tesla equals exactly 10 000 gauss, so one microtesla equals 0.01 gauss. A field of 100 microteslas is 1 gauss, and 1 millitesla is 10 gauss. The result panel prints tesla, microtesla and gauss together so a reading can be compared with instruments scaled in either unit.
Is the permeability of free space still exactly 4 pi times 10 to the minus 7?
Not since the 2019 revision of the SI. The ampere is now defined from a fixed value of the elementary charge, so mu-zero became a measured quantity. The CODATA recommended value is 1.25663706127 times 10 to the minus 6 newtons per ampere squared, about 0.6 parts per billion away from 4 pi times 10 to the minus 7. This calculator uses the CODATA value, and the difference never appears at the precision shown.
Sources for the Straight-Wire Magnetic Field Formula
The long-straight-conductor result, , follows from Ampère's law and is standard in university physics references. The value of the magnetic constant and the tesla-to-gauss conversion used on this page come from the sources below.
- NIST, CODATA value: vacuum magnetic permeability μ₀ — 1.25663706127(20)×10⁻⁶ N·A⁻², the value this calculator uses.
- NIST Special Publication 811, Guide for the Use of the International System of Units (SI) — the exact 1 T = 10⁴ G conversion and SI unit conventions.
- Georgia State University HyperPhysics, magnetic field of a current-carrying wire — the Ampère's-law derivation of B = μ₀I/(2πr).
- D. Halliday, R. Resnick & J. Walker, Fundamentals of Physics, chapter “Magnetic Fields Due to Currents” — the long-straight-wire field and the right-hand rule for its direction.
Field Lines: place the wires that satisfy every probe
This is turned into a puzzle. You are looking down the axis of a set of current-carrying wires, so each wire is a single point on the map. Every white probe demands a particular flux density — and on later levels a particular field direction as well. Slide the wires, dial their current up or down, and flip them between “out of the page” and “into the page” until the superposed field at every probe lands inside tolerance, then measure to lock the reading in. The colour wash is the field magnitude, the drifting dashes are the circular field lines, and the needle inside each probe is a compass swinging to the local field, so the right-hand rule is visible rather than recited.
Level 1 / 5
Probes matched 0 / 1
Selected wire —
Wire current —
Measurements 0
Score 0
Best 0
Press “Start mapping”, then drag a wire on the map or focus the map and steer it with the arrow keys.
Keyboard (focus the map first): ← → ↑ ↓ move the selected wire, hold Shift for a fine step, , and . change its current by 1 A (Shift for 5 A), F flips it between out of the page and into the page, Q and E select the previous or next wire, 1–3 jump straight to a wire, H toggles the heat map, R restarts the level, and Space or Enter measures the field. Pointer and touch: press on a wire and drag it, or press anywhere on the map to send the selected wire there; the buttons above cover every keyboard action.
- Wire with current out of the page — field circles counter-clockwise
- Wire with current into the page — field circles clockwise
- Probe still outside tolerance, showing its live and target reading
- Probe inside tolerance on magnitude and, where required, direction
- Exclusion zone — no wire may be placed inside it
- Field magnitude wash, 0.2 µT (dark) to 1 mT (bright), logarithmic
