Ampere’s Law Calculator
Solve for magnetic field, enclosed current, or radial distance for a long straight conductor using the standard circular symmetry form of Ampere’s law.
Enter any two known quantities and choose what you want to solve for.
How to use an ampere’s law calculator effectively
An ampere’s law calculator helps you evaluate the relationship between electric current and the magnetic field produced around it. In practical terms, this means you can estimate the magnetic flux density near a conductor, determine how much current is enclosed by an Amperian loop, or find the radial distance at which a desired field occurs. For students, it is a fast way to check homework and lab work. For engineers, it is a quick sanity check when evaluating current carrying conductors, bus bars, cable runs, experimental coils, or electromagnetic shielding scenarios.
The version on this page uses one of the most common and useful forms of Ampere’s law: the magnetic field around an ideal long straight wire in free space. Under this symmetry, the field lines are circles centered on the conductor, and the magnitude of the magnetic field depends on only two variables: current and distance from the wire. The governing equation is:
Here, B is the magnetic field in tesla, μ0 is the permeability of free space, I is the enclosed current in amperes, and r is the radial distance in meters. This equation is a direct application of the integral form of Ampere’s law when symmetry makes the field constant along a circular path.
What Ampere’s law means physically
Ampere’s law connects magnetic fields to electric currents. In integral form, it states that the line integral of the magnetic field around a closed path equals the permeability times the net current enclosed by that path. This is one of the central laws of classical electromagnetism and is deeply connected to Maxwell’s equations. The law is especially powerful when geometry gives you enough symmetry to simplify the integral. Long straight wires, ideal solenoids, and toroids are classic examples.
When the conductor is straight and effectively infinite in length relative to the observation distance, every point on a circular path around the wire experiences the same magnetic field magnitude. That lets us replace the integral with a simpler product: B(2πr). Solving that expression gives the working formula used in this calculator.
As a rule of thumb, the magnetic field increases linearly with current and decreases inversely with distance. Double the current and the field doubles. Double the distance and the field is cut in half. That simple scaling makes an ampere’s law calculator useful for fast comparative work.
When this calculator is the right tool
- Estimating magnetic field near a single straight current carrying wire.
- Checking lab measurements in introductory electricity and magnetism courses.
- Comparing field intensity at different standoff distances from a conductor.
- Back solving for current when field and radius are known.
- Teaching and learning circular symmetry in Maxwell equation applications.
It is important to remember that not every magnetic field problem should be solved with this simplified expression. If the geometry is more complex, if the wire is not long compared with the measurement distance, if magnetic materials strongly alter permeability, or if current distribution is nonuniform, you may need Biot-Savart law, finite element analysis, or a more specialized closed form expression.
Step by step guide to using the calculator
- Select whether you want to solve for magnetic field B, current I, or distance r.
- Enter the known values in the corresponding input boxes.
- Choose the correct units for each quantity. The calculator supports amperes, milliamperes, kiloamperes, meters, centimeters, millimeters, tesla, millitesla, and microtesla.
- Click Calculate to generate the numerical answer and the companion chart.
- Review the note beneath the result to confirm the assumptions match your problem.
For example, if you enter 10 A and 1 cm and ask for magnetic field, the calculator converts 1 cm to 0.01 m and evaluates the expression. The result is about 200 μT. That is several times larger than the Earth’s field in many locations, which shows how quickly current can create noticeable local magnetic effects at short distances.
Worked examples
Example 1: Magnetic field from a 5 A wire at 2 cm
Use the formula B = μ0 I / (2πr). Convert 2 cm to 0.02 m. Then:
A field of 50 μT is comparable to the Earth’s magnetic field range at the surface, which is why low current conductors can still matter in sensitive measurement setups.
Example 2: Current required to create 1 mT at 1 cm
Rearrange the same formula to solve for current:
Convert 1 mT to 0.001 T and 1 cm to 0.01 m. Then:
This result highlights that generating millitesla level fields at modest distances can require significant current unless the geometry concentrates the field.
Example 3: Distance for a 100 A conductor to produce 200 μT
Rearrange to solve for radius:
Substitute I = 100 A and B = 200 μT = 2 × 10^-4 T:
So the field would be about 200 μT at a distance of 10 cm from the wire.
Reference values that make results easier to interpret
One of the biggest benefits of any ampere’s law calculator is context. Numbers become much more useful when compared with familiar magnetic field strengths. The following table summarizes several real world reference levels.
| Magnetic environment | Typical magnetic field | Interpretation |
|---|---|---|
| Earth’s surface field | 25 to 65 μT | Typical planetary background range measured at the surface. This is a useful baseline when comparing conductor generated fields. |
| 1 A wire at 1 cm | 20 μT | Comparable to a substantial fraction of Earth’s field. |
| 10 A wire at 1 cm | 200 μT | Clearly above Earth’s background in the local area. |
| 100 A wire at 1 cm | 2 mT | A strong near field relative to everyday ambient exposure. |
| Clinical MRI scanner | 1.5 to 3 T | Orders of magnitude stronger than fields around ordinary wires. |
| High field research MRI | 7 T and above | Used in advanced research and specialty imaging applications. |
The Earth’s field range shown above is consistent with data from NOAA, while the permeability constant used in the equation is available from NIST references. Those are excellent sources if you want to cross check assumptions or constants in your own work.
Comparison table: exact field values from the straight wire formula
The next table shows how the field scales for a wire observed at a fixed radius of 1 cm. Because the relationship is linear in current, every tenfold increase in current produces a tenfold increase in field.
| Current | Radius | Calculated field | Field in microtesla |
|---|---|---|---|
| 0.1 A | 1 cm | 2 × 10^-6 T | 2 μT |
| 1 A | 1 cm | 2 × 10^-5 T | 20 μT |
| 5 A | 1 cm | 1 × 10^-4 T | 100 μT |
| 10 A | 1 cm | 2 × 10^-4 T | 200 μT |
| 50 A | 1 cm | 1 × 10^-3 T | 1000 μT |
| 100 A | 1 cm | 2 × 10^-3 T | 2000 μT |
Why symmetry matters in Ampere’s law problems
Ampere’s law is always true, but it is not always easy to use directly. The reason this calculator feels simple is symmetry. For a long straight conductor, every point on a circle centered on the wire has the same magnetic field magnitude and the field direction is tangent to that circle. That lets the integral simplify beautifully. If the shape is irregular, the current path bends, nearby return currents exist, or ferromagnetic materials distort the field, then the line integral may no longer reduce to a simple expression.
This is why two situations with the same current can have very different local magnetic fields. Geometry matters. A tightly wound solenoid can create a much stronger interior field than a single isolated straight wire because the contributions from many turns add constructively. A twisted pair can produce significantly less external field than two separated conductors because the opposing currents partially cancel at larger distances.
Common mistakes when using an ampere’s law calculator
- Mixing units. Centimeters and millimeters must be converted to meters, and microtesla must be converted to tesla before substitution if you solve by hand.
- Using diameter instead of radius. The formula requires distance from the wire center, not the full width across the path.
- Applying the equation too close to a thick conductor. Inside a conductor with distributed current, the field can follow a different radial dependence depending on the current density profile.
- Ignoring nearby conductors. Real cable assemblies often have return paths whose fields partially cancel or reinforce the primary conductor.
- Assuming the model applies to short wires. Finite length effects can be substantial when the conductor length is not large compared with the observation distance.
How the chart helps you interpret the result
The chart generated by this calculator is not just decorative. It reveals the scaling behavior of Ampere’s law. If you solve for field, the plotted curve typically shows field decreasing with increasing radius. If you solve for current, the chart shows how field increases as current rises at a fixed distance. These shapes make the inverse and linear relationships visually obvious. For teaching, this is extremely useful because it turns a formula into an intuition: near the conductor the field changes rapidly, while farther away it falls off more gradually.
Practical applications in engineering and science
Although the ideal long wire model is simple, the insight it provides carries over into real design work. Power engineers use magnetic field estimates when routing current carrying conductors and considering spacing. Laboratory researchers use field estimates when placing sensors or avoiding electromagnetic interference. Robotics and automation teams may consider nearby current loops when working with compasses, Hall effect sensors, or low field magnetometers. In educational labs, Ampere’s law is often the bridge between basic circuit theory and full electromagnetic field analysis.
Medical imaging and industrial magnet systems operate at far higher field strengths than ordinary conductors, but the same electromagnetic foundations still apply. The difference is geometry, scale, and material design. That is why understanding the simple straight wire case is so valuable. It gives you a base model from which more advanced configurations can be understood.
Authoritative references for further study
If you want to go beyond this calculator and verify constants or explore measured magnetic environments, these sources are reliable starting points:
- NIST reference for magnetic constant related data
- NOAA geomagnetism overview and Earth magnetic field context
- Georgia State University HyperPhysics explanation of Ampere’s law
Final takeaway
An ampere’s law calculator is one of the fastest ways to connect current, distance, and magnetic field in a physically meaningful way. Use it when the geometry supports the symmetry assumptions, pay close attention to units, and compare your results to known reference fields so the numbers are intuitive. For a long straight conductor in free space, the relation is elegant and practical: field is directly proportional to current and inversely proportional to distance. That single insight explains a remarkable amount of everyday electromagnetism.
Educational note: this calculator uses the ideal long straight wire model in free space. For finite conductors, magnetic materials, coils, or multi-conductor systems, more advanced models may be necessary.