Currents make magnetic fields
Hans Christian Ørsted discovered in 1820 that a compass needle swings near a wire carrying current. Every electric current creates a magnetic field around it, and shaping the wire into loops or coils concentrates that field. This calculator covers the three classic shapes.
The formulas
With μ₀ = 1.2566 × 10⁻⁶ T·m/A, the permeability of free space:
| Configuration | Field |
|---|---|
| Long straight wire, at distance r | B = μ₀ × I ÷ (2π × r) |
| Inside a long solenoid of length L with N turns | B = μ₀ × N × I ÷ L |
| Center of a flat circular coil of radius R with N turns | B = μ₀ × N × I ÷ (2R) |
The solenoid formula assumes the coil is much longer than it is wide; near the ends, the field drops to about half. All formulas assume air or vacuum around the wire.
Worked example
A solenoid with 200 turns wound over 10 cm and carrying 10 A:
| Result | Value |
|---|---|
| Magnetic field | 25.13 mT |
| In tesla | 0.02513 T |
| In gauss | 251.3 G |
| Compared with Earth’s field | about 500 times |
The same 10 A in a single straight wire gives only 0.1 mT at 2 cm, about twice Earth’s field. Winding the wire into a coil multiplies the effect.
Typical field strengths
| Source | Field |
|---|---|
| Earth’s magnetic field | 25–65 µT (about 0.5 G) |
| Near a household appliance cable | a few µT |
| Fridge magnet | 5–10 mT |
| Neodymium magnet surface | 0.5–1.3 T |
| Hospital MRI scanner | 1.5–3 T |
Increasing the field
- More turns or more current raise the field in proportion, but more current also means more heat in the wire (P = I² × R).
- A shorter, denser winding raises the field inside a solenoid.
- An iron core can multiply the field by several hundred until the iron saturates around 1.5 to 2 T. This is how electromagnets, relays and transformers work, and it is not included in these air-core formulas.
Safety note
The fields from household wiring are tiny. Strong electromagnets and MRI-level fields can pull steel objects violently and affect pacemakers, so treat high-current coils with care.