A compass beside a current-carrying wire
Current in a straight wire can turn a nearby compass. Magnetic field circles the wire axis rather than pointing radially towards it. Imagine upward conventional current: with your right thumb along current, curled fingers indicate field circulation. The long-wire model calculates this wire’s contribution; other parts of the circuit can add further fields.[1][2]
- Prior knowledge: B is magnetic flux density in teslas. Current direction means conventional current.
- Measure r from the axis. The exterior formula applies outside the wire cross-section, not down to its centre.
- For current along +z and an observation point on +x, field points along +y. Reversing current reverses that direction.
How do you calculate field magnitude and direction outside a long wire?
Magnitude describes the external field of an ideally long straight wire; r is the shortest axis distance.[1]
The field vector is tangent to a circle around the wire axis, rather than pointing radially away from the wire. Conventional current fixes circulation: right thumb along current, curled fingers along field. For current along +z, field at a point on +x points along +y. Reversing current reverses the vector without changing its magnitude at equal absolute current.[1]
Why a circle simplifies the integral
Ampère’s law first describes closed circulation of field. Multiplying B by circle circumference requires cylindrical symmetry: field is tangential and constant in magnitude on a coaxial circle. A single finite segment lacks this complete symmetry. Its contribution needs an end correction or Biot–Savart; total field also needs the rest of the circuit. Maxwell’s equations in integral form contain this magnetostatic circulation as a limiting case; time-varying electric flux requires the additional displacement-current term.[2][1][4]
Simplification requires cylindrical symmetry of current distribution, not merely a circular integration path.[2]
In the magnetostatic model, magnitude is constant on each concentric circle and field is tangent to the path. Choose traversal consistently with current so enclosed current and field contribution count positively. Circumference then replaces the line integral. Ampère’s law is the physical starting point; cancelling factors only justifies its use for this symmetry. With several asymmetrically placed wires, the law may still apply although B can no longer be factored out of the integral.[2]
A finite segment gives less field
The perpendicular foot lies between the ends; h1 and h2 are positive axial endpoint distances. At the midpoint segment length is 2h.[1]
Integrating the Biot–Savart contribution along the straight segment gives the end correction. If both endpoint distances greatly exceed r, both fractions approach one. Such a segment contributes to a complete circuit: steady current does not simply terminate in space. Supply and return conductors generate their own fields. The segment result therefore is not automatically the total measured field. Outside the region between endpoints, integrate using the actual limits.[1]
Which distance belongs in the formula and how do you rearrange it?
Both rearrangements require known model conditions and nonzero denominators.[1]
Distances in metres are measured from the axis, not as wire diameters. We use rounded vacuum permeability 1.25663706·10−6 H/m. In the present SI it has measurement uncertainty rather than being exactly fixed by the historical ampere definition. Input rounding and geometric deviations dominate these examples. The formula first describes this current’s field; Earth’s field or nearby conductors are added vectorially afterwards. Measuring only total field magnitude without direction does not always uniquely determine current.[3][1]
Example: long-wire result and segment check
Examining a 24 cm segment
- Given
- I=7.50 A along +z; field point 3.00 cm along +x from the midpoint of a straight 24.0 cm segment. Vacuum/air model; other circuit contributions are treated separately.
- Find
- Find the ideally long result and finite-segment contribution.
Approach: first calculate the long-wire model, then multiply by the endpoint correction.
Substitution: half the segment length is 0.120 m.
Result: The segment contributes about 48.5 µT along +y; the long-wire comparison is 50.0 µT.
Check: Relative to the long result, segment field is 2.99% smaller. The difference vanishes as h approaches infinity. A return conductor can still increase or decrease total field.
Example: unequal parallel currents
A zero-field point between two axes
- Given
- Long wires at x=−0.0400 m and +0.0400 m carry 8.00 A and 3.00 A, both along +z. Points lie on the joining line outside the wires; other fields are neglected.
- Find
- Find midpoint field and the zero-field point between the wires.
Approach: between equal-direction currents, field vectors oppose. Equate their magnitudes at the zero point.
Substitution: d1 is measured from the left axis.
Result: Midpoint field is 25.0 µT along +y. The zero point lies at x≈+18.2 mm.
Check: The zero point is closer to the weaker current. Both individual fields there are approximately 27.5 µT and cancel vectorially. Adding positive magnitudes would miss this zero.
Inside the wire, only enclosed current counts
This interior expression requires a long round wire of radius a with uniform current density.[2]
Inside, enclosed current grows with circle area. Field therefore grows proportionally to r and is zero on the axis; the external inverse-distance form cannot extend to r=0. Interior and exterior forms meet at r=a. At high frequency, skin effect changes current distribution, so uniform density is not an appropriate assumption. Magnetic material can also require a different field calculation. This interior relation is a specific additional model, not a general remedy for every thick wire.[2]
The same field magnitude inside and outside
- Given
- A round nonmagnetic wire of radius a=2.00 mm carries I=8.00 A uniformly over its cross-section along +z. Observe on +x at r=1.00 mm and r=4.00 mm.
- Find
- Find both fields and the surface value.
Approach: inside, only current within the enclosed cross-section counts. Outside, the entire current is enclosed.
Substitute radii in metres; directions follow the same circulation.
Result: Both observation points have about 0.400 mT along +y. The model’s maximum is at the surface, about 0.800 mT.
Check: At half-radius inside, one quarter of current is enclosed, giving half the surface field. Outside, twice the radius halves field. Both expressions agree at r=a.
B grows inside the wire and decreases outside
Free with a Quanta account. Your download stays ready after registration.
Five exercises: distance, direction and model choice
Calculate · Foundation
A long thin wire in air carries 12.0 A. Find field magnitude 5.00 cm from its axis; use μ0 above.
Show hint
Convert the denominator distance to metres.
Learning goal: Calculate external field in SI.
Show solution and calculation
Model and approach: Observe outside the long wire, with r measured from its axis.
Approach: use the external inverse-distance expression.
Result 48.0 µT.
Check: at 10.0 cm field would be 24.0 µT.
Rearrange · Application
The isolated field contribution of a long wire is 60.0 µT at axis distance 4.00 cm. What current magnitude is needed?
Show hint
Other fields have explicitly already been removed.
Learning goal: Infer current from an isolated field contribution.
Show solution and calculation
Model and approach: The supplied field is this wire’s isolated external contribution.
Approach: solve for absolute current.
Result about 12.0 A.
Check: doubling distance at fixed target field requires twice the current. Current direction additionally requires field circulation.
Interpret · Application
An external-field graph shows at radius and at . What follows at ? What changes under current reversal?
Show hint
The curve gives magnitude; circulation is additional information.
Learning goal: Separate radial decay from direction reversal.
Show solution and calculation
Approach: external inverse-distance dependence gives .
Reversal preserves the whole magnitude curve but reverses the vector everywhere.
Check: the curve alone does not reveal current sign.
Error analysis · Application
A long round wire has radius 3.00 mm. The measurement point is 1.00 mm outside its surface. A calculation uses r=1.00 mm. How does this alter external field?
Show hint
Draw radius and additional distance end to end.
Learning goal: Use axis distance rather than surface distance.
Show solution and calculation
Approach: correct axis distance is 4.00 mm.
The wrong value overestimates field by factor four.
Check: only the correct distance describes the physical measurement location.
Transfer · Challenge
A long round wire of radius 2.00 mm carries 10.0 A with uniform current density. Find B at 1.00 mm from its axis and compare the incorrectly applied external formula.
Show hint
The integration circle encloses only one quarter of cross-sectional area.
Learning goal: Calculate enclosed current inside a wire.
Show solution and calculation
Approach: enclosed current is 2.50 A.
Interior field is 0.500 mT; external form using total current would give 2.00 mT.
Check: correct interior field falls to zero on the axis rather than diverging.
What to take away
- Field circles the wire. Determine direction from current and observation point, not a positive magnitude alone.
- Distance is measured from the axis. A finite segment and a complete circuit are different calculation objects.
- Inside, the formula depends on enclosed current. For uniform current density, B rises linearly to the surface.
Sources for this explanation
Quanta · Updated October 2, 2026
- OpenStax University Physics 2 §12.2: Magnetic Field Due to a Thin Straight Wire
- OpenStax University Physics 2 §12.5: Ampère’s Law
- NIST 2022 CODATA: vacuum magnetic permeability
- OpenStax University Physics 2 §16.1: Maxwell’s Equations and Electromagnetic Waves
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 3 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Highlighted field magnitude, direction and axis distance in question headings; added paragraph connections to Maxwell’s integral equations and Biot–Savart with primary-source attribution.
- Separated long external field, finite-segment correction and wire interior; wrote two original examples and five model/calculation exercises in DE/EN.
- Added an accessible entry and prerequisites, explained model steps, and added a complete example and quantitative diagram; retained existing examples, five exercises and sources.
Cite this reference page
Quanta. Magnetic field of a long straight wire. Updated October 2, 2026. https://quanta-study.de/en/formula-sheet/magnetfeld-langer-gerader-leiter
When citing a specific scientific statement, also cite the specialist source linked to that statement.