Free to Use

Magnetic Field Calculator

Compute magnetic field strength for straight wires, circular loops, and solenoids using the Biot-Savart law. Step-by-step physics solutions with Tesla, Gauss, and milliTesla unit options.

Permeability of Free Space (μ₀): μ₀ = 4π × 10⁻⁷ T·m/A

Real-World Magnetic Field Examples

🧲 Magnetic Field Near a Power Line

Problem: A straight power line carries a current of 100 A. What is the magnetic field at a distance of 10 m from the wire?

Solution: Using B = μ₀I / (2πr)

B = (4π × 10⁻⁷ × 100) / (2π × 10) = 2 × 10⁻⁶ T = 2 μT

This is a very weak field — about 4% of Earth's magnetic field (50 μT).

⭕ Magnetic Field at the Center of a Loop

Problem: A circular loop of radius 0.05 m carries a current of 3 A. Find the magnetic field at its center.

Solution: Using B = μ₀I / (2R)

B = (4π × 10⁻⁷ × 3) / (2 × 0.05) = 3.77 × 10⁻⁵ T = 37.7 μT

This is comparable to Earth's magnetic field strength. Multiple loops can be stacked to increase the field.

📏 Solenoid Electromagnet

Problem: A solenoid has 500 turns per meter and carries a current of 2 A. What is the magnetic field inside?

Solution: Using B = μ₀nI

B = (4π × 10⁻⁷) × 500 × 2 = 1.26 × 10⁻³ T = 1.26 mT

This is about 25 times Earth's magnetic field. Actual MRI machines use fields of 1.5-3 T (over 1000× stronger).

⚡ Lightning Strike Field

Problem: A lightning bolt carries a peak current of 30,000 A. Estimate the magnetic field at a distance of 50 m.

Solution: Using B = μ₀I / (2πr)

B = (4π × 10⁻⁷ × 30000) / (2π × 50) = 1.2 × 10⁻⁴ T = 120 μT

About 2.4× Earth's magnetic field! The field drops off rapidly with distance — at 100 m it's half this value.

Magnetic Field Formula & Guide

B = μ₀I / (2πr)
Magnetic field around a long straight wire

Where B is the magnetic field (T), μ₀ = 4π × 10⁻⁷ T·m/A is the permeability of free space, I is the current (A), and r is the radial distance from the wire (m).

B = μ₀I / (2R)
Magnetic field at the center of a circular current loop

Where R is the radius of the loop (m). This formula gives the field at the exact center of a single circular loop carrying current I.

B = μ₀nI
Magnetic field inside an ideal solenoid

Where n is the number of turns per unit length (turns/m) and I is the current (A). For an ideal solenoid, the field is uniform inside and nearly zero outside.

Key Concepts

📌 The Biot-Savart Law

The Biot-Savart law is the fundamental equation describing the magnetic field generated by a steady current. The formulas above are derived from it for specific geometries. The general form involves integrating over the current path: B = (μ₀/4π) ∫ (I dℓ × r̂)/r².

📌 Units of Magnetic Field

The SI unit is the Tesla (T). The Gauss (G) is another common unit: 1 T = 10,000 G. Earth's magnetic field is about 0.5 G = 50 μT. MilliTesla (mT) is convenient for moderate fields: 1 mT = 10⁻³ T = 10 G.

📌 Right-Hand Rule

For a straight wire, point your thumb in the direction of current flow; your fingers curl in the direction of the magnetic field lines. For a loop or solenoid, the field direction follows the right-hand rule through the center of the coil.

📌 Factors Affecting Field Strength

The field from a straight wire decreases with distance (1/r). Loop and solenoid fields depend on geometry — tighter loops, more turns, and higher currents all increase the magnetic field strength proportionally.

🧲
Straight Wire
Calculate the magnetic field around a long straight conductor using B = μ₀I/(2πr). Supports m, cm, and mm distance units with A and mA current options.
Circular Loop
Find the magnetic field at the center of a circular current loop using B = μ₀I/(2R). Supports meters and centimeters for radius input.
📏
Solenoid
Compute the uniform magnetic field inside an ideal solenoid using B = μ₀nI. Enter the number of turns per meter and current to get the field strength.
📝
Step-by-Step Solutions
Every calculation comes with a detailed step-by-step breakdown showing the formula, substitution, unit conversions, and final result in Tesla, Gauss, and milliTesla.

⚠️ Important Note: These formulas assume ideal conditions. The straight wire formula assumes an infinitely long wire (accurate when the observation distance is much less than the wire length). The solenoid formula assumes an infinitely long solenoid (accurate for points well inside and away from the ends). Real-world fields may vary due to finite geometry, nearby ferromagnetic materials, and edge effects.

Frequently Asked Questions

What is the Biot-Savart law?
The Biot-Savart law is a fundamental principle of electromagnetism that describes the magnetic field generated by a steady electric current. It states that the magnetic field contribution from a small segment of current-carrying wire is proportional to the current, the length of the segment, and the sine of the angle between the segment and the position vector, and inversely proportional to the square of the distance. The complete formulas for straight wires, loops, and solenoids are all derived by integrating the Biot-Savart law over specific geometries.
What is the value of μ₀ (permeability of free space)?
μ₀, the permeability of free space (also called the magnetic constant), is exactly 4π × 10⁻⁷ T·m/A = 1.2566370614... × 10⁻⁶ T·m/A. It is a fundamental physical constant that quantifies the ability of a vacuum to support a magnetic field. It relates magnetic field strength to the current that produces it and also appears in the relationship between the speed of light and the permittivity of free space: c = 1/√(μ₀ε₀).
What is the difference between Tesla and Gauss?
Tesla (T) and Gauss (G) are both units of magnetic field strength. The conversion is: 1 T = 10,000 G. Tesla is the SI unit and is used for scientific and engineering measurements. Gauss is part of the CGS (centimeter-gram-second) system and is still commonly used in many practical applications. For reference: Earth's magnetic field ≈ 0.5 G = 50 μT, a refrigerator magnet ≈ 50 G = 5 mT, and an MRI machine ≈ 15,000-30,000 G = 1.5-3 T. Our calculator shows results in all three units: Tesla, Gauss, and milliTesla.
How does distance affect the magnetic field from a wire?
The magnetic field around a long straight wire follows an inverse relationship with distance: B ∝ 1/r. This means if you double the distance from the wire, the magnetic field drops to half its original value. If you move ten times farther away, the field becomes one-tenth as strong. This is fundamentally different from the 1/r² dependence of electric fields from point charges or the 1/r³ dependence of dipole fields. The relatively slow decay (1/r) means that magnetic fields from power lines can still be detected at significant distances.
What is the direction of the magnetic field?
The direction of the magnetic field is determined by the right-hand rule. For a straight wire: point your right thumb in the direction of the current; your fingers curl in the direction of the magnetic field lines circling the wire. For a circular loop or solenoid: curl your fingers in the direction of the current; your thumb points in the direction of the magnetic field through the center of the loop. Magnetic field lines form continuous closed loops — they always point from the north pole to the south pole outside a magnet and from south to north inside.
Why is the solenoid field independent of the radius?
For an ideal (infinitely long) solenoid, the magnetic field inside is uniform and depends only on the current and the number of turns per unit length: B = μ₀nI. Remarkably, the field does not depend on the radius of the solenoid. This is because a larger radius distributes the same number of turns over a larger circumference, which exactly cancels the effect of having more space between the turns. In practice, for finite solenoids, the field near the center is very close to this ideal value as long as the length is much greater than the radius.