How to Make Something Levitate With Magnets at Home

You can make objects levitate with magnets, but not by simply stacking two repelling magnets on top of each other. A fundamental law of physics, known as Earnshaw’s theorem, proves that no stationary object can be held in stable equilibrium by static magnetic forces alone. The object will always slide off to one side. To get true, stable levitation, you need to use one of several workarounds: diamagnetic materials, spinning tops, electronic feedback systems, or eddy currents. Each method is achievable at home with different levels of effort and cost.

Why Simple Repulsion Doesn’t Work

If you’ve ever tried balancing a magnet above another magnet, you’ve noticed it always flips or shoots sideways. This isn’t a matter of technique. It’s a consequence of Maxwell’s equations: a magnetic field in open space can never form a true peak in strength, which is what you’d need to trap a floating magnet in place. No matter how cleverly you arrange permanent magnets, the floating object will always find an escape route along at least one axis.

Every working levitation method gets around this limitation in a different way. Some use materials that are mildly repelled by all magnetic fields. Others use motion or electronics to constantly correct the floating object’s position before it can escape.

Diamagnetic Levitation: The Simplest Approach

Diamagnetic materials are the one clean exception to the rule against stable magnetic levitation. Unlike iron or nickel, which are attracted to magnets, diamagnetic materials are weakly repelled by any magnetic field. This tiny repulsive force, combined with gravity, creates a stable pocket where a small object can hover indefinitely with no power source and no moving parts.

The easiest version of this uses pyrolytic graphite, a layered carbon material you can buy online for a few dollars. Place four strong neodymium magnets in a checkerboard pattern (alternating north-up and south-up), and set a thin square of pyrolytic graphite on top. A piece roughly 1 to 2 centimeters across and under a millimeter thick will float visibly above the magnets, hovering a fraction of a millimeter in the air. It stays there permanently, no batteries required.

The magnets need to be strong. Neodymium magnets (the kind labeled N42 or N52) are the standard choice. N52 is the strongest grade commercially available and gives you the most force in the smallest package. N42 magnets are cheaper and work fine if you use slightly larger ones. The checkerboard arrangement creates a steep enough variation in field strength to support the graphite’s weight against gravity. Research on diamagnetic composites has shown that materials need a minimum graphite content of about 14% by volume to generate enough repulsive force to float, which is why pure pyrolytic graphite works best.

You can also reverse this setup. A UCLA physics group demonstrated that even the feeble diamagnetism of ordinary materials, including human fingers, can stabilize a small magnet hovering in midair between carefully arranged larger magnets. The finger doesn’t lift the magnet; it just provides the tiny corrective nudge that prevents the sideways escape Earnshaw’s theorem predicts.

Spin-Stabilized Levitation: The Levitron Method

A spinning magnetic top can float above a magnetic base if its spin rate falls within a specific range. This is the principle behind the Levitron, a commercial toy that’s been around since the 1990s, and you can build your own version.

The base is a large ring magnet or platform magnet oriented to repel the top. Normally, the top would just flip over and slam down. But when it’s spinning fast enough, gyroscopic stability prevents flipping. The top precesses (wobbles slowly like a tilted gyroscope) and this precession keeps the magnetic moment aligned against the base field. Research at UCLA measured stable levitation at a height of about 3.2 centimeters, lasting over two minutes until the spin decayed.

The catch is that the spin rate must stay within a narrow window. For a typical Levitron-sized top, the range is roughly 1,000 to 3,000 RPM. Below the lower limit, the top doesn’t have enough gyroscopic stability and flips. Above the upper limit (measured experimentally at about 2,780 RPM for one top), the precession becomes too slow for the top to track changes in the local field direction as it drifts, and it flies off sideways. You adjust the floating weight by adding or removing small brass washers until it’s neutrally buoyant in the magnetic field gradient, then give it a good spin.

Building one at home requires patience. You need a strong base magnet, a small top with an embedded magnet, and fine weight adjustments (often fractions of a gram) to hit the sweet spot. Temperature changes in the room can shift the field strength enough to knock it out of range, so a stable environment helps.

