1. Home
  2. Physics
  3. Magnetism & induction
  4. Magnetic Field of a Straight Wire Calculator

Magnetic Field of a Straight Wire Calculator

Field at a distance from a long straight current-carrying wire, or the current or distance.

PhysicsGrades 11–12IntermediateStep-by-step solution

Practice questions

Textbook-style questions. Press Solve in the tool to load the values and see the full solution. Underlined words are explained below.

  1. A long wire carries 10 A. Find the magnetic field 5 cm from it.

  2. What current gives a field of 50 µT (about the Earth's field) 2 cm from a wire?

Worked example

Here's the first practice question solved in full, so you can see exactly what you'll get. Try it on paper before you read the steps.

Question: A long wire carries 10 A. Find the magnetic field 5 cm from it.

Plan: how this problem is solved
  1. Write the given values in SI units
  2. Put the values into the formula
Answer
Magnetic fieldB = 4 × 10−5 T (= 40 µT)
Step-by-step solution
  1. Write the given values in SI units
    I=10 A
    r=5 cm = 0.05 m
    μ0=4π × 10−7 T m/A
    To find: B (Magnetic field)
  2. Put the values into the formula
    B=μ0 I2π r
    =(1.257 × 10−6) × 102π × 0.05
    =4 × 10−5 T (= 40 µT)
Key idea: The field lines are circles round the wire. Point your right thumb along the current and your fingers curl the way the field goes. The Earth's field is about 50 µT, for comparison.

Terms used on this page

New to a word in the question or the solution? Here it is in simple language.

Displacement (s)
How far a body ends up from where it started, in a straight line, with a direction. If you walk 5 m forward and 5 m back, the distance is 10 m but the displacement is 0.
Electric current (I)
The flow of electric charge through a wire, measured in amperes (A). A phone charger gives roughly 1 to 3 A.

Symbols in this solver

What each box asks for, and its unit.

SymbolWhat it meansSI unit
ICurrentA (or mA)
rDistance from the wirem (or km, cm, mm, R⊕, AU)
BMagnetic fieldT (or mT, µT, G)

Formula & concept

Magnetic field at a distance from a long straight wire carrying a current, or the current or distance from the field.

B = μ0I2πr

Key idea: The field lines are circles round the wire. Point your right thumb along the current and your fingers curl the way the field goes. The Earth's field is about 50 µT, for comparison.

What it can find

Choose the unknown with the “What do you want to find?” buttons: magnetic field, current, distance from the wire. The formula is rearranged for you and every step is shown.

How to use this calculator

  1. Choose what you want to find. Its box turns orange.
  2. Type the known values from your question and pick the unit for each one.
  3. Press Solve step by step.
  4. Read the plan first. It lists the steps the solution will follow. Want to try it yourself? Tick Practice mode and the answer stays hidden until you ask for it.
  5. Check the answer, then go through each numbered step. Where there's a second method, it's shown after the main one.
  6. Stuck on a word? The terms section explains it in simple language.

Frequently asked questions

How does the Magnetic Field of a Straight Wire work?
You enter the values you know, pick their units and press Solve. The tool changes everything to SI units, applies the formula B = (μ0I)/(2πr) and shows you each step: given data, formula, substitution and the final answer.
What is the key idea behind it?
The field lines are circles round the wire. Point your right thumb along the current and your fingers curl the way the field goes. The Earth's field is about 50 µT, for comparison.
Can I enter values in km, mm, kN or °C?
Yes. Each box has a unit list. The conversion to SI units is shown as the first step of the solution.
What if my answer doesn't match my book?
First check that you've picked the right units. Then see which constants your book uses and how many figures it rounds to. You can change the number of figures under Settings in the solver. A small difference in the last digit is usually just rounding.
Can I see how to solve it without seeing the answer?
Yes. Tick Practice mode under the solver. You'll get the plan of steps only, so you can work it out on paper. One click then shows the full solution.
Is the Magnetic Field of a Straight Wire free to use?
Yes, it's free with no sign-up. All calculations happen inside your browser and nothing you type is stored.
Which grades is it useful for?
It's made for Grades 11–12 (A-Level · AP · IB · Class 11–12 · JEE · NEET). The working follows the method used in textbooks and exams.