This question might seem a bit too basic(or advanced!), but it is the one to which I'm really desperate to find a simple enough explanation and solution.

Ok, So here's the problem,

I have two identical electromagnets with a field strength $B$ each. Each of radius $r$ and length $l$ with $N$ turns say, how do I calculate the net repulsive/attractive force between them if

  1. they attract each other and are pulled apart or
  2. they repel each other and are pushed against each other

I want to levitate one magnet carrying a weight (so its stabilized) above the other electromagnet. Even if the solution is for different fields it is no problem.

  • $\begingroup$ Wikipedia has a long list of examples of such calculations. $\endgroup$
    – Winther
    Sep 10, 2015 at 18:53
  • 1
    $\begingroup$ Sebastian Riese gave you a good pointer there, but unfortunately it's not going to work for scenarios with ferromagnetic materials, which you will need, if you want to make this work. You could use a simulation program like MaxFem for the calculations, but there is a rather steep learning curve associated with that. As a practical pointer: start with permanent magnets and figure out a way to use a weak electromagnet just for stability control. Do not try to create the load bearing magnetic field with an electromagnet, cheap electromagnets don't have the power density of permanent magnets. $\endgroup$
    – CuriousOne
    Sep 10, 2015 at 20:20
  • $\begingroup$ @Winther: My first site to visit was Wikipedia but it did not specify for electromagnets. $\endgroup$
    – Gouthamm4G
    Sep 11, 2015 at 13:48
  • $\begingroup$ @CuriousOne: Since I already have the materials for making an electromagnet, I didn't want to use permenant magnets. Besides, if I use electromagnet I could easily vary the magnetic field in real time for future changes. $\endgroup$
    – Gouthamm4G
    Sep 11, 2015 at 13:51
  • $\begingroup$ And you will need those material to control the levitation. All I am saying is that you will find it much easier to do if you start with permanent magnets to create >90% of the required forces. You don't have to do it this way, it just turns out to be the by far better approach. $\endgroup$
    – CuriousOne
    Sep 11, 2015 at 13:57

1 Answer 1


The force is given by:

$$ \vec F = I \oint_{\gamma_2} d\vec r \times \vec B(\vec r).$$

Where $\vec B(\vec r)$ is the field generated by coil 1 and $I$ is the current in coil 2 and the integral is along the curve $\gamma$ which is described by the wires of the coil 2. Note, that there might also be a torque.

Knowing the maximal or homogeneous field $B$ in the interior of the coils does not help much.

The field of the coil is given by the Biot-Savart law: $$ \vec B(\vec r) = \frac{\mu_0 I}{4\pi} \int_{\gamma_1} \frac{d\vec r' \times (\vec r - \vec r')}{\left| \vec r - \vec r' \right|^3}.$$

Also note, that levitating a stationary magnet in a stationary magnetic field is always unstable due to the Earnshaw theorem. You will have to use some form of regulation to keep the system stable. Calculating some fixed parameters will not help you (but might help in the design of the system).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.