Electromagnetic Levitation With Feedback Control

The most dramatic-looking levitation projects use an electromagnet above the object, pulling it upward against gravity, with a sensor that continuously adjusts the pull to keep the object hovering. This is the approach behind floating globe displays, floating Bluetooth speakers, and many science fair projects.

The system has three core parts: a position sensor, a controller, and the electromagnet. A Hall effect sensor mounted near the electromagnet measures the magnetic field strength, which changes as the floating object moves closer or farther away. That signal feeds into a controller (often a simple circuit or a microcontroller) that adjusts the current flowing through the electromagnet. If the object drops too low, current increases and pulls it back up. If it rises too high, current decreases and it drops slightly.

The Hall effect sensor produces a very small voltage, around 30 microvolts per unit of field strength, so the circuit needs an amplifier to boost that signal before the controller can use it. A common setup uses a Hall sensor like the SS495A feeding into a PWM (pulse-width modulation) controller, which rapidly switches the electromagnet’s current on and off to fine-tune the force. The floating object needs to be ferromagnetic, meaning iron, steel, or a magnet itself.

You can find complete kits for this online for under $20, or build one from scratch with an electromagnet wound from magnet wire, a Hall sensor, a transistor or motor driver chip, and a few resistors. The key challenge is tuning the feedback loop. If the response is too slow, the object oscillates wildly or falls. If it’s too aggressive, it vibrates or buzzes. Most DIY builds require some trial and error adjusting the gain (sensitivity) of the circuit.

Eddy Current Levitation: Spinning Magnets

When a magnet moves near a conductive material like copper or aluminum, it induces swirling electric currents (called eddy currents) in the metal. These currents generate their own magnetic field that opposes the original magnet’s motion, creating a repulsive force. If the magnet moves fast enough or the conductor is conductive enough, this repulsion can support an object’s weight.

The classic demonstration uses a spinning magnet or set of magnets beneath a sheet of aluminum or copper. As the magnets rotate, the constantly changing field induces strong eddy currents in the metal plate, pushing it upward. You can build a simple version by mounting strong neodymium magnets on a motor-driven rotor and placing a lightweight aluminum disc or ring above it. The disc lifts off and hovers as long as the motor runs.

Cooling the conductor makes this work dramatically better. When copper is chilled to extremely low temperatures with liquid nitrogen, its electrical resistance drops and eddy currents flow much more freely. In one well-known demonstration, a magnet dropped onto a liquid-nitrogen-cooled copper plate bounces without touching the surface and can even balance on its edge. You won’t typically do this at home without access to liquid nitrogen, but the room-temperature spinning-magnet version works well enough for a visible demonstration.

Choosing the Right Method

  • Easiest to build: Diamagnetic levitation with pyrolytic graphite. Buy four neodymium magnets and a graphite square, arrange them in a checkerboard, and you have levitation in minutes. The hovering gap is tiny but real and permanent.
  • Most impressive visually: Electromagnetic feedback levitation. A steel ball or small object hangs in midair beneath an electromagnet. Kits are affordable and the effect is striking from across a room.
  • Most educational: The Levitron-style spinning top. It teaches gyroscopic physics and magnetic fields simultaneously, though it requires careful setup and frustration tolerance.
  • Most fun to experiment with: Eddy current levitation with a spinning magnet rig. It’s mechanically simple and you can try different conductors, speeds, and object shapes to see how the lift changes.

Magnet Safety

Neodymium magnets strong enough for levitation projects are also strong enough to cause injuries. Magnets rated N42 or above can pinch skin severely if two snap together with a finger between them, and larger ones can crack or shatter on impact, sending sharp fragments flying. Keep them away from electronics, credit cards, and anyone with a pacemaker or implanted medical device. International guidelines set the general public’s static magnetic field exposure limit at 4,000 Gauss (0.4 Tesla), which is well above what small hobby magnets produce at arm’s length but can be reached at the surface of large neodymium blocks. Handle them with care, store them with spacers between them, and keep them out of reach of small children who might swallow them.