Inductor/Electromagnet used to lift up a magnet? Joules to Newtons or Joules to Gauss?
Your description revolves around magnets and mechanical force which makes the term co-energy very relevant. I'm sure you can find plenty of information regarding that.
Here is a small example on how magnetic force could be calculated. You have a coil with core as well as an object with relatively high permeability \$\mu_r\$. Then the air gaps are the main magnetic resistances in the magnetic circuit.
The magnetic resistance of both air gaps is:
$$R_L = \frac{2 d}{A_L \mu_0}$$
The magnetomotive force for \$N\$ turns of the coil is:
$$\theta_0 = Ni$$
You can then calculate the magnetic co-energy:
$$E_c(i,d) = \frac{1}{2}\psi i = \frac{1}{2}\phi \theta_0 = \frac{\theta_0 ^2}{2 R_{L}} = \frac{N^2 i^2 A_{L} \mu_0}{4 d}$$
From the co-energy, the force can be calculated using partial derivative regarding the distance \$d\$:
$$F(i,d) = \frac{\partial E_c}{\partial d} = -\frac{N^2 i^2 A_{L} \mu_0}{4 d^2}$$

Source: Lecture Notes: Mechatronics and Electrical Drives
You should be able to use this as a starting point for more complex arrangements. If you are not familiar with magnetic circuits, that might also be worth researching.