Home / Learn / Physics / Electromagnet builderTool #L24 (formerly #1049)

Electromagnet builder: wind a coil on a nail, add cells, and see how many paper clips it picks up

Make an electromagnet from a coil of wire, some cells and an iron nail. Change the number of turns and cells, take the nail out, switch it off or turn the cells round, and watch three compasses swing and paper clips get picked up or dropped.

Keep it one tap away for everyday use.

Bookmark Electromagnet builder?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Turns, cells
  2. Iron core
  3. Compasses
  4. Check
Nothing is uploadedWorks offline once open

Build an electromagnet

Cells
north end of each compass needlenorth is up the screen

Try this

  • Take the iron nail out. The same coil now hardly picks up anything: the iron makes it about 100 times stronger here.
  • Add turns, then add cells. Both make the electromagnet stronger.
  • Switch off: the clips drop at once. That is why electromagnets are used in cranes for scrap iron.
  • Turn the cells round. The clips still stick, but every compass needle swings the other way: the poles have swapped.
  • Look at the far compass: it hardly moves, because the field gets weak quickly as you go away.

Check yourself

What it does

Wrap insulated wire round an iron nail, join the ends to a cell, and the nail becomes a magnet that can pick up paper clips. Switch off and the clips drop. That is an electromagnet, and this page lets you build one without a single burnt finger.

You choose the number of turns of wire (10 to 100) and the number of cells (1 to 4), and you can take the iron nail out to see what the coil does on its own. The picture shows the coil, the cells and the switch, the paper clips hanging from the end of the nail, and three compasses around it. North is up the screen; the north end of each needle is red. When the current flows, the needles swing towards or away from the ends of the electromagnet, more strongly the closer they are.

It follows the Class 8 Science chapter on electricity and its magnetic and heating effects (the magnetic effect of a current, making an electromagnet, what makes it stronger) and, with the Level switch on Class 10, the Class 10 topics on the field of a solenoid and how a soft iron core turns it into an electromagnet. To see the field lines themselves, open the magnetic field mapper; for how current depends on voltage and resistance, the ohm's law lab.

How to use it

  1. Pick the number of cells and slide the number of turns.
  2. Tick or untick Iron nail inside the coil.
  3. Tap Switch off and Switch on, and Turn the cells round to reverse the current.
  4. Read how many clips it picks up, the current, the field at the end of the nail and which end is the north pole.
  5. At Class 10 level, read the line with B = μ₀ n I worked out for your coil.

Worked example

The page starts with 2 cells and 50 turns on an iron nail. The current is 3 V ÷ (1 Ω in the cells + 1 Ω of wire + 0.5 Ω of leads) = 1.2 A. The field at the end of the nail comes out at 47 mT, enough for 5 paper clips in this model. Take the nail out and the field drops to 470 µT: no clips at all, and the compasses barely move. Put the nail back, use 4 cells and 100 turns: the current is 1.33 A, the field 104 mT, and it holds 13 clips.

Notice that adding turns also adds wire, which adds resistance, so 100 turns on 2 cells gives less current (0.857 A) than 50 turns, but the electromagnet still gets stronger (8 clips).

Tips

  • An electromagnet’s strength grows with the current and with the number of turns, and an iron core makes a huge difference.
  • Soft iron is used because it loses its magnetism when the current stops. A steel core would stay magnetised.
  • Reversing the current swaps the north and south poles; paper clips are attracted either way.

FAQ

Are the numbers real? The coil’s field is worked out properly, but the iron’s effect, the paper-clip count and the cells are simple teaching models, so treat the numbers as a guide to what gets bigger or smaller.

Why do the compasses not point straight at the magnet? Each needle follows the Earth’s field and the electromagnet’s field added together, so a weak field only turns it a little.

Is anything saved? No. Everything is worked out on this page and nothing leaves your device.

Where the numbers come from

  • Field of a coil from the Biot-Savart law (a stack of circular loops), and the long-coil result B = μ₀ n I: standard physics results. μ₀ = 1.25663706127 × 10⁻⁶ N/A² (CODATA 2022).
  • Teaching models, not measurements: the iron nail multiplies the field by 100, one paper clip is held for every 8 mT at the end, the cells are 1.5 V with 0.5 Ω each, the wire is 0.02 Ω a turn, and the Earth's horizontal field is taken as 40 µT.
  • The field at the end of the coil was checked against the finite-coil formula B = μ₀ n I L / (2 √(L² + a²)) computed independently in NumPy.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Read more on the Blog

Last updated 2026-11-09.

Change log for Electromagnet builder

  1. Add #1049 Electromagnet builder Details on GitHub

Every change to fibub

Related tools

Coil field designer #T645 Design Helmholtz, Maxwell, anti-Helmholtz or your own set of round coils. Get the exact field at the centre, how long and how wide the uniform region is, a map of the uniformity, the current for a target field, and the wire length, resistance and heat. Ohm's law lab #L16 A virtual circuit for Ohm's law. Slide the battery voltage, read the ammeter and voltmeter, record readings and plot V against I. The slope is the resistance. Compare a resistor with a filament bulb, and work out a wire's resistance from its length, thickness and metal. Magnetic field mapper #L18 See the magnetic field lines of a bar magnet, a straight current-carrying wire, a circular loop and a solenoid. Drag a compass around to see which way its needle points and how strong the field is there, and learn the right-hand thumb rule. Class 12 level adds B = μ₀I/2πr, μ₀NI/2a and μ₀nI with your numbers. Simple circuit lab #L101 Build a circuit of cells, a switch and a torch bulb or LED, then put copper, pencil lead, salt water, plastic and more in the gap. See which conduct and why an LED shows weak conductors a bulb misses; Class 10 adds R = ρL/A. Fuse heating #L102 Turn up the current through fuse wire, a nichrome heater coil or copper and watch it warm, glow and melt. Then switch on appliances at home until the fuse blows. Class 10 adds H = I²Rt and I = P/V. Biot–Savart lab #L263 Add up the magnetic field of a straight wire, a circular loop or a solenoid from small pieces of current, as the Biot–Savart law says, and compare with the exact formula. Graph the field along the axis. Then drag a loop among three long wires and see Ampère's law: the total of B round the loop is μ₀ times the current inside. Magnetic materials #L264 Put a diamagnetic, paramagnetic or ferromagnetic sample in a field and watch its tiny magnets: induced moments against the field, jiggling dipoles that line up a little, or whole domains that flip. Change the temperature, see Curie's law and the Curie temperature, and trace a hysteresis loop with its remanence and coercivity. Electric bell #L313 Watch an electric bell ring in slow motion: the electromagnet pulls the armature, the contact screw breaks the circuit and the spring snaps it back. Slide the current to change the ring rate. A teaching model.