Formula & Calculator

Ampere's Law

Relates the circulating magnetic field around a closed loop to the current passing through it.

MagneticsMagnetostatics

Ampere's Law Calculator Magnetic Field · Current

B·dl = μ₀ · Ienc
B = magnetic field  ·  Ienc = enclosed current  ·  μ₀ = 4π×10⁻⁷ T·m/A  ·  r = radius
⟹ Solve B, Ienc, r
Tesla (T)
Amperes (A)
meters (m)
μ₀ = 4π × 10⁻⁷ T·m/A  ≈  1.2566370614×10⁻⁶ T·m/A
Please fix the errors above.
Solve for:
Presets:
Magnetic Field
B: Ienc: r:
✓ Copied!
Magnetic Field Gauge
Weak (< 10⁻⁴ T) Moderate (10⁻⁴–10⁻² T) Strong (> 10⁻² T)
∮B·dl = μ₀·Ienc  ·  For a circular Amperian loop: B·(2πr) = μ₀·Ienc  ·  μ₀ = 4π×10⁻⁷ T·m/A

Variables

SymbolQuantityUnit
BMagnetic flux densityT
μ₀Permeability of free space (4π×10⁻⁷)H/m
I_encEnclosed electric currentA
NNumber of turns (for solenoids/toroids)dimensionless
rRadius of Amperian loop (wire/toroid)m
LLength of solenoidm

What it means

Ampere’s law states that the line integral of the magnetic field B around a closed path is equal to μ₀ times the total current enclosed by the path. Mathematically, ∮ B·dl = μ₀·I_enc. It is one of Maxwell’s equations and is the magnetic counterpart of Gauss’s law for electricity. Ampere’s law is used to calculate magnetic fields for symmetric current distributions, such as those from long straight wires, solenoids, and toroids. For a long straight wire carrying current I, the magnetic field at distance r is B = μ₀I/(2πr). This law is fundamental in electromagnetism and is used in the design of magnetic circuits, transformers, and inductors. Example: For a long straight wire with I=10A, the magnetic field at r=0.1m is B = (4π×10⁻⁷ * 10) / (2π * 0.1) = (4π×10⁻⁶)/(0.2π) = 2×10⁻⁵ T (20 µT).

Worked example

Ampere's Law – Practical Example

Real‑World
Scenario: A long straight wire carries a current of 10 A. Find the magnetic field at a distance of 0.1 m from the wire.
ParameterValue
I10 A
r0.1 m
μ₀4π×10⁻⁷ H/m
FormulaB = (μ₀·I) / (2π·r)
1Substitute: B = (4π×10⁻⁷ × 10) / (2π × 0.1)
2Simplify: B = (2×10⁻⁶) / 0.1 = 2×10⁻⁵ T
Final Design B = 20 µT ✓ Magnetic field
Why: Ampere's law relates the magnetic field around a wire to the current – it is the magnetic analog of Gauss's law for electricity.

Common mistakes

  • Closed loop: The line integral is around a closed path.
  • Current enclosed: Only currents passing through the surface bounded by the loop.
  • Sign: Use the right‑hand rule for current direction relative to the loop.
  • Displacement current: For time‑varying fields, add displacement current term (Maxwell’s correction).
  • Magnetic permeability μ₀: For media, use μ.

Applications

Ampere's law relates the circulation of the magnetic field around a closed loop to the enclosed current, forming the basis for magnetostatics. Engineers use it to design electromagnets, motors, and inductors, calculating the field produced by current‑carrying conductors. It is also used to analyse the magnetic field of transmission lines and to design magnetic shielding. By applying Ampere's law, professionals can determine the field distribution in symmetric geometries, essential for magnetic circuit design. This law is one of Maxwell's equations and is fundamental to electrical engineering.

  • Design of electromagnets and magnetic actuators
  • Motor and transformer magnetic circuit analysis
  • Transmission line magnetic field assessment
  • Magnetic shielding and EMC design
  • Educational foundation of magnetic fields