Magnetic Field Calculator
Find the magnetic field strength in tesla around a long straight wire or inside a long solenoid.
These tools are for study and quick checking. A result is only as good as the numbers you enter and the simplifying assumptions in the formula. For published, regulated or safety-critical work, check it against a trusted source or an instrument.
How it works
- Enter your values in the boxes. Where a box has a unit beside it, check the unit before you read the answer.
- The answer updates as you type, so there is no button to press.
- Use Copy results to keep the answer. Check the formula and its limits below if the result will go into a report or an experiment.
The formula
wire B = mu0 I / (2 pi r); solenoid B = mu0 n I
Frequently asked questions
What is a tesla?
The SI unit of magnetic flux density. The Earth's field is about 50 microtesla.
Are the formulas exact?
They hold for long straight wires and long solenoids in air.
Is what I enter sent anywhere?
No. The calculation is done in your browser, so your numbers are not sent to a server or saved.
Related tools
Magnetic Force Calculator
Find the magnetic force on a moving charge or on a current carrying wire in a magnetic field.
Inductor Calculator
Find the energy stored in an inductor, its reactance at a given frequency, and the total inductance of two inductors in series and parallel.
Transformer Calculator
Find the secondary voltage, turns ratio and currents of an ideal transformer.