Ampere's Law Calculator

Ampere's Law relates the magnetic field around a closed path to the electric current passing through it — a fundamental principle used to design solenoids, toroids, and current-carrying wires. Select a Calculation Mode (Magnetic Field in Solenoid, Toroid, or Long Wire; Current from Magnetic Field; or Number of Turns Required), then enter values like Current (I), Number of Turns (N), Length (L), and Radius (r) to get your primary result. Secondary outputs include Turn Density, Magnetomotive Force (MMF), and Energy Density.

A

Electric current through the conductor in Amperes

Total number of wire turns (for solenoid/toroid modes)

m

Axial length of the solenoid in meters

m

Radius of the toroid or distance from the wire in meters

T

Known magnetic field in Tesla (used when solving for current or turns)

m

Inner radius of the toroid in meters

m

Outer radius of the toroid in meters

m

Radial distance at which to evaluate the toroid field

Results

Primary Result

--

Turn Density (n = N/L)

--

Magnetomotive Force (MMF = N·I)

--

Energy Density (u = B²/2μ₀)

--

Result Type

--

More Electrical & Electronics Tools

Frequently Asked Questions

What is Ampère's Law and when does it apply?

Ampère's Law states that the line integral of the magnetic field B around a closed loop equals μ₀ times the total electric current enclosed by that loop. It applies most cleanly to highly symmetric geometries — infinite straight wires, solenoids, and toroids — where the path of integration can be chosen to exploit the symmetry and simplify the calculation.

Why doesn't the magnetic field inside a solenoid depend on its diameter?

Inside an ideal solenoid, the field B = μ₀·n·I depends only on the turn density (n = N/L) and the current. When you apply Ampère's Law using a rectangular Amperian loop that runs parallel to the axis inside and outside the solenoid, the field outside is approximately zero and the field inside is uniform. Because the loop's length — not the diameter — determines how many turns are enclosed, diameter cancels out of the equation.

How accurate is Ampère's Law for calculating magnetic fields in real devices?

Ampère's Law gives exact results for ideal, infinite geometries. For practical finite solenoids and toroids it is an excellent approximation when the length greatly exceeds the radius (solenoid) or when the measurement point stays well within the winding (toroid). Edge effects, winding imperfections, and material permeability all cause real-world deviations, so engineering applications typically add correction factors or use finite-element simulation for precision work.

What happens to the magnetic field when the current frequency increases?

At high frequencies, skin effect causes current to concentrate near the conductor surface, reducing the effective cross-sectional area carrying current. This changes the current distribution assumed in the simple Ampère's Law formula. Additionally, displacement currents (from the modified Maxwell form) become significant, so the static Ampère's Law formula must be replaced with the full Ampère-Maxwell equation for AC analysis.

How do magnetic materials change the field calculations?

When a magnetic material (core) with relative permeability μᵣ fills the solenoid or toroid, the field becomes B = μ₀·μᵣ·n·I. For example, soft iron with μᵣ ≈ 5000 multiplies the free-space field by 5000. This calculator assumes air-core (μᵣ = 1); to account for a magnetic core, multiply the primary result by the core's relative permeability.

What safety considerations apply to high magnetic field calculations?

Strong magnetic fields (above ~50 mT) can interfere with pacemakers and implanted medical devices. Fields above 1 T require specialized MRI-grade facilities, careful shielding, and strict exclusion zones. High currents generating such fields also produce significant Joule heating; conductor ratings, insulation, and thermal management must all be verified before energizing a high-field coil.

How do you account for multiple current-carrying conductors?

By the superposition principle, the total magnetic field at any point is the vector sum of the fields produced by each conductor individually. When using Ampère's Law, you sum all currents that pass through the Amperian loop (with sign based on direction), so the enclosed current I_enc is the algebraic sum of individual contributions.

What is magnetomotive force (MMF) and why does it matter?

Magnetomotive force (MMF = N·I, in ampere-turns) is the magnetic analog of electromotive force (voltage) in an electric circuit. It drives magnetic flux through a magnetic circuit and is central to transformer and inductor design. A higher MMF for a given core reluctance produces greater magnetic flux, which determines inductance, transformer coupling, and saturation limits.