Magnetic Field Calculator
Calculate magnetic flux density around a straight wire or at the centre of a circular coil. Get the magnetic field formula, unit conversion, fully worked solution, and an attractive labelled field-line diagram.
Magnetic Field Diagram and Values
Curved blue lines show magnetic field direction; all input and answer values appear directly on the diagram.
Step-by-Step Solution
Here's exactly how this answer was calculated, one step at a time.
Given: Current = 5 A, distance = 10 cm
Step 1: Write the magnetic field formula
A long straight wire produces circular magnetic field lines.
B = μ₀I / (2πr)Step 2: Convert distance to metres
r = 10 cm = 0.1 mStep 3: Substitute current and geometry
B = (4π × 10⁻⁷ × 5) / (2π × 0.1)Step 4: Calculate magnetic flux density
B = 0.00001 T = 10 µT
The magnetic flux density is:
0.00001 T (10 µT)
Free Magnetic Field Calculator
This Magnetic Field Calculator finds magnetic flux density (B) for two common current-carrying shapes: a long straight wire and a circular coil. Enter current, the distance or coil radius, and the number of turns for a coil. The tool converts centimetres to metres, applies the correct magnetic field formula, and shows every arithmetic step. The live diagram puts the wire or coil, field lines, dimensions and answer in one clear visual.
It is designed for students solving electromagnetism problems, teachers preparing examples, and electronics learners checking an electromagnet or field estimate. The calculation assumes air or vacuum and ideal geometry. Nearby steel, magnetic cores, short-wire end effects and complex coil shapes can substantially change a real magnetic field.
What Is Magnetic Field Strength?
A magnetic field is the region where a magnet, moving charge or current-carrying conductor experiences magnetic effects. Magnetic flux density B is measured in tesla (T). Tesla is often a large unit for classroom wire problems, so answers are commonly stated in millitesla (mT) or microtesla (µT): one tesla equals one million microtesla.
Field lines are a visual model. Their direction is the direction a north magnetic pole would point, and closer lines indicate a stronger field. Around a straight wire, the field lines form circles. At the centre of a circular coil, fields from each turn add in roughly the same direction.
Magnetic Field Around a Straight Wire Formula
For a sufficiently long straight wire in air, use B = μ₀I / (2πr). Here μ₀ is the permeability of free space, 4π × 10⁻⁷ T·m/A; I is current in amperes; r is perpendicular distance from the wire in metres. The formula says that field strength increases directly with current and falls inversely with distance.
Worked example: for 5 A at 10 cm, convert r = 0.10 m. Then B = (4π × 10⁻⁷ × 5)/(2π × 0.10) = 0.000010 T = 10 µT. Doubling current to 10 A makes 20 µT; doubling distance to 20 cm reduces the field to 5 µT.
Magnetic Field at the Centre of a Circular Coil
For a circular coil, use B = μ₀NI / (2r), where N is the number of turns. Current and turn count strengthen the field, while a larger radius spreads the field and reduces its centre value. This is a useful first approximation for a flat coil in air.
For 100 turns, 5 A and a 10 cm radius, B = (4π × 10⁻⁷ × 100 × 5)/(2 × 0.10) = 0.00314 T, or 3.14 mT. The coil result is much larger than one straight wire because many turns contribute. A long solenoid uses a different formula, B = μ₀nI, where n is turns per metre.
Right-Hand Rule and Magnetic Field Direction
Use the right-hand grip rule to determine direction around a wire. Point your right thumb along conventional current; your curled fingers indicate the circular magnetic-field direction. In the straight-wire diagram, a dot indicates current coming out of the page. The field circles counter-clockwise. A cross would mean current into the page and clockwise field lines.
For a coil, curl your fingers in conventional current direction. Your thumb points through the coil's north-facing field direction. Direction is important for forces, induced voltage and combining fields, but this calculator reports the magnitude B as a positive value.
Units, Assumptions and Safety
Always convert centimetres to metres before using SI formulas: 10 cm is 0.10 m. Keep current in amperes. The permeability constant used here assumes air or vacuum. A ferromagnetic core can concentrate field lines and requires its material permeability and geometry to predict accurately.
Do not use a simple field calculation to decide whether equipment is safe. High current conductors can heat, create strong forces and interfere with medical devices or electronics. Follow local electrical standards and keep clear of exposed conductors. This educational calculator is not a substitute for engineered magnetic-field or electrical-safety analysis.
Frequently Asked Questions
What is the formula for magnetic field around a wire?
B = μ₀I/(2πr), with current in amperes and perpendicular distance in metres.
How do I calculate magnetic field of a circular coil?
At its centre use B = μ₀NI/(2r), where N is turns, I is current and r is coil radius.
What unit measures magnetic field?
Magnetic flux density B is measured in tesla (T). One tesla equals 1,000,000 microtesla (µT).
How does distance affect magnetic field?
For a straight wire, field is inversely proportional to distance: doubling distance halves the field.